[Freeswitch-users] failover with mod_lcr. how to set failover reasons with | in bridge ?

Yuriy Nasida nasida at live.ru
Fri Dec 23 15:43:35 MSK 2011


Hello list.I have same issue and wondering if nobody still have not solution. In general  I have possibility not to use the bridge with "|" but this issue looks strange. 
Anyone?

I am still wondering if there is a documented/undocumented reason why continue_on_fail does not work with piped failover?

From: Ivan Kovacevic [mailto:ivank at rogers.com] 
Sent: June-09-11 4:38 PM
To: 'freeswitch-users at lists.freeswitch.org'
Subject: continue_on_fail failover with mod_lcr

Hi Everyone,

I would like to implement fail-over for my outbound gateway, but I would like to be able to pick certain cause codes which qualify
to stop trying next gateway (specifically when I have bad number and I am getting sip:404 NO_ROUTE_DESTINATION, UNALLOCATED_NUMBER).I was using 1.0.6, but I moved to the newest git about month ago.

After searching through lists and spending several hours playing with continue_to_fail, failure_causes and fail_on_single_reject I
was able to make it work by specifying  cause codes for which I want to fail-over and omitting ones that qualify to stop trying next gateway in variable continue_to_fail:
So this setup is working for me and in the case I have bad number and x.x.x.x returns sip:404 (NO_ROUTE_DESTINATION or
UNALLOCATED_NUMBER) it is not trying y.y.y.y gateway.

<include>
  <extension name="myextension">
    <condition field="destination_number" expression="^(01144\d+)$">
      <action application="set"
data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,SERVICE_NOT_IMPLEMENTED,CALL_RE
JECTED,NO_USER_RESPONSE,EXCHANGE_ROUTING_ERROR,INCOMPATIBLE_DESTINATION,NETWORK_OUT_OF_ORDER,RECOVERY_ON_TIMER_EXPIRE"/>
       <action application="bridge" data="sofia/myprofile/$1 at x.x.x.x"/>
       <action application="bridge" data="sofia/myprofile/$1 at y.y.y.y"/>
       <action application="bridge" data="sofia/myprofile/$1 at z.z.z.z"/>
    </condition>
  </extension>
</include>

However if I want to use "|" between my gateways - and the example below is not working. And no matter what x.x.x.x returns - it
will try y.y.y.y  and eventually z.z.z.z.

<action application="set"
data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,SERVICE_NOT_IMPLEMENTED,CALL_RE
JECTED,NO_USER_RESPONSE,EXCHANGE_ROUTING_ERROR,INCOMPATIBLE_DESTINATION,NETWORK_OUT_OF_ORDER,RECOVERY_ON_TIMER_EXPIRE"/>
<action application="bridge"
data="sofia/myprofile/$1 at x.x.x.x|sofia/myprofile/$1 at y.y.y.y|sofia/myprofile/$1 at z.z.z.z"/>

Unfortunately, we have to use pipe for fail-over since we are using mod_lcr to choose between outbound gateways.

Any suggestions? 

Thanks,
Ivan 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20111223/62153d0d/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list