Page 1 of 1

IP Authenticated Inbound Calls to DID

PostPosted: Mon Feb 26, 2018 4:05 pm
by zenithbsolutions
Hi,

We have a requirement where the inbound calls are routed to vicidial using IP Authentication. Now we have to do is route all the inbound calls to an external DID number.

My question is how can we transfer the IP Authentication Inbound call to the DID, Cause what we did till now was to setup a Inbound DID number for inbound group and later route it to another DID. But here there is no inbound DID number no inbound group we just need to transfer all the inbound call traffic to a DID number.

Can it be achieved through dial plan or through inbound group itself.

All your suggestions are appreciated.

Thank you.

Re: IP Authenticated Inbound Calls to DID

PostPosted: Tue Feb 27, 2018 11:19 pm
by udy786
You can do it by Dialplan.

I hope DID call will come trunkinbound context if you have not define any other context.

So use dialplan like below.

Code: Select all
exten => 1234567890,1,Dial(SIP/9876543210@gateway_name,45,oTr)
exten => 1234567890,2,Hangup()


Replace 1234567890 with your DID number, 9876543210 with external number and gateway_name with your trunk.

Re: IP Authenticated Inbound Calls to DID

PostPosted: Tue Feb 27, 2018 11:31 pm
by williamconley
zenithbsolutions wrote:Hi,

We have a requirement where the inbound calls are routed to vicidial using IP Authentication. Now we have to do is route all the inbound calls to an external DID number.

My question is how can we transfer the IP Authentication Inbound call to the DID, Cause what we did till now was to setup a Inbound DID number for inbound group and later route it to another DID. But here there is no inbound DID number no inbound group we just need to transfer all the inbound call traffic to a DID number.

Can it be achieved through dial plan or through inbound group itself.

All your suggestions are appreciated.

Thank you.

If your carrier is set up properly, it will have an entry for "context=trunkinbound" in the sip account entry. Since the SIP account also has the IP address, this means you now have "IP => trunkinbound" mapped and you've seen how that works.

"trunkinbound" is in "extensions.conf" in the /etc/asterisk folder. It directs the inbound calls to the Vicidial DID call routing system by invoking an AGI script (read the file, you'll see it). Once the agi script takes control: if the call does not have a specific DID (extension), the call will land in the "default" DID (available in the Vicidial system under "Inbound -> Show DIDs").

Here you have two options:
1) Use the Default DID to perform your forwarding. Pro: Proves that the system will work. Con: Will only allow "all", not specific to an IP address.
2) Modify "context=trunkinbound" to "context=trunkIPxxxxxx" where xxxxxx is an identifier for this IP address. Then you can copy the pertinent lines from trunkinbound that will route the call to the vicidial agi script, but first you can alter the dialplan to send the call to a specific DID using the extension language of Asterisk. "Goto(extension,priority)" willl allow you to change the extension. Then you can send the call to the agi script at the new extension, and set up a DID for that new extension you just made up. A simple method could be to use the Goto(context,extension,priority) version of the command Goto: to send the call to the trunkinbound context and the DID you wanted to route to. Thus the "context=trunkIPxxxxxx" would have only one line in it to bounce the call to the DID of your choice.

Note: In ALL contexts you create in extensions.conf, you should remember to put a copy of the hangup agi line. You'll see it in every context, often right at the end.