[Freeswitch-users] Ringback after before` Bridge

Nicolas Brenner nicolas at medularis.com
Wed Feb 3 03:11:49 PST 2010


Not sure about using ESL, but here's an example on how to do it with Lua:

http://wiki.freeswitch.org/wiki/Bridging_two_calls_with_retry

Simplifying the code on that example though, here are the basics:

session1 = freeswitch.Session(ostr1);
if (session1:ready()) then
-- Set ringback
session1:setVariable("ringback", "%(2000,4000,440,480)");

session2 = freeswitch.Session(ostr2, session1);
if (session2:ready()) then
freeswitch.bridge(session1, session2);

-- Hangup session2 if session1 is over
if (session2:ready()) then session2:hangup(); end
end
 -- hangup when done
    if (session1:ready()) then session1:hangup(); end
end


ostr1 and ostr2 should be your dialstrings, something like:
{ignore_early_media=true,originate_timeout=90,hangup_after_bridge=true}sofia/gateway/yourgateway/phonenumber


On Wed, Feb 3, 2010 at 12:19 AM, Michael S Collins <msc at freeswitch.org>wrote:

> Try the transfer_ringback var. Check the wiki for details.
> -MC
>
> Sent from my iPhone
>
> On Feb 2, 2010, at 5:27 PM, Max Bridgewater
> <max.bridgewater at gmail.com> wrote:
>
> > Hi,
> >
> > I'm trying to place a call to A and then bridge it to B. The problem
> > I'm having right now is that after A answers and while dialing B is
> > being dialed or rining, I want to send A a ringing tone. I don't
> > succeed in doing this. No tone/ringback is being sent to A.  Here is
> > what i did using ESL:
> >
> >  api originate {ringback=\'%(400,200,400,450);
> > %(400,2200,400,450)\',transfer_ringback=\'%(400,200,400,450);
> > %(400,2200,400,450)\',origination_caller_id_number=4156781020}sofia/
> > gateway/voipms/4152309090 &park()
> >
> > To bridge, I then send the message:
> >
> > sendmsg e9dae14c-e473-466e-9d65-704e36a82e5f
> > call-command: execute
> > execute-app-name: bridge
> > execute-app-arg: {{ringback=\'%(400,200,400,450);
> > %(400,2200,400,450\'},origination_caller_id_number=4152309090 }sofia/
> > gateway/voipms/4156781020
> >
> > any idea?
> >
> > Max.
> > _______________________________________________
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-
> > users
> > http://www.freeswitch.org
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100203/9e7f221e/attachment-0002.html 


More information about the FreeSWITCH-users mailing list