Answering my own question, parking the call with &quot;uuid_transfer &lt;uuid&gt; -both &#39;park&#39; inline&quot; first keeps the other leg busy and things won&#39;t hang up.<br><br>-Anders<br><br><div class="gmail_quote">
On Wed, Mar 3, 2010 at 4:53 PM, Anders Brownworth <span dir="ltr">&lt;<a href="mailto:abrownworth@bandwidth.com">abrownworth@bandwidth.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello fellow FreeSWITCH users,<br><br>I&#39;m using FreeSWITCH Version 1.0.trunk (16883) and I&#39;m using the event socket to break an in-progress call into two independently controlled legs. I want to be able to work with each leg completely independently - hanging up one without affecting the other. Per the docs: <a href="http://wiki.freeswitch.org/wiki/Mod_commands#uuid_transfer" target="_blank">http://wiki.freeswitch.org/wiki/Mod_commands#uuid_transfer</a> I&#39;m using uuid_transfer with an inline lua script to work with one leg without hanging up on the other. I&#39;m setting &quot;hangup_after_bridge&quot; to false on both channels and invoking uuid_transfer with the -bleg option but as soon as I transfer, FreeSWITCH hangs up on one of the legs.<br>

<br>Here&#39;s what I&#39;m sending on the event socket. (everything gets an &quot;OK&quot; response from FreeSWITCH)<br><br>Set hangup_after_bridge:<br><br><br>api uuid_setvar 53d37581-1f90-44bf-860a-addbc8430e3a hangup_after_bridge false<br>

api uuid_setvar 9d1a4f2d-2ce6-40e5-ac84-62ad8c2d4654 hangup_after_bridge false<br>
<br>And then do the uuid_transfer:<br><br>api uuid_transfer 53d37581-1f90-44bf-860a-addbc8430e3a -bleg &#39;lua:callee.lua&#39; inline<br>
api uuid_transfer 9d1a4f2d-2ce6-40e5-ac84-62ad8c2d4654 -bleg
&#39;lua:caller.lua&#39; inline<br>
<br>
The callee leg (53d37581-1f90-44bf-860a-addbc8430e3a) is immediately hung up and the caller leg runs fine. Here&#39;s the log messages: (6505551212 is the caller and 5165551212 is the callee)<br><br>2010-03-03 21:29:56.086319 [DEBUG] switch_ivr.c:1441 (sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a>) State Change CS_EXECUTE -&gt; CS_ROUTING<br>

2010-03-03 21:29:56.086319 [DEBUG] switch_core_session.c:1018 Send signal sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a> [BREAK]<br>2010-03-03 21:29:56.086319 [DEBUG] switch_core_session.c:638 Send signal sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a> [BREAK]<br>

2010-03-03 21:29:56.086319 [NOTICE] switch_ivr.c:1447 Transfer sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a> to inline[lua:callee.lua@public]<br>2010-03-03 21:29:56.092461 [DEBUG] switch_core_session.c:638 Send signal sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a> [BREAK]<br>

2010-03-03 21:29:56.092461 [DEBUG] switch_ivr_bridge.c:565 BRIDGE THREAD DONE [sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a>]<br>2010-03-03 21:29:56.092461 [DEBUG] switch_ivr_bridge.c:585 Send signal sofia/external/+15165551212 [BREAK]<br>

2010-03-03 21:29:56.092461 [DEBUG] switch_rtp.c:1626 Send middle packet for [1] ts=91040 dur=1760/1760/2440 seq=7493<br>2010-03-03 21:29:56.092461 [DEBUG] switch_core_session.c:638 Send signal sofia/external/+15165551212 [BREAK]<br>

2010-03-03 21:29:56.092461 [DEBUG] switch_ivr_bridge.c:565 BRIDGE THREAD DONE [sofia/external/+15165551212]<br>2010-03-03 21:29:56.092461 [DEBUG] switch_ivr_bridge.c:585 Send signal sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a> [BREAK]<br>

2010-03-03 21:29:56.092461 [NOTICE] switch_ivr_bridge.c:637 Hangup sofia/external/+15165551212 [CS_EXCHANGE_MEDIA] [NORMAL_CLEARING]<br>2010-03-03 21:29:56.092461 [DEBUG] switch_channel.c:2071 Send signal sofia/external/+15165551212 [KILL]<br>

2010-03-03 21:29:56.092461 [DEBUG] switch_core_session.c:1018 Send signal sofia/external/+15165551212 [BREAK]<br>2010-03-03 21:29:56.092461 [DEBUG] switch_core_state_machine.c:351 (sofia/external/+15165551212) State EXCHANGE_MEDIA going to sleep<br>

