[Freeswitch-users] Dialplan handling on call fails

Roger Salloum roger_salloum at shaw.ca
Sat Jun 26 07:53:31 PDT 2010


Hi,

I'm trying to setup a dialplan such that if one particular route fails it will try another.  However, I do not want it to try another route once it had recieved a 180/183 in response from a gateway. I have not been able to determine how to accomplish this.

For Example:

   <condition field="destination_number" expression="^(1000123.*)$" break="never">
       <action application="set" data="hangup_after_bridge=true"/>
	<action application="set" data="continue_on_fail=RECOVER_ON_TIMER_EXPIRE"/>
       <action application="bridge" data="sofia/gateway/carrier1/$1"/>
   </condition>

   <condition field="destination_number" expression="^(1000.*)$" break="never">
       <action application="set" data="hangup_after_bridge=RECOVER_ON_TIMER_EXPIRE"/>
       <action application="bridge" data="sofia/gateway/carrier2/$1"/>
   </condition>

   <condition field="destination_number" expression="^(1.*)$" break="never">
       <action application="set" data="hangup_after_bridge=true"/>
<action application="set" data="continue_on_fail=RECOVER_ON_TIMER_EXPIRE"/>
     <action application="bridge" data="sofia/gateway/carrier3/$1"/>
   </condition>

So when 10001234567 is dialled i will match all 3. I'd like to be able to try 1, if failed, try 2, if failed try 3. All calls go out via an outbound proxy.

Using the above examples if the gateway does not respond in time, the proxy generates a 408 REQUEST TIMEOUT error message. It will then fail out and try the next route. However, when the gateway responds with a 180/183 but there is no answer after 2 minutes the proxy, will generate a 480 NO ANSWER (also tried a 408 REQUEST TIMEOUT ). When Freeswitch receives this message it fails, and then attempts the third failure route. How do i prevent the dialplan from continuing once it has received a 180/183 when no one answers the phone?

Thanks,



More information about the FreeSWITCH-users mailing list