Did you ever try it =D<br>because yes that should work.&nbsp; 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">&lt;<a href="mailto:birgit@westhawk.co.uk">birgit@westhawk.co.uk</a>&gt;</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&#39;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>
&gt; Hi,<br>
&gt;<br>
&gt; Thanks Anthony for your response.<br>
&gt; Unfortunately removing the &#39;kick&#39; didn&#39;t make a difference.<br>
&gt;<br>
&gt; The result is also different if I change the order of the UUIDs around.<br>
&gt; In one scenario I get [NORMAL_CLEARING], in the other<br>
&gt; [DESTINATION_OUT_OF_ORDER].<br>
&gt;<br>
&gt; I added the code (again) and 2 snippets of the freeswitch.log below.<br>
&gt;<br>
&gt; Does anyone have an alternative?<br>
&gt;<br>
&gt; Thanks, Birgit<br>
&gt;<br>
&gt;<br>
&gt; Current code:<br>
&gt;<br>
&gt; function bridge_to_customer_services(conf_name, member_id, uuid,<br>
&gt; customer_service_url)<br>
&gt; {<br>
&gt; &nbsp; &nbsp; &nbsp;if (uuid)<br>
&gt; &nbsp; &nbsp; &nbsp;{<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var sSession = new<br>
&gt; Session(&quot;{ignore_early_media=true,originate_timeout=10}&quot;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+ customer_service_url);<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var ready = sSession.ready();<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;log(&quot;customer services answered: &quot; + ready);<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (ready == true)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// The customer services call has been answered<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;argument = sSession.uuid + &quot; &quot; + uuid;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var res = apiExecute(&quot;uuid_bridge&quot;, argument);<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;log(&quot;after apiExecute uuid_bridge: &quot; + res);<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
&gt; &nbsp; &nbsp; &nbsp;}<br>
&gt; }<br>
&gt;<br>
&gt; When I set argument as:<br>
&gt; argument = sSession.uuid + &quot; &quot; + uuid;<br>
&gt;<br>
&gt; I see the following in the freeswitch log:<br>
&gt;<br>
&gt; (<br>
&gt; sofia/external/0663: is the &#39;new&#39; customer services call,<br>
&gt; sofia/external/0662: is the call in the conference<br>
&gt; )<br>
&gt;<br>
&gt; 2008-10-23 11:27:05 [NOTICE] switch_channel.c:534<br>
&gt; switch_channel_set_name() New Channel sofia/external/0663<br>
&gt; [23638bbc-a0ed-11dd-843a-d9638db44114]<br>
&gt; 2008-10-23 11:27:05 [NOTICE] sofia.c:1786 sofia_handle_sip_i_state()<br>
&gt; Ring-Ready sofia/external/0663!<br>
&gt; 2008-10-23 11:27:08 [NOTICE] sofia.c:2110 sofia_handle_sip_i_state()<br>
&gt; Channel [sofia/external/0663] has been answered<br>
&gt; 2008-10-23 11:27:08 [INFO] dispatcher_general.js:70 console_log()<br>
&gt; customer services answered: true<br>
&gt; 2008-10-23 11:27:08 [INFO] dispatcher_general.js:70 console_log() after<br>
&gt; apiExecute uuid_bridge: +OK 20f309de-a0ed-11dd-843a-d9638db44114<br>
&gt;<br>
&gt; 2008-10-23 11:27:08 [NOTICE] mod_spidermonkey.c:2860 session_destroy()<br>
&gt; Hangup sofia/external/0663 [CS_RESET] [NORMAL_CLEARING]<br>
&gt; 2008-10-23 11:27:08 [INFO] dispatcher_general.js:70 console_log() after<br>
&gt; cSession in conf<br>
&gt; 2008-10-23 11:27:08 [NOTICE] mod_spidermonkey.c:2860 session_destroy()<br>
&gt; Hangup sofia/external/0662 [CS_RESET] [NORMAL_CLEARING]<br>
&gt; 2008-10-23 11:27:08 [NOTICE] switch_core_session.c:802<br>
&gt; switch_core_session_thread() Session 6 (sofia/external/0663) Ended<br>
&gt; 2008-10-23 11:27:08 [NOTICE] switch_core_session.c:804<br>
&gt; switch_core_session_thread() Close Channel sofia/external/0663 [CS_HANGUP]<br>
&gt; 2008-10-23 11:27:08 [NOTICE] switch_core_session.c:802<br>
&gt; switch_core_session_thread() Session 5 (sofia/external/0662) Ended<br>
&gt; 2008-10-23 11:27:08 [NOTICE] switch_core_session.c:804<br>
&gt; switch_core_session_thread() Close Channel sofia/external/0662 [CS_HANGUP]<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; When I set argument as:<br>
&gt; argument = uuid + &quot; &quot; + sSession.uuid;<br>
&gt;<br>
&gt;<br>
&gt; I see the following in the freeswitch log:<br>
&gt;<br>
&gt; 2008-10-23 11:35:00 [NOTICE] switch_channel.c:534<br>
&gt; switch_channel_set_name() New Channel sofia/external/0663<br>
&gt; [3ea7fdd0-a0ee-11dd-843a-d9638db44114]<br>
&gt; 2008-10-23 11:35:00 [NOTICE] sofia.c:1786 sofia_handle_sip_i_state()<br>
&gt; Ring-Ready sofia/external/0663!<br>
&gt; 2008-10-23 11:35:03 [NOTICE] sofia.c:2110 sofia_handle_sip_i_state()<br>
&gt; Channel [sofia/external/0663] has been answered<br>
&gt; 2008-10-23 11:35:03 [INFO] dispatcher_general.js:70 console_log()<br>
&gt; customer services answered: true<br>
&gt; 2008-10-23 11:35:03 [INFO] dispatcher_general.js:70 console_log() after<br>
&gt; apiExecute uuid_bridge: +OK 3ea7fdd0-a0ee-11dd-843a-d9638db44114<br>
&gt;<br>
&gt; 2008-10-23 11:35:03 [NOTICE] mod_spidermonkey.c:2860 session_destroy()<br>
&gt; Hangup sofia/external/0663 [CS_RESET] [NORMAL_CLEARING]<br>
&gt; 2008-10-23 11:35:03 [NOTICE] switch_ivr_bridge.c:484<br>
&gt; uuid_bridge_on_soft_execute() Hangup sofia/external/0662<br>
&gt; [CS_SOFT_EXECUTE] [DESTINATION_OUT_OF_ORDER]<br>
&gt; 2008-10-23 11:42:21 [INFO] dispatcher_general.js:70 console_log()<br>
&gt; consumer consumer_hungup(): cSession hangup HOOK, name:<br>
&gt; sofia/external/0662, uuid: 42e859d4-a0ef-11dd-843a-d9638db44114, state:<br>
&gt; CS_HANGUP, cause: DESTINATION_OUT_OF_ORDER<br>
&gt; 2008-10-23 11:35:03 [INFO] dispatcher_general.js:70 console_log() after<br>
&gt; apiExecute conference:<br>
&gt; 2008-10-23 11:35:03 [INFO] dispatcher_general.js:70 console_log() after<br>
&gt; cSession in conf<br>
&gt; 2008-10-23 11:35:03 [NOTICE] switch_core_session.c:802<br>
&gt; switch_core_session_thread() Session 8 (sofia/external/0663) Ended<br>
&gt; 2008-10-23 11:35:03 [NOTICE] switch_core_session.c:804<br>
&gt; switch_core_session_thread() Close Channel sofia/external/0663 [CS_HANGUP]<br>
&gt; 2008-10-23 11:35:03 [NOTICE] switch_core_session.c:802<br>
&gt; switch_core_session_thread() Session 7 (sofia/external/0662) Ended<br>
&gt; 2008-10-23 11:35:03 [NOTICE] switch_core_session.c:804<br>
&gt; switch_core_session_thread() Close Channel sofia/external/0662 [CS_HANGUP]<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On 22/10/08 18:54, Anthony Minessale wrote:<br>
&gt;&gt; try skipping the kick<br>
&gt;&gt; if you call uuid_bridge on a session who is busy doing something he will<br>
&gt;&gt; be warped to your bridge anyway.<br>
&gt;<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>
-- &lt;URL: <a href="http://www.westhawk.co.uk" target="_blank">http://www.westhawk.co.uk</a>&gt;<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>