Vidura Senadeera
2007-Mar-15  03:08 UTC
[asterisk-users] busy/hangup/answer detection in PRI E1 channels
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. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070315/e9cae81c/attachment.htm
Gareth Blades
2007-Mar-15  03:35 UTC
[asterisk-users] busy/hangup/answer detection in PRI E1 channels
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
Doug Lytle
2007-Mar-15  04:06 UTC
[asterisk-users] busy/hangup/answer detection in PRI E1 channels
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?PRI channels have call supervision and Asterisk will see the hangup/answers just fine. The busydetect, callprogress, busycount should be removed from your setup. Doug -- Ben Franklin quote: "Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety."