[Freeswitch-users] Connecting RTP between leg A and B directly
Regis M
regis.freeswitch.org at tornad.net
Fri Nov 9 10:00:45 MSK 2012
Hi,
You must try to execute the api command uuid_media by setting a variable
that coupled with an event.
Try looking at the execute_on family :
http://wiki.freeswitch.org/wiki/Channel_Variables#The_execute_on_family
In your case, I think
http://wiki.freeswitch.org/wiki/Variable_api_on_answer
or
api_after_bridge... maybe more but not documented :).
or
bridge_pre_execute_bleg_app
All this variable/event handler can help you to run command outside script.
but, i think the uuid_media off must be called after the media up this FS.
Hope it helps.
2012/11/9 Víctor Vladimir Chávez Gallardo <vivlachaga at gmail.com>
> Hi Regis, how you doing?
>
> see, i tried your suggestion, setting the uuid_media on both sessions
> AFTER the bridge, also seting bypass_media_after_bridge = true in the call
> parameters, if i put the apiExecute, the script is stalled on bridge action
> until one leg trigger up an release code.. in that moment the instructions
> apiExecute("uuid_media","off") are executed (the script flow continue), but
> if i put those instructions BEFORE, i have an a forced release on leg A
> "inline:1 Session is not active!"
>
> you know something about this issue? there's something wrong with my app
> logic? will be very useffuly your help, thanks a lot
>
> originate_options_lega =
> "bypass_media_after_bridge=true,ignore_early_media=true,origination_caller_id_number=1004,originate_timeout=60,leg=1";
> originate_options_legb =
> "bypass_media_after_bridge=true,ignore_early_media=true,originate_timeout=60,leg=2";
>
> bridge(lega_session,legb_session);
> apiExecute("uuid_media", "off " +
> lega_uuid);
> apiExecute("uuid_media", "off " +
> legb_uuid);
>
>
> Hi,
> IMHO, variables are used only in bridge in dialplan.
> When doing bridge manualy via JS, you must call api uuid_media off
> <uuid> after the bridge of the call, maybe with an execute_on_brigde
> variable.
> Take care that your A and B legs can "see" each other without funky nat,
> uuid_media not renegociate RTP port.
> Hope i'm right and it helps you ;)
> regards
>
>
> 2012/11/7 Víctor Vladimir Chávez Gallardo <vivlachaga at gmail.com>
>
> Hi, i have an spidermonkey script, the script place two outbound calls,
> but i need to set the RTP directly between the legs (a-b) but i dont know
> hoy to set the parameter bypass_media
>
> i tried:
>
> lega_session.setVariable('bypass_media', 'true');
>
> bridge(lega_session,legb_session);
>
> also
>
> lega_session.setVariable('bypass_media', 'true');
>
> legb_session.setVariable('bypass_media', 'true');
>
> bridge(lega_session,legb_session);
>
> and also setting another variable bypass_media_after_bridge
>
> lega_session.setVariable('bypass_media_after_bridge', 'true');
>
> legb_session.setVariable('bypass_media_after_bridge', 'true');
>
> lega_session.setVariable('bypass_media', 'true');
>
> legb_session.setVariable('bypass_media', 'true');
>
> bridge(lega_session,legb_session);
>
>
> but i dont have the RTP in the correct way, instead my freeswitch it's
> behind, the rtp flow: LEG-A -----> FREESWITCH -------> LEG-B
>
> any idea?
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20121109/0ecc6623/attachment-0001.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list