Dear colleagues, The task is to start two sessions from JS script and then bridge them in no-media mode. Unfirtunately, FreeSwitch does not reINVITE the peers after bridging. Here is my script: SCRIPT #1 - 'callback-session.js' <<<<<<<<<<<<<<<<<<<<<<<<<< session = new Session("{bypass_media_after_bridge=true,ignore_early_media=true,hangup_after_bridge=true}user/1001"); session2 = new Session("{ignore_early_media=true}user/1001"); bridge(session, session2);
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Then I run this script from the freeswitch console: freeswitch@internal> jsrun callback-session.js And there is no re-invites between peers, peers get connected and the traffic goes through FS BUT!!! Here is another scipt: SCRIPT #2 - 'callback-bridge.js' <<<<<<<<<<<<<<<<<<<<<<<<<< session = new Session("{bypass_media_after_bridge=true,continue_on_fail=true,ignore_early_media=true}user/1001"); session.execute("bridge","{ignore_early_media=false,originate_timeout=90}user/1001");
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
When I run this script, FreeSwitch successfuly sends reINVITES to both users after bridge, so they exchange media directly, not through FS. In my task, I need to have control when B-leg establishes (to start billing correctly), so I need to get the first scenario working. What I've already tried and did not succeed: 1) set bypass_media=true, on A leg only, on B leg only, on both legs 2) set bypass_media_after_bridge=true, on A leg only, on B leg only, on both legs Is there something I do wrong in the first script? What should I do to make FS reINVITE peers? Many thanks in advance! Best regards, Timur Valishev sip:tim@novion.ru