dslreports logo
 
    All Forums Hot Topics Gallery
spc
Search similar:


uniqs
415
kaila
join:2000-10-11
Lincolnshire, IL

kaila

Member

[Asterisk] Extension failover question....

I'm traveling and won't be able to login for a bit. I have a savvy client who is looking for advice setting up failover to a mobile if his extension is unreachable. His server is vanilla 11.x asterisk on a hosted box outside his network, his extension is an IP-SIP phone and I'm almost positive 'qualify=yes' in sip.conf.

This might have to wait until I can get time, but I'll send him a link to this thread. I think using either a call to 'DEVICE_STATE' or 'EXTENSION_STATE' wrapped in a GotoIf would get him there:

...GotoIf($["${DEVICE_STATE(SIP/1111)}" = "UNKNOWN"]?failover-context,s,1) or ...GotoIf($["${EXTENSION_STATE(SIP/1111)}" = "UNKNOWN"]?failover-context,s,1)

But I'm not sure on this...... thanks for any input!

arpawocky
Premium Member
join:2014-04-13
Columbus, OH

1 recommendation

arpawocky

Premium Member

Way easier than that:

Just add a second Dial() after the first. If the first fails (either because it is offline, or even if he just doest pick up), asterisk will fail over to the second..

eg:
same => n,Dial(SIP/1111)
same => n,Dial(SIP/SomeProvider/12125551212)
 
kaila
join:2000-10-11
Lincolnshire, IL

kaila

Member

Thanks arpawocky that's a great solution. The simple solutions are usually the best, but this one's a real tinkerer.....

He ended up using a GotoIf device status = 'UNAVAILABLE', and a simple failover context to ring his mobile. He tested and it's working.