[asterisk-users] busy/hangup/answer detection in PRI E1 channels

Gareth Blades list-asterisk at linguaphone.co.uk
Thu Mar 15 03:35:16 MST 2007


You can use the hangupcause variable which us the pri cause code
supplied when a call is ended over a PRI line. For example this is the
maco we use to dial a number over PRI.

[macro-pridial]
exten => s,1,GotoIf($["${ARG1:0:2}" != "00"]?noint)
exten => s,n,Set(DENYINT=${DB(denyinternational/${CALLERIDNUM})})
exten => s,n,GotoIf($[ "${DENYINT}" = "yes" ]?congestion)
exten => s,n(noint),Set(BLOCKCID=${DB(blockcid/${CALLERIDNUM})})
exten => s,n,GotoIf($[ "${BLOCKCID}" = "yes" ]?prohib:cont)
exten => s,n(prohib),SetCallerPres(prohib)
exten => s,n(cont),Dial(ZAP/g1/${ARG1},60,Tr)
exten => s,n,Set(CDR(userfield)=${HANGUPCAUSE}.${DIALSTATUS})
exten => s,n,GotoIf($[ "${DIALSTATUS}" = "BUSY" ]?busy)
exten => s,n,GotoIf($[ "${DIALSTATUS}" = "CONGESTION" ]?congestion)
exten => s,n,GotoIf($[ "${HANGUPCAUSE}" = "28" ]?unrecognised)
exten => s,n,GotoIf($[ "${HANGUPCAUSE}" = "1" ]?discon)
exten => s,n,GotoIf($[ "${DIALSTATUS}" = "CHANUNAVAIL" ]?congestion)
exten => s,n,Hangup
exten => s,n(busy),Busy
exten => s,n(congestion),GotoIf($[ "${HANGUPCAUSE}" = "34" ]?error)
exten => s,n,Congestion
exten => s,n(error),Answer
exten => s,n,SendText(${HANGUPCAUSE}: ERROR: No channels available)
exten => s,n,Wait(1)
exten => s,n,Playback(all-outgoing-lines-unavailable)
exten => s,n,Wait(10)
exten => s,n,Hangup
exten => s,n(unrecognised),Answer
exten => s,n,SendText(${HANGUPCAUSE}: Unrecognised No.)
exten => s,n,Wait(1)
exten => s,n,Playback(that-is-not-rec-phn-num)
exten => s,n,Wait(10)
exten => s,n,Hangup
exten => s,n(discon),Answer
exten => s,n,SendText(${HANGUPCAUSE}:Out Of Service)
exten => s,n,Wait(1)
exten => s,n,Playback(discon-or-out-of-service)
exten => s,n,Wait(10)
exten => s,n,Hangup


On Thu, 2007-03-15 at 10:09, Vidura Senadeera wrote:
> Hi,
>  
> Please discribe me how we define busy/hang/answer detection with PRI
> E1 channels.
>  
> Since busydetect, callprogress, busycount giving falts hangup and call
> drops what is the solution on PRI channels?
> 
> -- 
> Thanks & Regards,
> Vidura B. Senadeera. 
> 
> ______________________________________________________________________
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users



More information about the asterisk-users mailing list