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

Steven Ayre steveayre at gmail.com
Tue Sep 14 07:55:52 PDT 2010


 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???

Each call will generate its own B-leg CDR. The A-leg can only see the result
of the leg it was bridged with (the successful one).

-Steve


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???
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100914/6ff1a5cd/attachment.html 


More information about the FreeSWITCH-users mailing list