how to detect if gateway down ?
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???
On 9/14/2010 8:37 AM, rentmycoder rentmycoder 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.
Is there some special reason you need to know if the gateway is down? Have you tried just a simple pipe bridge? <action application="bridge" data="sofia/gateway/flowroute/1$2|sofia/gateway/vitelity_fs/1$2"/> -- Andrew Thompson http://aktzero.com/
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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
On 14 September 2010 13:37, rentmycoder rentmycoder <rentmycoder@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???
sip_profile/some_profile/your_gateway.xml <param name="ping" value="25"/> this pings the remote GW with SIP OPTIONS and if no response, it marks it down... You can evaluate the status and originate calls towards a working GW.
participants (4)
-
Andrew Thompson
-
rentmycoder rentmycoder
-
Steven Ayre
-
Tihomir Culjaga