Page 1 of 1

Inbound only goes to default DID

PostPosted: Wed Mar 05, 2014 12:34 am
by arf
Asterisk 1.4.39.1-vici
VERSION: 2.4-364a
BUILD: 120409-1136
© 2012 ViciDial Group

Hi,

I'm having a problem in setting up an Inbound DID. After installing vicidial, in the Inbound DID listing there's a pre-configured default DID
# DID DESCRIPTION ACTIVE ADMIN GROUP ROUTE REC MODIFY
1 default Default DID Y ---ALL--- EXTEN N MODIFY
when i tried adding and then call the new Inbound DID it only follows the settings in default DID. I also tried the Copy DID and copied the settings of default DID and when i tried calling the number it still follows the setting of the default DID. When i tried to delete the default DID, the inbound doesn't work anymore.

Re: Inbound only goes to default DID

PostPosted: Wed Mar 05, 2014 4:11 am
by geoff3dmg
This is quite simple. The number you put in the 'DID Extension' for the DID is not the same as what your carrier is sending you. Check your asterisk console and/or logs for when you test the DID and check how the carrier is sending you the call.

Re: Inbound only goes to default DID

PostPosted: Wed Mar 05, 2014 9:29 am
by arf
-- Executing [18009911854@trunkinbound:1] AGI("SIP/aaa-00000021", "agi-DID_route.agi") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/agi-DID_route.agi
-- AGI Script agi-DID_route.agi completed, returning 0
-- Executing [99909*1***DID@default:1] Answer("SIP/aaa-00000021", "") in new stack
-- Executing [99909*1***DID@default:2] AGI("SIP/aaa-00000021", "agi-VDAD_ALL_inbound.agi") in new stack
== Spawn extension (default, 99909*1***DID, 2) exited non-zero on 'SIP/aaa-00000021'
-- Executing [h@default:1] DeadAGI("SIP/aaa-00000021", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----0---------------") in new stack
-- AGI Script agi://127.0.0.1:4577/call_log--HVcauses ... ---------- completed, returning 0

Re: Inbound only goes to default DID

PostPosted: Wed Mar 05, 2014 10:03 am
by geoff3dmg
yes so this line is the important line:

Code: Select all
-- Executing [18009981855@trunkinbound:1] AGI("SIP/aaa-00000021", "agi-DID_route.agi") in new stack


ViciDIAL will match the incoming DID on the '18009981855'. So ensure your settings reflect that.

Re: Inbound only goes to default DID

PostPosted: Wed Mar 05, 2014 11:31 am
by arf
It's ok now. Thanks.

Re: Inbound only goes to default DID

PostPosted: Sun Aug 31, 2014 6:17 pm
by btaveras
What is a carrier is sending this:

-- Executing [+17864085527@default:1] Ringing("SIP/192.168.15.114-00000031", "") in new stack
[Aug 31 19:14:21] -- Executing [+17864085527@default:2] Wait("SIP/192.168.15.114-00000031", "1") in new stack
[Aug 31 19:14:22] -- Executing [+17864085527@default:3] Answer("SIP/192.168.15.114-00000031", "") in new stack
[Aug 31 19:14:22] -- Executing [+17864085527@default:4] AGI("SIP/192.168.15.114-00000031", "agi-DID_route.agi|VIPWLESS-----17864085527-----Closer-$") in new stack
[Aug 31 19:14:22] -- Launched AGI Script /var/lib/asterisk/agi-bin/agi-DID_route.agi

I tried adding the +17864085527 in the DID extension but it does not allow my it erase the +,

This is my extension.conf for this number:

exten => +17864085527,1,Ringing ; call ringing
exten => +17864085527,2,Wait(1) ; Wait 1 second for CID delivery from PRI
exten => +17864085527,3,Answer ; Answer the line
exten => +17864085527,4,AGI(agi-DID_route.agi,VIPWLESS-----17864085527-----Closer-$
exten => +17864085527,5,Hangup

Re: Inbound only goes to default DID

PostPosted: Mon Sep 01, 2014 3:04 am
by geoff3dmg
you need to manipulate the incoming caller id number in the dialplan and get rid of the plus before you pass it on. i actually have a generic way to do it that I borrowed off the FreePBX folk.

1: In Admin -> System settings, set 'Allow Custom Dialplan Entries' to '1'.
2: Reload Admin -> System settings and put the following in the 'Custom Dialplan' box.

Code: Select all
[trunkinbound-remove-plus]
exten => _X!,1,GotoIf($["${CALLERID(num):0:2}" != "+1"]?noplusatstart)
exten => _X!,n,Set(CALLERID(num)=${CALLERID(num):1})
exten => _X!,n(noplusatstart),Goto(trunkinbound,${EXTEN},1)


3. on each of your trunks (In Admin -> Carriers -> Account Settings) that send DIDs with plus signs change the context to 'trunkinbound-remove-plus'
4. Wait or force your server(s) to reload the dialplans. Check via the console everything is working. You should be able to match on the DID without the plus sign being there now.

I got the original dialplan from here:

http://community.spiceworks.com/how_to/ ... th-freepbx

It's also worth noting it should be possible for your carrier to change the number format they send if you ask them.