2010-03-03 21:29:56.092461 [DEBUG] switch_core_state_machine.c:314 (sofia/external/+15165551212) Running State Change CS_HANGUP<br>2010-03-03 21:29:56.092461 [DEBUG] switch_core_state_machine.c:499 (sofia/external/+15165551212) State HANGUP<br>

2010-03-03 21:29:56.092461 [DEBUG] mod_sofia.c:411 Channel sofia/external/+15165551212 hanging up, cause: NORMAL_CLEARING<br>2010-03-03 21:29:56.092461 [DEBUG] mod_sofia.c:454 Sending BYE to sofia/external/+15165551212<br>

2010-03-03 21:29:56.092461 [DEBUG] switch_core_state_machine.c:46 sofia/external/+15165551212 Standard HANGUP, cause: NORMAL_CLEARING<br>2010-03-03 21:29:56.092461 [DEBUG] switch_core_state_machine.c:499 (sofia/external/+15165551212) State HANGUP going to sleep<br>

2010-03-03 21:29:56.092461 [DEBUG] switch_core_state_machine.c:333 (sofia/external/+15165551212) State Change CS_HANGUP -&gt; CS_REPORTING<br>2010-03-03 21:29:56.092461 [DEBUG] switch_core_session.c:1018 Send signal sofia/external/+15165551212 [BREAK]<br>

2010-03-03 21:29:56.092461 [DEBUG] switch_core_state_machine.c:314 (sofia/external/+15165551212) Running State Change CS_REPORTING<br>2010-03-03 21:29:56.093481 [DEBUG] switch_core_state_machine.c:590 (sofia/external/+15165551212) State REPORTING<br>

2010-03-03 21:29:56.093481 [DEBUG] switch_core_state_machine.c:348 (sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a>) State EXECUTE going to sleep<br>2010-03-03 21:29:56.093481 [DEBUG] switch_core_state_machine.c:314 (sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a>) Running State Change CS_ROUTING<br>

2010-03-03 21:29:56.093481 [DEBUG] switch_core_state_machine.c:341 (sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a>) State ROUTING<br>2010-03-03 21:29:56.093481 [DEBUG] mod_sofia.c:140 sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a> SOFIA ROUTING<br>

2010-03-03 21:29:56.093481 [DEBUG] switch_core_state_machine.c:77 sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a> Standard ROUTING<br>2010-03-03 21:29:56.093481 [DEBUG] switch_core_state_machine.c:119 (sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a>) State Change CS_ROUTING -&gt; CS_EXECUTE<br>

2010-03-03 21:29:56.093481 [DEBUG] switch_core_session.c:1018 Send signal sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a> [BREAK]<br>2010-03-03 21:29:56.093481 [DEBUG] switch_core_state_machine.c:341 (sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a>) State ROUTING going to sleep<br>

2010-03-03 21:29:56.093481 [DEBUG] switch_core_state_machine.c:314 (sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a>) Running State Change CS_EXECUTE<br>2010-03-03 21:29:56.093481 [DEBUG] switch_core_state_machine.c:348 (sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a>) State EXECUTE<br>

2010-03-03 21:29:56.093481 [DEBUG] mod_sofia.c:226 sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a> SOFIA EXECUTE<br>2010-03-03 21:29:56.093481 [DEBUG] switch_core_state_machine.c:157 sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a> Standard EXECUTE<br>

EXECUTE sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a> lua(callee.lua)<br>2010-03-03 21:29:56.095544 [DEBUG] switch_core_state_machine.c:53 sofia/external/+15165551212 Standard REPORTING, cause: NORMAL_CLEARING<br>

2010-03-03 21:29:56.095544 [DEBUG] switch_core_state_machine.c:590 (sofia/external/+15165551212) State REPORTING going to sleep<br>2010-03-03 21:29:56.095544 [DEBUG] switch_core_state_machine.c:327 (sofia/external/+15165551212) State Change CS_REPORTING -&gt; CS_DESTROY<br>

2010-03-03 21:29:56.095544 [DEBUG] switch_core_session.c:1018 Send signal sofia/external/+15165551212 [BREAK]<br>2010-03-03 21:29:56.095544 [DEBUG] switch_core_session.c:1161 Session 24 (sofia/external/+15165551212) Locked, Waiting on external entities<br>

2010-03-03 21:29:56.095544 [NOTICE] switch_core_session.c:1179 Session 24 (sofia/external/+15165551212) Ended<br>2010-03-03 21:29:56.095544 [NOTICE] switch_core_session.c:1181 Close Channel sofia/external/+15165551212 [CS_DESTROY]<br>

2010-03-03 21:29:56.095544 [DEBUG] switch_core_state_machine.c:428 (sofia/external/+15165551212) Running State Change CS_DESTROY<br>2010-03-03 21:29:56.095544 [DEBUG] switch_core_state_machine.c:439 (sofia/external/+15165551212) State DESTROY<br>

