Outgoing DialPlan


Does someone have or can they point me to a comprehsive dialplan for handling outgoing calls and the possible errors they may face such as user busy, number unallocated, no free channels on isdn etc etc??

I want to be able to pass these back to the user with the approprite tones and messages and perhaps retry the call etc.

Many Thanks
Scott Pinhorne

the best place to start is the wiki at voip-info.org

if you don’t get what you want there, ask again here … but at least you’ll have some knowledge of what does and doesn’t work for you.

thanhks for your reply.

I have a basic outgoing dialplan that I have worked out from using that site but it doesnt appear to handle some of the errors very well i.e no channels availabble, user busy etc.

Many Thanks

scott, post what you’re using here.

and at the CLI enter “show application Dial” and you’ll see a heap of information, including the setting of channel variables (including DIALSTATUS) that you can use in your dialplan.

Thanks for the reply,

Does this look ok:

exten => _9.,1,SetAccount(EXTERNAL-CALL)
exten => _9.,2,SetCallerID(“NAME” <12345678900>)
exten => _9.,3,Dial(SIP/${EXTEN}@ISDN30-GATEWAY,60,trWw)
exten => _9.,4,NoOp(HANGUPCAUSE is ${HANGUPCAUSE})
exten => _9.,5,gotoif,$${HANGUPCAUSE} = 1?external-UNOBTAINABLE|1
exten => _9.,6,gotoif,$${HANGUPCAUSE} = 16?external-BUSY|1
exten => _9.,7,Goto(external-${DIALSTATUS},1)
exten => _9.,8,Playback(pbx-invalid)
exten => external-NOANSWER,1,Playtones(busy)
exten => external-BUSY,1,Playtones(busy)
exten => external-CONGESTION,1,Playtones(congestion)
exten => external-UNOBTAINABLE,1,Playtones(congestion)
exten => external-CHANUNAVAIL,1,Playback(all-outgoing-lines-unavailable)

Many Thanks

hello, guy:
I think you have check the two lines first. gotoif can be used like
exten => _9,5, gotoif(condition)

exten => _9.,5,gotoif,$${HANGUPCAUSE} = 1?external-UNOBTAINABLE|1
exten => _9.,6,gotoif,$${HANGUPCAUSE} = 16?external-BUSY|1