Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Fri Mar 29, 2024 10:40 am
Auto Dialer Software


All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Calls between extensions...
PostPosted: Tue Apr 20, 2010 11:22 pm 
Offline
User avatar

Joined: Thu Apr 15, 2010 6:42 pm
Posts: 9
Location: Guadalajara Mexico
Hey there, I've been looking for a way to let customers call each other dialing some sort of extension...

However, all I find is based in old releases, and none of them worked... I already enabled the "sip_iax_friends" and set "sip_iax_pstn_direct_call_prefix" to 555 in my agi-conf1... however, when I call for example 555 6703753660 being 6703753660 my username/accountcode and the system tries to rout the call to the trunk, and, since it's not starting with 9 (my prefix for outgoing calls), the call won't go thru and it asks for the number to call.

I'm getting desperate here.

Thanks for your help


Top
 Profile  
 
 Post subject: Re: Calls between extensions...
PostPosted: Tue Apr 20, 2010 11:51 pm 
Offline

Joined: Wed Feb 13, 2008 11:11 am
Posts: 224
are you routing internal extension based on freepbx or what?

Quote:
since it's not starting with 9 (my prefix for outgoing calls), the call won't go thru and it asks for the number to call.


don't make sense to me. in 1.5 you need not alow sip iax friends for intercalls.

if using 1.5>. create a fake DID say 1234 and in destination set 1234 to SIP or IAX2/account number

Rgds
Eamonn

http://www.eatelco.com


Top
 Profile  
 
 Post subject: Re: Calls between extensions...
PostPosted: Wed Apr 21, 2010 2:32 am 
Offline

Joined: Tue Aug 19, 2008 3:49 pm
Posts: 184
Hi,

As Eamonn indicates, you should be able to just assign DID's and the calls will do an internal route. At least this is how it works for me.

Kind Regards,

Les


Top
 Profile  
 
 Post subject: Re: Calls between extensions...
PostPosted: Wed Apr 21, 2010 7:02 pm 
Offline
User avatar

Joined: Thu Apr 15, 2010 6:42 pm
Posts: 9
Location: Guadalajara Mexico
manugmedia wrote:
are you routing internal extension based on freepbx or what?

don't make sense to me. in 1.5 you need not alow sip iax friends for intercalls.

if using 1.5>. create a fake DID say 1234 and in destination set 1234 to SIP or IAX2/account number


Nope, no FreePBX... my server has Debian, MySQL, Apache, PHP and a2billing... and that's it.

What I meant was... I need a prefix for outgoing calls... for example, I wanna call 12345678, I must dial 912345678... my rate automatically removes 9 and dials... that's a request of the PBX owners.

So I need to dial, for example 1234 and another extension rings... I read that it was possible using Alias on the cards, however, that was based in old releases... I can't find where to do that, and that's what I was asking... Now...

LFCII wrote:
As Eamonn indicates, you should be able to just assign DID's and the calls will do an internal route. At least this is how it works for me.s


It does sound logical... lemme try and come back with results.

Thanks a lot =D


Top
 Profile  
 
 Post subject: Re: Calls between extensions...
PostPosted: Wed Apr 21, 2010 7:30 pm 
Offline
User avatar

Joined: Thu Apr 15, 2010 6:42 pm
Posts: 9
Location: Guadalajara Mexico
Nope, didn't work... we have the prefix issue... system doesn't find 9 at the begining, so it doesn't dial and asks for a real phone number :S


Top
 Profile  
 
 Post subject: Re: Calls between extensions...
PostPosted: Wed Apr 21, 2010 9:03 pm 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Hi

Ideally, your customer may deliver 9+some digits to Asterisk, but I think you should strip of the 9 before passing into A2Billing.

Each customer is assigned a DID, with a destination, and then when one customer calls another's, their extension will will ring.

Joe


Top
 Profile  
 
 Post subject: Re: Calls between extensions...
PostPosted: Wed Apr 21, 2010 10:38 pm 
Offline
User avatar

Joined: Thu Apr 15, 2010 6:42 pm
Posts: 9
Location: Guadalajara Mexico
jroper wrote:
Hi

Ideally, your customer may deliver 9+some digits to Asterisk, but I think you should strip of the 9 before passing into A2Billing.

Each customer is assigned a DID, with a destination, and then when one customer calls another's, their extension will will ring.

Joe


Yep, that's exactly what it does... i just said "remove" instead of "strip"... however... I'm aware they can dial the DID... but it's not practical... for example

