[Asterisk-Users] PRI outbound call error detection

Gareth Blades list-asterisk at linguaphone.co.uk
Tue Apr 11 08:28:24 MST 2006


Just thought I would post this as someone might find it usefull.
This is the dialplan for making outbound calls from the UK (not
internetional).
It can be set to block callerID for particular extensions. I have also
added some detection of the PRI error numbers when a call fails to give
some extra information to the caller incase they enter an invalid number
or the destination number has been disconnected.

exten => _90[1-9].,1,Set(BLOCKCID=${DB(blockcid/${CALLERIDNUM})})
exten => _90[1-9].,2,GotoIf($[ "${BLOCKCID}" = "yes" ]?3:4)
exten => _90[1-9].,3,SetCallerPres(prohib)
exten => _90[1-9].,4,Dial(ZAP/g1/${EXTEN:1},60,Tr)
exten => _90[1-9].,5,Set(CDR(userfield)=${HANGUPCAUSE}.${DIALSTATUS})
exten => _90[1-9].,6,GotoIf($[ "${DIALSTATUS}" = "BUSY" ]?20)
exten => _90[1-9].,7,GotoIf($[ "${DIALSTATUS}" = "CONGESTION" ]?30)
exten => _90[1-9].,8,GotoIf($[ "${DIALSTATUS}" = "CHANUNAVAIL" ]?30)
exten => _90[1-9].,9,GotoIf($[ "${HANGUPCAUSE}" = "28" ]?40)
exten => _90[1-9].,10,GotoIf($[ "${HANGUPCAUSE}" = "1" ]?50)
exten => _90[1-9].,11,Hangup
exten => _90[1-9].,20,Busy
exten => _90[1-9].,30,Congestion
exten => _90[1-9].,40,Answer
exten => _90[1-9].,41,Wait(1)
exten => _90[1-9].,42,Playback(that-is-not-rec-phn-num)
exten => _90[1-9].,43,Hangup
exten => _90[1-9].,50,Answer
exten => _90[1-9].,51,Wait(1)
exten => _90[1-9].,52,Playback(discon-or-out-of-service)
exten => _90[1-9].,53,Hangup





More information about the asterisk-users mailing list