[Freeswitch-users] how to detect if gateway down ?

Tihomir Culjaga tculjaga at gmail.com
Thu Sep 16 01:06:28 PDT 2010

> On 14 September 2010 13:37, rentmycoder rentmycoder <rentmycoder at gmail.com
> > wrote:
>> Ahoy guys, FS rocks!
>> I'm trying to dial out on a gateway and send call into different
>> dialplan based on if it gets bridged or not.
>> I do:
>> bgapi originate {api_hangup_hook='lua
>> predictive_noanswer.lua',ignore_early_media=true,hangup_after_bridge=true,continue_on_fail=false,bypass_media=false}sofia/gateway/gwname/phoneno
>> '&lua(predictive_bridge.lua)'
>> This works, but when the gatway is down, the channel has not been
>> created, so neither script gets called...
>> [ERR] switch_ivr_originate.c:2430 Cannot create outgoing channel of
>> type [sofia] cause: [NETWORK_OUT_OF_ORDER]
>> I can add a second gateway to try if first is down and send the call
>> to dialplan extension using loopback, like:
>> ... }sofia/gateway/gwname/phoneno,loopback/gw_error/default/XML 'lua(...
>> and add a gw_error extension to the dialplan, but how to get the
>> originate disposition of the first call, eg: NETWORK_OUT_OF_ORDER???
<param name="ping" value="25"/>

this pings the remote GW with SIP OPTIONS and if no response, it marks it
You can evaluate the status and originate calls towards a working GW.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100916/eccc0692/attachment.html 

More information about the FreeSWITCH-users mailing list