2010-03-03 21:29:56.095544 [DEBUG] mod_sofia.c:338 sofia/external/+15165551212 SOFIA DESTROY<br>2010-03-03 21:29:56.095544 [DEBUG] switch_core_state_machine.c:60 sofia/external/+15165551212 Standard DESTROY<br>2010-03-03 21:29:56.095544 [DEBUG] switch_core_state_machine.c:439 (sofia/external/+15165551212) State DESTROY going to sleep<br>

2010-03-03 21:29:56.127189 [DEBUG] switch_ivr.c:1441 (sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a>) State Change CS_EXECUTE -&gt; CS_ROUTING<br>2010-03-03 21:29:56.127189 [DEBUG] switch_core_session.c:1018 Send signal sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a> [BREAK]<br>

2010-03-03 21:29:56.127189 [DEBUG] switch_core_session.c:638 Send signal sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a> [BREAK]<br>2010-03-03 21:29:56.127189 [NOTICE] switch_ivr.c:1447 Transfer sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a> to inline[lua:caller.lua]<br>

2010-03-03 21:29:56.875077 [DEBUG] switch_core_media_bug.c:360 Attaching BUG to sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a><br>2010-03-03 21:29:56.909780 [DEBUG] switch_core_media_bug.c:442 Removing BUG from sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a><br>

2010-03-03 21:29:56.910802 [ERR] inline:1  Session is not active!<br>2010-03-03 21:29:56.910802 [DEBUG] switch_core_state_machine.c:348 (sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a>) State EXECUTE going to sleep<br>

2010-03-03 21:29:56.910802 [DEBUG] switch_core_state_machine.c:314 (sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a>) Running State Change CS_ROUTING<br>2010-03-03 21:29:56.910802 [DEBUG] switch_core_state_machine.c:341 (sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a>) State ROUTING<br>

2010-03-03 21:29:56.910802 [DEBUG] mod_sofia.c:140 sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a> SOFIA ROUTING<br>2010-03-03 21:29:56.910802 [DEBUG] switch_core_state_machine.c:77 sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a> Standard ROUTING<br>

2010-03-03 21:29:56.910802 [DEBUG] switch_core_state_machine.c:119 (sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a>) State Change CS_ROUTING -&gt; CS_EXECUTE<br>2010-03-03 21:29:56.910802 [DEBUG] switch_core_session.c:1018 Send signal sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a> [BREAK]<br>

2010-03-03 21:29:56.910802 [DEBUG] switch_core_state_machine.c:341 (sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a>) State ROUTING going to sleep<br>2010-03-03 21:29:56.910802 [DEBUG] switch_core_state_machine.c:314 (sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a>) Running State Change CS_EXECUTE<br>

2010-03-03 21:29:56.910802 [DEBUG] switch_core_state_machine.c:348 (sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a>) State EXECUTE<br>2010-03-03 21:29:56.910802 [DEBUG] mod_sofia.c:226 sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a> SOFIA EXECUTE<br>

2010-03-03 21:29:56.910802 [DEBUG] switch_core_state_machine.c:157 sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a> Standard EXECUTE<br>EXECUTE sofia/external/+<a href="mailto:16505551212@192.168.27.72" target="_blank">16505551212@192.168.27.72</a> lua(caller.lua)<br>

2010-03-03 21:29:56.911830 [NOTICE] switch_cpp.cpp:1142 *********** Caller.lua - Success: 53d37581-1f90-44bf-860a-addbc8430e3a ***********<br>2010-03-03 21:29:56.911830 [ERR] switch_core_session.c:357 Could not locate channel type 53d37581-1f90-44bf-860a-addbc8430e3a<br>

2010-03-03 21:29:56.911830 [ERR] switch_ivr_originate.c:2389 Cannot create outgoing channel of type [53d37581-1f90-44bf-860a-addbc8430e3a] cause: [CHAN_NOT_IMPLEMENTED]<br>2010-03-03 21:29:56.911830 [DEBUG] switch_ivr_originate.c:3187 Originate Resulted in Error Cause: 66 [CHAN_NOT_IMPLEMENTED]<br>

2010-03-03 21:29:56.911830 [ERR] switch_cpp.cpp:618 session is not initalized<br>2010-03-03 21:29:57.032095 [DEBUG] switch_ivr_play_say.c:1156 Codec Activated L16@8000hz 1 channels 20ms<br><br>How can I get the callee leg to stay up? Is this not what -bleg is supposed to do? Am I doing something wrong here? I&#39;ve tried parking both legs and invoking the lua on the channels but one of the channels still drops and the uuid is no-longer available in the event socket.<br>

<br>Is there some other preferred way to split a call apart?<br>
<br>Thanks.<br><font color="#888888"><br>-Anders<br><br>
</font></blockquote></div><br>