[Freeswitch-users] Hangup not detected after fifo
aam-003 at cox.net
aam-003 at cox.net
Sat Jun 23 21:23:07 MSD 2012
I am having issues with calls not being terminated correctly - FS doesn't seem to notice when the call is hang up.
Here is my scenario:
Extension 201 places a call which gets routed as follows:
<extension name="Callback_Start" >
<condition field="caller_id_number" expression="^201$" >
</condition>
<condition field="destination_number" expression="^\+?1([2-9]\d{9})$" break="never" >
<action application="set" data="target_number=+1$1" inline="true"/>
</condition>
<condition field="destination_number" expression="^(?:\+|011)(\d+)$" break="never" >
<action application="set" data="target_number=+$1" inline="true"/>
</condition>
<condition field="${target_number}" expression="^\+\d+$" >
<action application="answer" />
<action application="system" data="/usr/local/freeswitch/bin/my-callback.php ${target_number}" />
<action application="set" data="hangup_after_bridge=true" />
<action application="fifo" data="MY_CALLBACK in" />
</condition>
</extension>
This causes a callback being initiated via external SIP account which then gets processed with the following dial plan:
<extension name="Callback_Answer" >
<condition field="context" expression="public" />
<condition field="${fifo(count MY_CALLBACK)}" expression="^MY_CALLBACK\:[0-9]\:[1-9]" >
<action application="answer" />
<action application="fifo" data="MY_CALLBACK out nowait" />
</condition>
</extension>
Everything works as expected - extension 201 gets connected to the callback and all media is working correctly. However, when extension 201 hangs up, my FS server doesn't seem to realize that that the call is over and the call seems to be hanging around in limbo for another 100 seconds or so.
How can I convince the server to terminate the call as soon as my internal extension hangs up? Is there a better way to achieve this callback scenario instead?
Thanks for any pointers!
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list