[asterisk-users] How to check channel status and move on silently?

Pete Mundy pete at fiberphone.co.nz
Wed Dec 5 12:38:43 CST 2012


Dear list (FTPer, think I finally spotted one I can help with!)

> I have 10 different routes with few different providers. When I place an international call, I would like the system to try all those routes and place the call through whichever possible. If there is any message but an ANSWER the system should move on to next route. I know this is not the best strategy but there are so many bad routes now-a-days that it's becoming a headache.

I'd recommend looking at the ${DIALSTATUS} Asterisk variable and wrapping up some 'Dial' and 'Goto' applications in a macro that calls the first provider then looks at the returned ${DIALSTATUS} to make the logic decision of where to go from there. Then use the new macro everywhere where you would have previously used a single upstream dial.

Further reading references (the second one actually containing an example that might be a useful starting point for you to work from):

http://www.voip-info.org/wiki/view/Asterisk+variable+DIALSTATUS

http://www.voip-info.org/wiki/view/Asterisk+cmd+Goto

Hope this helps!

Pete Mundy




-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4358 bytes
Desc: not available
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20121206/a7f9da5a/attachment.bin>


More information about the asterisk-users mailing list