[Freeswitch-users] session-api - How to continue with A-leg after bridge-timeout?
Christian Benke
benkokakao at gmail.com
Fri Mar 9 20:21:09 MSK 2012
On 9 March 2012 17:05, João Mesquita <jmesquita at freeswitch.org> wrote:
> I honest believe that you won't be able to accomplish what you want like
> that. I don't think you can modify the core state machine from a script and
> by the time you get the control back on the script, the channel is already
> gone because of the att_xfer inner working…
Hmm, what i don't understand - when i rebuild the same route-logic in
XML, the initiating channel is not hung up but continues the steps in
the extension it has been transfered to - which is exactly what i'm
trying to achieve. See attached XML-dialplan.
Can someone with a better understand of the core_state_machine please
shed some light on this?
Regards,
Christian
-------------- next part --------------
<?xml version="1.0" encoding="utf-8"?>
<include>
<context name="default">
<X-PRE-PROCESS cmd="include" data="nxo/*.xml"/>
<extension name="test1">
<condition field="destination_number" expression="810">
<action application="send_display" data="Hello world"/>
<action application="log" data="WARNING TEST1 for UUID ${uuid}, src ${caller_id_number}, dest ${destination_number}"/>
<action application="sleep" data="1000"/>
<action application="log" data="WARNING TEST2 for UUID ${uuid}, src ${caller_id_number}, dest ${destination_number}"/>
<action application="sleep" data="1000"/>
<action application="log" data="WARNING TEST3 for UUID ${uuid}, src ${caller_id_number}, dest ${destination_number}"/>
<action application="sleep" data="1000"/>
<action application="bridge" data="[leg_timeout=10][origination_caller_id_number=10]user/20@${domain_name}"/>
<action application="log" data="WARNING TEST4 for UUID ${uuid}, src ${caller_id_number}, dest ${destination_number}"/>
<action application="sleep" data="1000"/>
<action application="log" data="WARNING TEST5 for UUID ${uuid}, src ${caller_id_number}, dest ${destination_number}"/>
<action application="sleep" data="1000"/>
<action application="log" data="WARNING TEST6 for UUID ${uuid}, src ${caller_id_number}, dest ${destination_number}"/>
<action application="sleep" data="1000"/>
</condition>
</extension>
<extension name="test3">
<condition field="destination_number" expression="820">
<action application="log" data="WARNING TEST1 for UUID ${uuid}, src ${caller_id_number}, dest ${destination_number}"/>
<action application="sleep" data="1000"/>
<action application="log" data="WARNING TEST2 for UUID ${uuid}, src ${caller_id_number}, dest ${destination_number}"/>
<action application="sleep" data="1000"/>
<action application="log" data="WARNING TEST3 for UUID ${uuid}, src ${caller_id_number}, dest ${destination_number}"/>
<action application="sleep" data="1000"/>
<action application="bridge" data="[leg_timeout=10][origination_caller_id_number=10]user/20@${domain_name}"/>
<action application="log" data="WARNING TEST4 for UUID ${uuid}, src ${caller_id_number}, dest ${destination_number}"/>
<action application="sleep" data="1000"/>
<action application="log" data="WARNING TEST5 for UUID ${uuid}, src ${caller_id_number}, dest ${destination_number}"/>
<action application="sleep" data="1000"/>
<action application="log" data="WARNING TEST6 for UUID ${uuid}, src ${caller_id_number}, dest ${destination_number}"/>
<action application="sleep" data="1000"/>
</condition>
</extension>
<extension name="test2">
<condition field="destination_number" expression="830">
<action application="log" data="WARNING TEST1 for UUID ${uuid}, src ${caller_id_number}, dest ${destination_number}"/>
<action application="sleep" data="1000"/>
<action application="log" data="WARNING TEST2 for UUID ${uuid}, src ${caller_id_number}, dest ${destination_number}"/>
<action application="sleep" data="1000"/>
<action application="log" data="WARNING TEST3 for UUID ${uuid}, src ${caller_id_number}, dest ${destination_number}"/>
<action application="sleep" data="1000"/>
<action application="bridge" data="[leg_timeout=10][origination_caller_id_number=10]user/30@${domain_name}"/>
<action application="log" data="WARNING TEST4 for UUID ${uuid}, src ${caller_id_number}, dest ${destination_number}"/>
<action application="sleep" data="1000"/>
<action application="log" data="WARNING TEST5 for UUID ${uuid}, src ${caller_id_number}, dest ${destination_number}"/>
<action application="sleep" data="1000"/>
<action application="log" data="WARNING TEST6 for UUID ${uuid}, src ${caller_id_number}, dest ${destination_number}"/>
<action application="sleep" data="1000"/>
</condition>
</extension>
</include>
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list