Did you ever try it =D<br>because yes that should work. Constructor takes either a uuid string or a originate string.<br><br><br><br><div class="gmail_quote">On Thu, Oct 23, 2008 at 6:02 AM, Birgit Arkesteijn <span dir="ltr"><<a href="mailto:birgit@westhawk.co.uk">birgit@westhawk.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
<br>
Just a thought ... is there a way in javascript to (re)create a session<br>
object given an existing uuid?<br>
<br>
If that was the case, I could do something like:<br>
var session = new Session (uuid);<br>
session.bridge(customer_service_url);<br>
<br>
If that's not possible, I appreciate any thought about my current setup.<br>
<br>
Thanks, Birgit<br>
<div><div></div><div class="Wj3C7c"><br>
On 23/10/08 11:43, Birgit Arkesteijn wrote:<br>
> Hi,<br>
><br>
> Thanks Anthony for your response.<br>
> Unfortunately removing the 'kick' didn't make a difference.<br>
><br>
> The result is also different if I change the order of the UUIDs around.<br>
> In one scenario I get [NORMAL_CLEARING], in the other<br>
> [DESTINATION_OUT_OF_ORDER].<br>
><br>
> I added the code (again) and 2 snippets of the freeswitch.log below.<br>
><br>
> Does anyone have an alternative?<br>
><br>
> Thanks, Birgit<br>
><br>
><br>
> Current code:<br>
><br>
> function bridge_to_customer_services(conf_name, member_id, uuid,<br>
> customer_service_url)<br>
> {<br>
> if (uuid)<br>
> {<br>
> var sSession = new<br>
> Session("{ignore_early_media=true,originate_timeout=10}"<br>
> + customer_service_url);<br>
> var ready = sSession.ready();<br>
> log("customer services answered: " + ready);<br>
> if (ready == true)<br>
> {<br>
> // The customer services call has been answered<br>
> argument = sSession.uuid + " " + uuid;<br>
> var res = apiExecute("uuid_bridge", argument);<br>
> log("after apiExecute uuid_bridge: " + res);<br>
> }<br>
> }<br>
> }<br>
><br>
> When I set argument as:<br>
> argument = sSession.uuid + " " + uuid;<br>
><br>
> I see the following in the freeswitch log:<br>
><br>
> (<br>
> sofia/external/0663: is the 'new' customer services call,<br>
> sofia/external/0662: is the call in the conference<br>
> )<br>
><br>
> 2008-10-23 11:27:05 [NOTICE] switch_channel.c:534<br>
> switch_channel_set_name() New Channel sofia/external/0663<br>
> [23638bbc-a0ed-11dd-843a-d9638db44114]<br>
> 2008-10-23 11:27:05 [NOTICE] sofia.c:1786 sofia_handle_sip_i_state()<br>
> Ring-Ready sofia/external/0663!<br>
> 2008-10-23 11:27:08 [NOTICE] sofia.c:2110 sofia_handle_sip_i_state()<br>
> Channel [sofia/external/0663] has been answered<br>
> 2008-10-23 11:27:08 [INFO] dispatcher_general.js:70 console_log()<br>
> customer services answered: true<br>
> 2008-10-23 11:27:08 [INFO] dispatcher_general.js:70 console_log() after<br>
> apiExecute uuid_bridge: +OK 20f309de-a0ed-11dd-843a-d9638db44114<br>
><br>
> 2008-10-23 11:27:08 [NOTICE] mod_spidermonkey.c:2860 session_destroy()<br>
> Hangup sofia/external/0663 [CS_RESET] [NORMAL_CLEARING]<br>
> 2008-10-23 11:27:08 [INFO] dispatcher_general.js:70 console_log() after<br>
> cSession in conf<br>
> 2008-10-23 11:27:08 [NOTICE] mod_spidermonkey.c:2860 session_destroy()<br>
> Hangup sofia/external/0662 [CS_RESET] [NORMAL_CLEARING]<br>
> 2008-10-23 11:27:08 [NOTICE] switch_core_session.c:802<br>
> switch_core_session_thread() Session 6 (sofia/external/0663) Ended<br>
> 2008-10-23 11:27:08 [NOTICE] switch_core_session.c:804<br>
> switch_core_session_thread() Close Channel sofia/external/0663 [CS_HANGUP]<br>
> 2008-10-23 11:27:08 [NOTICE] switch_core_session.c:802<br>
> switch_core_session_thread() Session 5 (sofia/external/0662) Ended<br>
> 2008-10-23 11:27:08 [NOTICE] switch_core_session.c:804<br>
> switch_core_session_thread() Close Channel sofia/external/0662 [CS_HANGUP]<br>
><br>
><br>
><br>
> When I set argument as:<br>
> argument = uuid + " " + sSession.uuid;<br>
><br>
><br>
> I see the following in the freeswitch log:<br>
><br>
> 2008-10-23 11:35:00 [NOTICE] switch_channel.c:534<br>
> switch_channel_set_name() New Channel sofia/external/0663<br>
> [3ea7fdd0-a0ee-11dd-843a-d9638db44114]<br>
> 2008-10-23 11:35:00 [NOTICE] sofia.c:1786 sofia_handle_sip_i_state()<br>
> Ring-Ready sofia/external/0663!<br>
> 2008-10-23 11:35:03 [NOTICE] sofia.c:2110 sofia_handle_sip_i_state()<br>
> Channel [sofia/external/0663] has been answered<br>
> 2008-10-23 11:35:03 [INFO] dispatcher_general.js:70 console_log()<br>
> customer services answered: true<br>
> 2008-10-23 11:35:03 [INFO] dispatcher_general.js:70 console_log() after<br>
> apiExecute uuid_bridge: +OK 3ea7fdd0-a0ee-11dd-843a-d9638db44114<br>
><br>
> 2008-10-23 11:35:03 [NOTICE] mod_spidermonkey.c:2860 session_destroy()<br>
> Hangup sofia/external/0663 [CS_RESET] [NORMAL_CLEARING]<br>
> 2008-10-23 11:35:03 [NOTICE] switch_ivr_bridge.c:484<br>
> uuid_bridge_on_soft_execute() Hangup sofia/external/0662<br>
> [CS_SOFT_EXECUTE] [DESTINATION_OUT_OF_ORDER]<br>
> 2008-10-23 11:42:21 [INFO] dispatcher_general.js:70 console_log()<br>
> consumer consumer_hungup(): cSession hangup HOOK, name:<br>
> sofia/external/0662, uuid: 42e859d4-a0ef-11dd-843a-d9638db44114, state:<br>
> CS_HANGUP, cause: DESTINATION_OUT_OF_ORDER<br>
> 2008-10-23 11:35:03 [INFO] dispatcher_general.js:70 console_log() after<br>
> apiExecute conference:<br>
> 2008-10-23 11:35:03 [INFO] dispatcher_general.js:70 console_log() after<br>
> cSession in conf<br>
> 2008-10-23 11:35:03 [NOTICE] switch_core_session.c:802<br>
> switch_core_session_thread() Session 8 (sofia/external/0663) Ended<br>
> 2008-10-23 11:35:03 [NOTICE] switch_core_session.c:804<br>
> switch_core_session_thread() Close Channel sofia/external/0663 [CS_HANGUP]<br>
> 2008-10-23 11:35:03 [NOTICE] switch_core_session.c:802<br>
> switch_core_session_thread() Session 7 (sofia/external/0662) Ended<br>
> 2008-10-23 11:35:03 [NOTICE] switch_core_session.c:804<br>
> switch_core_session_thread() Close Channel sofia/external/0662 [CS_HANGUP]<br>
><br>
><br>
><br>
> On 22/10/08 18:54, Anthony Minessale wrote:<br>
>> try skipping the kick<br>
>> if you call uuid_bridge on a session who is busy doing something he will<br>
>> be warped to your bridge anyway.<br>
><br>
<br>
--<br>
-- Birgit Arkesteijn, <a href="mailto:birgit@westhawk.co.uk">birgit@westhawk.co.uk</a>,<br>
-- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK<br>
-- Company no: 1769350<br>
-- Registered Office:<br>
-- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK.<br>
-- tel.: +44 (0)161 237 0660<br>
-- <URL: <a href="http://www.westhawk.co.uk" target="_blank">http://www.westhawk.co.uk</a>><br>
<br>
_______________________________________________<br>
Freeswitch-users mailing list<br>
<a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
<br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400<br>