[Freeswitch-users] continue_on_fail and hangup_after_bridge with transfer
Vladimir Elizarov
xengelpublicx at gmail.com
Sat Jun 19 15:42:44 PDT 2010
I'm trying to make a dialplan:
<extension name="Long Dial">
<condition field="destination_number"
expression="^(^([0-9]{10})$|^([0-9]{11})$|^([0-9]{12})$|^\+([0-9]{11})$)$">
<action application="set" data="hangup_after_bridge=true"/>
<action application="set" data="failure_causes=TIMEOUT,NO_ROUTE_DESTINATION"/>
<action application="set"
data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,TIMEOUT,NO_ROUTE_DESTINATION"/>
<action application="set" data="auto_hunt=true"/>
<action application="set" data="real_dialed_number=7777777"/>
</condition>
<condition field="destination_number" expression="^(79|89)(\d{9})$"
break="on-true">
<action application="set"
data="dtmf=WWWWWWWWWWWWWWWWWWWWW111222#WWWWWW89$2#@100"/>
<action application="bridge"
data="sofia/gateway/gw1/89$2|sofia/gateway/gw2/89$2|sofia/gateway/gw3/89$2"/>
<action application="transfer" data="to_card"/>
</condition>
</extension>
<extension name="to_card">
<condition field="destination_number" expression="^to_card$">
<action application="bridge"
data="{execute_on_answer=send_dtmf\s${dtmf}}sofia/internal/${real_dialed_number}@192.168.50.53:5061"/>
</condition>
</extension>
The logic of his work: if unavailable ilti gateway to the next. if not
available all the gateway to go to the extension transfer. A problem
arises when user_busy on the phone:
------------------------------------------------------------------------
SIP/2.0 486 Busy Here
Via: SIP/2.0/UDP 192.168.50.11:5080;rport;branch=z9hG4bK1X4r00t93KmFg
From: "Vladimir Elizarov"
<sip:0000xxxx at xx.xx.xx.xx;transport=udp>;tag=yj15KpSQvK6eF
To: <sip:8931237xxxx at xx.xx.xx.xx>;tag=2a5549004a431d10ff00001a646aff45
Call-ID: 1317949e-f694-122d-8fb6-00163efcbed2
CSeq: 132374757 INVITE
Server: MERA MSIP v.1.0.2
Reason: Q.850;cause=17;text="User busy"
Content-Length: 0
instead of making hangup, dialplan is going to transfer. Constant
despite continue_on_fail = NORMAL_TEMPORARY_FAILURE, TIMEOUT,
NO_ROUTE_DESTINATION" What's the problem?
freeswitch 1.0.6 (git 19 june 2010)
--
Best regards, Vladimir Elizarov
More information about the FreeSWITCH-users
mailing list