Not sure about using ESL, but here&#39;s an example on how to do it with Lua:<div><br></div><div><a href="http://wiki.freeswitch.org/wiki/Bridging_two_calls_with_retry">http://wiki.freeswitch.org/wiki/Bridging_two_calls_with_retry</a><br>

<br></div><div>Simplifying the code on that example though, here are the basics:</div><div><br></div><div><div>session1 = freeswitch.Session(ostr1);</div><div>if (session1:ready()) then</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>-- Set ringback</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>session1:setVariable(&quot;ringback&quot;, &quot;%(2000,4000,440,480)&quot;);</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>session2 = freeswitch.Session(ostr2, session1);</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>if (session2:ready()) then</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>freeswitch.bridge(session1, session2);</div><div><br></div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>-- Hangup session2 if session1 is over</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>if (session2:ready()) then session2:hangup(); end</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>end</div><div><span class="Apple-tab-span" style="white-space:pre">        </span></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>-- hangup when done</div>
<div>    if (session1:ready()) then session1:hangup(); end</div><div>end</div></div><div><br><br></div><div>ostr1 and ostr2 should be your dialstrings, something like: {ignore_early_media=true,originate_timeout=90,hangup_after_bridge=true}sofia/gateway/yourgateway/phonenumber</div>
<div><br></div><div><br><div class="gmail_quote">On Wed, Feb 3, 2010 at 12:19 AM, Michael S  Collins <span dir="ltr">&lt;<a href="mailto:msc@freeswitch.org">msc@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;">
Try the transfer_ringback var. Check the wiki for details.<br>
-MC<br>
<br>
Sent from my iPhone<br>
<br>
On Feb 2, 2010, at 5:27 PM, Max Bridgewater<br>
<div><div></div><div class="h5">&lt;<a href="mailto:max.bridgewater@gmail.com">max.bridgewater@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Hi,<br>
&gt;<br>
&gt; I&#39;m trying to place a call to A and then bridge it to B. The problem<br>
&gt; I&#39;m having right now is that after A answers and while dialing B is<br>
&gt; being dialed or rining, I want to send A a ringing tone. I don&#39;t<br>
&gt; succeed in doing this. No tone/ringback is being sent to A.  Here is<br>
&gt; what i did using ESL:<br>
&gt;<br>
&gt;  api originate {ringback=\&#39;%(400,200,400,450);<br>
&gt; %(400,2200,400,450)\&#39;,transfer_ringback=\&#39;%(400,200,400,450);<br>
&gt; %(400,2200,400,450)\&#39;,origination_caller_id_number=4156781020}sofia/<br>
&gt; gateway/voipms/4152309090 &amp;park()<br>
&gt;<br>
&gt; To bridge, I then send the message:<br>
&gt;<br>
&gt; sendmsg e9dae14c-e473-466e-9d65-704e36a82e5f<br>
&gt; call-command: execute<br>
&gt; execute-app-name: bridge<br>
&gt; execute-app-arg: {{ringback=\&#39;%(400,200,400,450);<br>
&gt; %(400,2200,400,450\&#39;},origination_caller_id_number=4152309090 }sofia/<br>
&gt; gateway/voipms/4156781020<br>
&gt;<br>
&gt; any idea?<br>
&gt;<br>
&gt; Max.<br>
</div></div><div><div></div><div class="h5">&gt; _______________________________________________<br>
&gt; FreeSWITCH-users mailing list<br>
&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-</a><br>
&gt; users<br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<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>
</div></div></blockquote></div><br></div>