I dial 912345678, my dialplan strips 9 and i get 12345678, since this is a local number, it will go thru the trunk, and then come back to my own PBX...

So basically, if I make them use the DID... every call to an internal extension would be like a local call... which will be billed... Besides... it's not "comfy" to dial 9 numbers, instead of just 4 (like a regular office extension)...

Which reminds me, and FYI... This is a project for a Tech Park, meaning, several companies rent office space in a large building. And it's all "controlled" by only one PBX.


Top
 Profile  
 
 Post subject: Re: Calls between extensions...
PostPosted: Wed Apr 21, 2010 11:11 pm 
Offline

Joined: Mon Jan 08, 2007 6:56 pm
Posts: 345
Not sure if this method will work for you, but the typical way in which you would set up an internal PBX, seems to be what you are describing.

You create sip extensions in asterisk and provide these logon credentials to your customers. Then you create inbound routes for the DID's and route them to the respective extensions. Then you can set their caller ID per extension for outbound calls with their DID.

Internal calls are free and A2B will handle outbound. This is easier to setup with freepbx though.


Top
 Profile  
 
 Post subject: Re: Calls between extensions...
PostPosted: Thu Apr 22, 2010 4:08 pm 
Offline
User avatar

Joined: Thu Apr 15, 2010 6:42 pm
Posts: 9
Location: Guadalajara Mexico
vulcan wrote:
Not sure if this method will work for you, but the typical way in which you would set up an internal PBX, seems to be what you are describing.

You create sip extensions in asterisk and provide these logon credentials to your customers. Then you create inbound routes for the DID's and route them to the respective extensions. Then you can set their caller ID per extension for outbound calls with their DID.

Internal calls are free and A2B will handle outbound. This is easier to setup with freepbx though.


Never thought about that...

I'm about to finish a different AGI... to have something like...

Code:
[a2billing]
; CallingCard application
exten => _5.,1,DeadAGI(internaldialing.php)
exten => _5.,2,Hangup
exten => _X.,1,GotoIf($["${EXTEN}" = "6600"]? 4)
exten => _X.,2,DeadAGI(a2billing.php|1)
exten => _X.,3,Hangup
exten => _X.,4,VoicemailMain()
exten => _X.,5,Hangup


So if they dial 51234, it will run my AGI, it'll just compare the extension dialed with one database table, and if it exists, it'll rout it to the a2billing extension...

In case it doesn't work, i'll try what u said...

Thanks a lot =D


Top
 Profile  
 
 Post subject: Re: Calls between extensions...
PostPosted: Thu Apr 22, 2010 5:31 pm 
Offline
User avatar

Joined: Thu Apr 15, 2010 6:42 pm
Posts: 9
Location: Guadalajara Mexico
Complete sucess =D

And I wanna share it with u ppl

This is my AGI

Code:
#!/usr/bin/php -q
<?
include (dirname(__FILE__)."/lib/phpagi/phpagi.php");
include (dirname(__FILE__)."/lib/phpagi/phpagi-asmanager.php");
$agi = new AGI();

$no = substr($agi->request[agi_dnid], 1);//Gets the DNID except the first digit (5), the prefix

$db = 'mydb';
$dbuser = 'root';
$dbpass = 'mypassword';
$dbhost = 'localhost';

mysql_connect($dbhost,$dbuser,$dbpass);
mysql_select_db("$db");
$row=mysql_query("SELECT * FROM aa_alias WHERE alias = ".$no." LIMIT 1");
if(mysql_num_rows($row) == 1)
{
   $row=mysql_fetch_object($row);
   $agi->set_variable("blah", $row->extension);
}
?>


And in extensions.conf...

Code:
[a2billing]
; CallingCard application
exten => _5.,1,DeadAGI(internalcall.php)
exten => _5.,2,Dial(SIP/${blah})
exten => _5.,3,Hangup

exten => _X.,1,GotoIf($["${EXTEN}" = "6600"]? 4)
exten => _X.,2,DeadAGI(a2billing.php|1)
exten => _X.,3,Hangup
exten => _X.,4,VoicemailMain()
exten => _X.,5,Hangup


And that's it... when some dials 5 and then a short extension (alias), it'll run the SCRIPT and compare with a database, if it exists, it'll assign the real extension to "blah", then it'll dial to that extension.

And that's it =D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 
Hosted Voice Broadcast


All times are UTC


Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group