[Asterisk-Users] Variuos hangup codes in Manager API for failover

Matt Riddell matt.riddell at sineapps.com
Sun Aug 28 21:21:16 MST 2005


Steve Edwards wrote:
>> Normally the way I do it is to program the failover into the dialplan
>> and then
>> send the call to Local/exten at context to initiate it.
> 
> How about a snippet? (Local channels somewhat escape me.)

Ok,

If you had something like this (we're assuming +101 jumping for arguments sake
here):

[outbound]
exten => _9X.,1,Dial(SIP/${EXTEN:1}@mysipprovider)
exten => _9X.,102,Dial(IAX/myiaxprovider/${EXTEN:1})
exten => _9X.,203,Dial(IAX/myiaxprovider/${EXTEN:1})

Then you could originate a call with the following channel:

Local/90116434555770 at outbound

which would do the whole failover thing for you.

Note that this is slightly simplified.  The jumping behaviour has now been
changed and will require the 'j' option in the latest versions unless you use
gotoif and check the dialstatus.

Normally you'd want to connect the originated call with an extension/context
so that once that number answers it is connected to say an agent or an
application.  This part should be pretty self explanatory.

Make sense now?  Feel free to ask if it doesn't!

:)

-- 
Cheers,

Matt Riddell
_______________________________________________

http://www.sineapps.com/news.php (Daily Asterisk News - html)
http://www.sineapps.com/rssfeed.php (Daily Asterisk News - rss)



More information about the asterisk-users mailing list