[Freeswitch-users] No reINVITE when bridging two sessions from JavaScript with bypass_media_after_bridge=true

Michael Jerris mike at jerris.com
Tue Feb 9 13:25:35 PST 2010


controlling multiple calls in a script like this is tricky, you need to use the first session to create the second one.  Why are you not just doing an originate to do all of this not even in a js file?  What exactly are you trying to accomplish

Mike

On Feb 5, 2010, at 3:02 PM, Timur Valishev wrote:

> I think we are on the right way) still does not work, but there is hope)
> 
> First of all, this script does not produce any reinvite either (even if replace bypass_media to bypass_media_after_bridge, or set bypass_media only on one channel):
> 
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> session = new Session("{bypass_media=true,ignore_early_media=true,hangup_after_bridge=true}user/1001");
> session2 = new Session("{bypass_media=true,ignore_early_media=true} user/1001");
> bridge(session, session2);
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> 
> BUT! if I run the following script:
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> session = new Session("{bypass_media=true,ignore_early_media=true,hangup_after_bridge=true} user/1001");
> session2 = new Session("{bypass_media=true,ignore_early_media=true}user/1001");
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> 
> And then manually type in the console
> uuid_media off <uuid of my session>
> 
> - then I get the reINVITE!
> 
> BUT! When I try to write it to the script:
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> session = new Session("{bypass_media=true,ignore_early_media=true,hangup_after_bridge=true}sofia/external/timwork at novion.ru");
> session2 = new Session("{bypass_media=true,ignore_early_media=true}sofia/external/timwork at novion.ru");
> bridge(session, session2);
> apiExecute('uuid_media off '+session.uuid); // <-- this line is not executed, because bridge hangs up untill BYE
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> 
> the last line is not executed, because bridge hangs up untill BYE
> 
> Then I've tried to do like this:
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> session = new Session("{bypass_media=true,ignore_early_media=true,hangup_after_bridge=true}user/1001");
> session2 = new Session("{bypass_media=true,ignore_early_media=true}user/1001");
> 
> session.setAutoHangup(false)
> session2.setAutoHangup(false)
> 
> apiExecute("uuid_bridge "+session.uuid+" "+session2.uuid);
> apiExecute('uuid_media off '+session.uuid);
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> 
> But sessions do not get bridged -( Even if I insert session.ready() after each call.
> 
> Any ideas on how to call the functions correctly to get the reINVITE?
> 
> Best regards,
> Timur Valishev
> 
> 2010/2/5 Brian West <brian at freeswitch.org>
> set it inside each of the {} for each session you create its not set after the fact the call is up already...  you're setting it too late.
> 
> you an also issue uuid_media off <uuid>
> 
> /b
> 
> On Feb 5, 2010, at 2:18 AM, Timur Valishev wrote:
> 
>> I've modified my script to make sure: <<<<<<<<<<<<<<<<<<<<<<<<<<<<,
>> session = new Session(
>> "{ignore_early_media=true,hangup_after_bridge=true}sofia/external/timwork at novion.ru"
>> );
>> session2 = new Session(
>> "{ignore_early_media=true}sofia/external/timwork at novion.ru"
>> );
>> session.setVariable('bypass_media', 'true');
>> session2.setVariable('bypass_media', 'true');
>> bridge(session, session2);
> 
> 
> _______________________________________________
> 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/20100209/41bcb5e4/attachment-0002.html 


More information about the FreeSWITCH-users mailing list