What's wrong with my dialplan?

Hey there,

I installed the lastest version of Vicibox (it’s Open SUSE with Asterisk 1.4.x I believe)
I’m having trouble making outbound calls with my VOIP provider (future-nine). The CLI shows this:

[Jan 22 12:34:22] – Executing [15141234567@default:1] AGI(“SIP/201-00000016”, “agi://127.0.0.1:4577/call_log”) in new stack
[Jan 22 12:34:22] – AGI Script agi://127.0.0.1:4577/call_log completed, returning 0
[Jan 22 12:34:22] – Executing [15141234567@default:2] Dial(“SIP/201-00000016”, “SIP/xxxxxxx:xxxxxxxx@incoming.future-nine.com:5060/15141234567||To”) in new stack
[Jan 22 12:34:22] – Called xxxxx:xxxxx@incoming.future-nine.com:5060/15141234567
[Jan 22 12:34:23] NOTICE[4313]: chan_sip.c:13470 handle_response_invite: Failed to authenticate on INVITE to ‘“SIP201” sip:8xxxxxxx@192.168.1.x;tag=as6a58c2aa’
[Jan 22 12:34:23] – SIP/incoming.future-nine.com:5060/15141234567-00000017 is circuit-busy
[Jan 22 12:34:23] == Everyone is busy/congested at this time (1:0/1/0)
[Jan 22 12:34:23] – Executing [15141234567@default:3] Hangup(“SIP/201-00000016”, “”) in new stack
[Jan 22 12:34:23] == Spawn extension (default, 15141234567, 3) exited non-zero on ‘SIP/201-00000016’
[Jan 22 12:34:23] – Executing [h@default:1] DeadAGI(“SIP/201-00000016”, “agi://127.0.0.1:4577/call_log–HVcauses–PRI-----NODEBUG-----21-----CONGESTION----------”) in new stack
[Jan 22 12:34:23] – AGI Script agi://127.0.0.1:4577/call_log–HVcauses … ---------- completed, returning 0

the phone itself registers with asterisk OK,
when I do sip show peers/sip show registry, future-nine is there.

When I try to make a call, the soft phone Ekiga says “security check failed”. For some reason, Ekiga doesn’t work. If I use X-lite without passing through asterisk, the call goes through without a problem provided I have the correct dialplan.

This is my account entry:
[future9]
username=xxxxxxxx
fromuser=xxxxxxxx
type=friend
secret=xxxxxxxxxx
host=incoming.future-nine.com
insecure=port,invite
nat=yes
qualify=yes
context=trunkinbound
allow=ulaw,g729,g726
trustrpid = yes
sendrpid = yes
canreinvite = no

This is my dialplan:
exten => _1NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _1NXXNXXXXXX,2,Dial(SIP/XXX:XXXX@incoming.future-nine.com:5060/${EXTEN},tTor)
exten => _1NXXNXXXXXX,3, Hangup

I’m using future-nine and they have this dialplan example , but I’m not sure how to translate this in Vicidial/Vicibox.
future-nine.com/faq/index.ph … artlang=en

I’ll continue looking for an answer in the meantime but your help is much appreciated.
Thanks Asterisk forum

Your dialplan bypasses sip.conf. Also, I wasn’t aware that sip/user@domain/digits was valid syntax. I thought one could only have sip/user@domain or sip/digits@section, or sip/section/digits. I’m not sure how it would form the destination address with two fields contending for it.

Also, Asterisk 1.4 should not be used as the basis of new systems unless you have an independent source of support, as it is on security fixes only, which will end soon.

Ok I solved it, you were correct about the syntax

just changed it to:

exten => _1NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _1NXXNXXXXXX,2,Dial(SIP/${EXTEN}@future9,tTor)
exten => _1NXXNXXXXXX,3, Hangup

Thanks David, your post sparked a lightbulb like in the cartoons.

Ok this is another problem I have, I am trying to set up the inbound line to call extention 201. It seems to register with the Asterisk server allright, but it doesn’t seem to reach my extention.

When I turn on agi debug, I get this:

[Jan 22 17:32:17] – Executing [201@trunkinbound:1] AGI(“SIP/future9-0000006b”, “agi-DID_route.agi”) in new stack
[Jan 22 17:32:17] – Launched AGI Script /var/lib/asterisk/agi-bin/agi-DID_route.agi
[Jan 22 17:32:17] AGI Tx >> agi_request: agi-DID_route.agi
[Jan 22 17:32:17] AGI Tx >> agi_channel: SIP/future9-0000006b
[Jan 22 17:32:17] AGI Tx >> agi_language: en
[Jan 22 17:32:17] AGI Tx >> agi_type: SIP
[Jan 22 17:32:17] AGI Tx >> agi_uniqueid: 1327271537.107
[Jan 22 17:32:17] AGI Tx >> agi_callerid: 5141234567
[Jan 22 17:32:17] AGI Tx >> agi_calleridname: 5141234567
[Jan 22 17:32:17] AGI Tx >> agi_callingpres: 0
[Jan 22 17:32:17] AGI Tx >> agi_callingani2: 0
[Jan 22 17:32:17] AGI Tx >> agi_callington: 0
[Jan 22 17:32:17] AGI Tx >> agi_callingtns: 0
[Jan 22 17:32:17] AGI Tx >> agi_dnid: 201
[Jan 22 17:32:17] AGI Tx >> agi_rdnis: unknown
[Jan 22 17:32:17] AGI Tx >> agi_context: trunkinbound
[Jan 22 17:32:17] AGI Tx >> agi_extension: 201
[Jan 22 17:32:17] AGI Tx >> agi_priority: 1
[Jan 22 17:32:17] AGI Tx >> agi_enhanced: 0.0
[Jan 22 17:32:17] AGI Tx >> agi_accountcode:
[Jan 22 17:32:17] AGI Tx >>
[Jan 22 17:32:17] AGI Rx << SET CONTEXT default
[Jan 22 17:32:17] AGI Tx >> 200 result=0
[Jan 22 17:32:17] AGI Rx << SET EXTENSION 9998811112
[Jan 22 17:32:17] AGI Tx >> 200 result=0
[Jan 22 17:32:17] AGI Rx << SET PRIORITY 1
[Jan 22 17:32:17] AGI Tx >> 200 result=0
[Jan 22 17:32:17] – AGI Script agi-DID_route.agi completed, returning 0
[Jan 22 17:32:17] – Executing [9998811112@default:1] Wait(“SIP/future9-0000006b”, “2”) in new stack
[Jan 22 17:32:19] – Executing [9998811112@default:2] Answer(“SIP/future9-0000006b”, “”) in new stack
[Jan 22 17:32:19] – Executing [9998811112@default:3] Playback(“SIP/future9-0000006b”, “ss-noservice”) in new stack
[Jan 22 17:32:19] – <SIP/future9-0000006b> Playing ‘ss-noservice’ (language ‘en’)
[Jan 22 17:32:24] – Executing [9998811112@default:4] Playback(“SIP/future9-0000006b”, “vm-goodbye”) in new stack
[Jan 22 17:32:24] – <SIP/future9-0000006b> Playing ‘vm-goodbye’ (language ‘en’)
[Jan 22 17:32:25] – Executing [9998811112@default:5] Hangup(“SIP/future9-0000006b”, “”) in new stack
[Jan 22 17:32:25] == Spawn extension (default, 9998811112, 5) exited non-zero on ‘SIP/future9-0000006b’
[Jan 22 17:32:25] – Executing [h@default:1] DeadAGI(“SIP/future9-0000006b”, “agi://127.0.0.1:4577/call_log–HVcauses–PRI-----NODEBUG-----16---------------”) in new stack
[Jan 22 17:32:25] AGI Tx >> agi_network: yes
[Jan 22 17:32:25] AGI Tx >> agi_network_script: call_log–HVcauses–PRI-----NODEBUG-----16---------------
[Jan 22 17:32:25] AGI Tx >> agi_request: agi://127.0.0.1:4577/call_log–HVcauses … ----------
[Jan 22 17:32:25] AGI Tx >> agi_channel: SIP/future9-0000006b
[Jan 22 17:32:25] AGI Tx >> agi_language: en
[Jan 22 17:32:25] AGI Tx >> agi_type: SIP
[Jan 22 17:32:25] AGI Tx >> agi_uniqueid: 1327271537.107
[Jan 22 17:32:25] AGI Tx >> agi_callerid: 5141234567
[Jan 22 17:32:25] AGI Tx >> agi_calleridname: 5141234567
[Jan 22 17:32:25] AGI Tx >> agi_callingpres: 0
[Jan 22 17:32:25] AGI Tx >> agi_callingani2: 0
[Jan 22 17:32:25] AGI Tx >> agi_callington: 0
[Jan 22 17:32:25] AGI Tx >> agi_callingtns: 0
[Jan 22 17:32:25] AGI Tx >> agi_dnid: 201
[Jan 22 17:32:25] AGI Tx >> agi_rdnis: unknown
[Jan 22 17:32:25] AGI Tx >> agi_context: default
[Jan 22 17:32:25] AGI Tx >> agi_extension: h
[Jan 22 17:32:25] AGI Tx >> agi_priority: 1
[Jan 22 17:32:25] AGI Tx >> agi_enhanced: 0.0
[Jan 22 17:32:25] AGI Tx >> agi_accountcode:
[Jan 22 17:32:25] AGI Tx >>

While I haven’t looked into the perl script, it seems to be passing along the 201 value fine… now what am I missing? Why does it set the extention to 9998811112?

What I have for the trunkinbound context is this:

[trunkinbound]
; DID call routing process
; exten => _XXXXXXXXXX,1,AGI(agi-DID_route.agi) ; use this one instead of the one below if you are having delay issues, and match to number of received digits
exten => _X.,1,AGI(agi-DID_route.agi)

; FastAGI for VICIDIAL/astGUIclient call logging
exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log–HVcauses … EBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})

That looks like a Vicidial issue, not an Asterisk one.

Cool, thanks David. I’ll go bug the vicidial guys.