Not sure about using ESL, but here'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("ringback", "%(2000,4000,440,480)");</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"><<a href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>></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"><<a href="mailto:max.bridgewater@gmail.com">max.bridgewater@gmail.com</a>> wrote:<br>
<br>
> Hi,<br>
><br>
> I'm trying to place a call to A and then bridge it to B. The problem<br>
> I'm having right now is that after A answers and while dialing B is<br>
> being dialed or rining, I want to send A a ringing tone. I don't<br>
> succeed in doing this. No tone/ringback is being sent to A. Here is<br>
> what i did using ESL:<br>
><br>
> api originate {ringback=\'%(400,200,400,450);<br>
> %(400,2200,400,450)\',transfer_ringback=\'%(400,200,400,450);<br>
> %(400,2200,400,450)\',origination_caller_id_number=4156781020}sofia/<br>
> gateway/voipms/4152309090 &park()<br>
><br>
> To bridge, I then send the message:<br>
><br>
> sendmsg e9dae14c-e473-466e-9d65-704e36a82e5f<br>
> call-command: execute<br>
> execute-app-name: bridge<br>
> execute-app-arg: {{ringback=\'%(400,200,400,450);<br>
> %(400,2200,400,450\'},origination_caller_id_number=4152309090 }sofia/<br>
> gateway/voipms/4156781020<br>
><br>
> any idea?<br>
><br>
> Max.<br>
</div></div><div><div></div><div class="h5">> _______________________________________________<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-" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-</a><br>
> users<br>
> <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>