Alessio Focardi
2006-Jan-20 04:49 UTC
[Asterisk-Users] Detecting a PRI failure from dialplan
Hi, I would like to know if there is a way to detect the status of a span prior of sendig a call across it from the dialplan. I was asked to set up an * server with 2 spans connected to the telco and use the second as failover for the first. I checked that dialing a failed span (for instance: cable disconnected or no line) results in "congestion" for ${DIALSTATUS}, but message is too generic for my use. Any suggestion will be greatly appreciated, tnx! -- Best regards, Alessio mailto:afoc@interconnessioni.it
On 20 Jan 2006, at 11:49, Alessio Focardi wrote:> Hi, > > I would like to know if there is a way to detect the status of a span > prior of sendig a call across it from the dialplan. > > I was asked to set up an * server with 2 spans connected to the > telco and use the second as > failover for the first. > > I checked that dialing a failed span (for instance: cable > disconnected or > no line) results in "congestion" for ${DIALSTATUS}, but message is too > generic for my use. > > Any suggestion will be greatly appreciated, tnx!I find the best way to check the status of a PRI is to look in /proc/zaptel/1 or /proc/zaptel/2 etc You'd have to do some work integrating this into the dialplan, but you could set a global variable or something. Tim. http://www.westhawk.co.uk/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060120/41452a80/attachment.htm
afoc@interconnessioni.it
2006-Jan-20 07:33 UTC
[Asterisk-Users] Detecting a PRI failure from dialplan
> On 20 Jan 2006, at 11:49, Alessio Focardi wrote: > > > Hi, > > > > I would like to know if there is a way to detect the status of a span > > prior of sendig a call across it from the dialplan.> I find the best way to check the status of a PRI is to look in > /proc/zaptel/1 or /proc/zaptel/2 etc > > You'd have to do some work integrating this into the dialplan, > but you could set a global variable or something.Tnx, this is what I was fearing from the start ... :) What about hangup codes ? I still have to understand if they can be parsed after dial or just by "h" extension ... Regards!
> I would like to know if there is a way to detect the status of a span > prior of sendig a call across it from the dialplan. > > I was asked to set up an * server with 2 spans connected to the telco anduse the second as> failover for the first. > > I checked that dialing a failed span (for instance: cable disconnected or > no line) results in "congestion" for ${DIALSTATUS}, but message is too > generic for my use.Have you checked what happens if you put both PRI lines in a single ZAP group and refer to it as a Dial(ZAP/g1/${EXTEN}) ? I my opinion asterisk should automatically know that the first 30 B channels are dead and try the remaining live ones. I haven't tested it with PRI, but I'm pretty sure it works that way for BRI (HFC card - zaphfc module). Ivan