I'm trying to fake a ringback for leg1 of a two-legged call without success. I'm doing this with a JS script, originating one leg first, then the second and executing the bridge application on both afterwards. I would like to fake a ringback on the first call while they wait for the second call to connect. I tried originating the call and then setting the ringback (like the example here: http://wiki.freeswitch.org/wiki/Custom_Ring_Back_Tones), and I also tried setting the ringback in the originate command, but none of those worked. I even tried using the variable instant_ringback, but it didn't work either. This is the code for the first case: ostr = "{ignore_early_media=true,originate_timeout=90,hangup_after_bridge=false,medularis_uuid="+uuid+",c2c_call=true,api_call=true,leg=1}[leg_timeout="+timeout+"]sofia/gateway/mygw/123456789"; session1 = new Session(ostr); if (session1.ready()) { session1.execute("set","instant_ringback=%(2000,4000,440.0,480.0)"); } And this is the originate string for the second case: var stUsRing = "%(2000,4000,440,480)"; ostr = "{ignore_early_media=true,originate_timeout=90,hangup_after_bridge=false,ringback='"+stUsRing+"',medularis_uuid="+uuid+",c2c_call=true,api_call=true,leg=1}[leg_timeout="+timeout+"]sofia/gateway/mygw/123456789"; Thanks for your help! Nico
Not that I'm aware. On Fri, Jan 8, 2010 at 11:41 AM, Brian West <brian@freeswitch.org> wrote:
Are you using proxy media?
/b
On Jan 7, 2010, at 11:33 PM, Nicolas Brenner wrote:
I'm trying to fake a ringback for leg1 of a two-legged call without success.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
I'm using the default dialplan. On Fri, Jan 8, 2010 at 4:02 PM, Nicolas Brenner <nicolas@medularis.com> wrote:
Not that I'm aware.
On Fri, Jan 8, 2010 at 11:41 AM, Brian West <brian@freeswitch.org> wrote:
Are you using proxy media?
/b
On Jan 7, 2010, at 11:33 PM, Nicolas Brenner wrote:
I'm trying to fake a ringback for leg1 of a two-legged call without success.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
ringback variable must be set on the originating leg (the A leg aka inbound leg of the call) then that channel must be provided as the 2nd arg to the session constructor after the dial string or used with bridge. session.setVariable("ringback", "%(2000,4000,440,480)"); session.execute("bridge", "sofia/internal/foo@bar.com"); or // passing session as the 2nd arg allows the ringback to play on session while session2 is established. session2 = new Session("sofia/internal/foo@bar.com", session); bridge(session, session2); //or whatever On Fri, Jan 8, 2010 at 1:02 PM, Nicolas Brenner <nicolas@medularis.com>wrote:
I'm using the default dialplan.
On Fri, Jan 8, 2010 at 4:02 PM, Nicolas Brenner <nicolas@medularis.com> wrote:
Not that I'm aware.
On Fri, Jan 8, 2010 at 11:41 AM, Brian West <brian@freeswitch.org> wrote:
Are you using proxy media?
/b
On Jan 7, 2010, at 11:33 PM, Nicolas Brenner wrote:
I'm trying to fake a ringback for leg1 of a two-legged call without success.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:+19193869900
Thanks! I thought I was doing exactly the same, but I was creating the 2nd session like this: session2 = new Session(ostr2); // ostr is the corresponding originate command So it was missing the "link" to the first leg. Doing it like this solved it: session2 = new Session(ostr2, session1); Now it works great! On Fri, Jan 8, 2010 at 11:46 PM, Anthony Minessale <anthony.minessale@gmail.com> wrote:
ringback variable must be set on the originating leg (the A leg aka inbound leg of the call) then that channel must be provided as the 2nd arg to the session constructor after the dial string or used with bridge.
session.setVariable("ringback", "%(2000,4000,440,480)"); session.execute("bridge", "sofia/internal/foo@bar.com");
or // passing session as the 2nd arg allows the ringback to play on session while session2 is established. session2 = new Session("sofia/internal/foo@bar.com", session); bridge(session, session2); //or whatever
On Fri, Jan 8, 2010 at 1:02 PM, Nicolas Brenner <nicolas@medularis.com> wrote:
I'm using the default dialplan.
On Fri, Jan 8, 2010 at 4:02 PM, Nicolas Brenner <nicolas@medularis.com> wrote:
Not that I'm aware.
On Fri, Jan 8, 2010 at 11:41 AM, Brian West <brian@freeswitch.org> wrote:
Are you using proxy media?
/b
On Jan 7, 2010, at 11:33 PM, Nicolas Brenner wrote:
I'm trying to fake a ringback for leg1 of a two-legged call without success.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (3)
-
Anthony Minessale
-
Brian West
-
Nicolas Brenner