Brian, <div><br></div><div>Thanks for the reply.  </div><div>The problem is I don&#39;t want the two parties to speak to each other. I want one party to wait on hold while the system interacts with the other party. Then the system will hang-up on the second party and start interacting with the first party again.</div>
<div><br></div><div>Thanks,</div><div>Adam</div><div><br><br><div class="gmail_quote">On Thu, Feb 4, 2010 at 10:23 PM, Brian West <span dir="ltr">&lt;<a href="mailto:brian@freeswitch.org">brian@freeswitch.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word"><div>I wouldn&#39;t do it like that...</div><div><br></div><div>I would let FreeSWITCH do what its good at and stop trying to create and manage sessions manually.</div>
<div><br></div><div><div>-- You can optionally answer but you need to set transfer_ringback instead of ringback.</div><div>session:setVariable(&quot;ringback&quot;, &quot;local_stream://moh&quot;);                                                                                                          </div>
<div>session:setVariable(&quot;ignore_early_media&quot;, &quot;true&quot;);                                                                                                              </div><div>session:execute(&quot;bridge&quot;,&quot;user/1007&quot;);  </div>
<div><br></div><div>Which can also be expressed in pure XML as such:</div><div><br></div><div><div>&lt;extension name=&quot;1234&quot;&gt;</div><div>  &lt;condition field=&quot;destination_number&quot; expression=&quot;^1234$&quot;&gt;                                                                                                </div>
<div>    &lt;action application=&quot;set&quot; data=&quot;ringback=local_stream://moh&quot;/&gt;</div><div>    &lt;action application=&quot;set&quot; data=&quot;ignore_early_media=true&quot;/&gt;</div><div>    &lt;action application=&quot;bridge&quot; data=&quot;user/1007&quot;/&gt;</div>
<div>  &lt;/condition&gt;</div><div>&lt;/extension&gt;</div><div><br></div><div>There is really no need to do this with Lua.  The XML dialplan can do some VERY complex things once you wrap your head around it.</div><div><br>
</div><div>In addition I would recommend you get the latest 1.0.5 build <a href="http://files-sync.freeswitch.org/windows_installer/" target="_blank">http://files-sync.freeswitch.org/windows_installer/</a>  Its tagged as 1.0.4 and shouldn&#39;t be.</div>
<div><br></div></div></div><font color="#888888"><div>/b</div></font><div><div></div><div class="h5"><div><br></div><div><br></div><div><br><div><div>On Feb 4, 2010, at 8:48 PM, Adam Wilt wrote:</div><br><blockquote type="cite">
Hi all,<div><br></div><div>I want to park an inbound call and play hold music while I simultaneously place another outbound call.<div>But the hold music doesn&#39;t play while the lua script is placing the second call. When the lua script ends, the hold music finally starts. </div>
<div>Here&#39;s my example code:</div><div><br></div></div><blockquote style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:40px;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-width:initial;border-color:initial;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px">
<div><div><div><span style="background-color:rgb(255, 255, 255)"><font color="#000099">#!/usr/local/bin/lua</font></span></div></div></div><div><div><div><span style="background-color:rgb(255, 255, 255)"><font color="#000099">   </font></span></div>
</div></div><div><div><div><span style="background-color:rgb(255, 255, 255)"><font color="#000099">session:answer()</font></span></div></div></div><div><div><div><span style="background-color:rgb(255, 255, 255)"><font color="#000099">api = freeswitch.API()</font></span></div>
</div></div><div><div><div><span style="background-color:rgb(255, 255, 255)"><font color="#000099">api:executeString(&quot;bgapi uuid_park &quot; .. tostring(session.uuid))</font></span></div></div></div><div><div><div><span style="background-color:rgb(255, 255, 255)"><font color="#000099">api:executeString(&quot;bgapi uuid_broadcast &quot; .. tostring(session.uuid)  .. &quot; /freeswitch/sounds/music/8000/danza-espanola-op-37-h-142-xii-arabesca.wav&quot;)</font></span></div>
</div></div><div><div><div><span style="background-color:rgb(255, 255, 255)"><font color="#000099">local new_session = freeswitch.Session(&quot;sofia/gateway/myprovider/15555555555&quot;)</font></span></div></div></div></blockquote>
<div><div><div><br></div><div>So it seems like the script is blocking the original session, despite the fact that I&#39;m using bgapi.  I&#39;d really appreciate if somebody could help me with this.</div><div><br></div><div>
By the way, I&#39;m using FreeSWITCH 1.0.4 in Windows.</div><div><br></div><div>Thanks,</div><div>Adam</div></div></div></blockquote></div><br></div></div></div></div><br>_______________________________________________<br>

FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>