you also have to set<br>session.setAutoHangup(0);<br><br>or it will hangup as soon as it exits the script.<br><br><br><div class="gmail_quote">On Wed, Jul 8, 2009 at 3:15 PM,  <span dir="ltr">&lt;<a href="mailto:paparoga@mailinator.com">paparoga@mailinator.com</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;">First of all I apologise for my long post.<br>
<br>
In the meantime I reworked the simple js as suggested (adding the domain or<br>
using transfer instead of bridge) but yet the script doesn&#39;t work.<br>
<br>
Let me add some other info.<br>
<br>
I just cloned the &#39;5000&#39; demo_ivr and reworked a little to reach my target.<br>
<br>
Next I added:<br>
<br>
 &lt;!-- a sample IVR  --&gt;<br>
    &lt;extension name=&quot;ivr_demo_alarm&quot;&gt;<br>
      &lt;condition field=&quot;destination_number&quot; expression=&quot;^118$&quot;&gt;<br>
        &lt;action application=&quot;answer&quot;/&gt;<br>
        &lt;action application=&quot;sleep&quot; data=&quot;2000&quot;/&gt;<br>
        &lt;action application=&quot;ivr&quot; data=&quot;demo_ivr_alarm&quot;/&gt;<br>
      &lt;/condition&gt;<br>
    &lt;/extension&gt;<br>
<br>
into the default.xml dialplan.<br>
<br>
Now all is ok if I connect Ekiga to FreeSwitch as user 1001 (for example) and<br>
than I dial &#39;118&#39;.<br>
<br>
The IVR works fine.<br>
<br>
Next from the console:<br>
<br>
originate sofia/my.freeswitch.address/1001 118<br>
<br>
I get my Ekiga Phone ringing and connecter to the ext. 118 (the ivr)<br>
<br>
That is the log:<br>
=========================================================<br>
originate sofia/<a href="http://10.0.0.33/1001" target="_blank">10.0.0.33/1001</a> 118<br>
<br>
2009-07-08 21:56:57 [NOTICE] switch_channel.c:567 switch_channel_set_name()<br>
New Channel sofia/internal/1001 [7e660b20-6bf9-11de-b2fa-f3963e050c84]<br>
2009-07-08 21:56:57 [NOTICE] sofia.c:2782 sofia_handle_sip_i_state()<br>
Ring-Ready sofia/internal/1001!<br>
2009-07-08 21:57:00 [NOTICE] sofia.c:3220 sofia_handle_sip_i_state() Channel<br>
[sofia/internal/1001] has been answered<br>
2009-07-08 21:57:00 [NOTICE] switch_ivr.c:1343 switch_ivr_session_transfer()<br>
Transfer sofia/internal/1001 to XML[118@default]<br>
API CALL [originate(sofia/<a href="http://10.0.0.33/1001" target="_blank">10.0.0.33/1001</a> 118)] output:<br>
+OK 7e660b20-6bf9-11de-b2fa-f3963e050c84<br>
<br>
freeswitch@Linux61&gt; 2009-07-08 21:57:00 [INFO] mod_dialplan_xml.c:233<br>
dialplan_hunt() Processing FreeSWITCH-&gt;118 in context default<br>
2009-07-08 21:57:02 [WARNING] switch_core_file.c:119<br>
switch_core_perform_file_open() Sample rate doesn&#39;t match<br>
2009-07-08 21:57:15 [WARNING] switch_core_file.c:119<br>
switch_core_perform_file_open() Sample rate doesn&#39;t match<br>
2009-07-08 21:57:21 [NOTICE] sofia.c:3279 sofia_handle_sip_i_state() Hangup<br>
sofia/internal/1001 [CS_EXECUTE] [NORMAL_CLEARING]<br>
2009-07-08 21:57:25 [NOTICE] switch_core_session.c:970<br>
switch_core_session_thread() Session 33 (sofia/internal/1001) Ended<br>
2009-07-08 21:57:25 [NOTICE] switch_core_session.c:972<br>
switch_core_session_thread() Close Channel sofia/internal/1001 [CS_HANGUP]<br>
====================================================<br>
<br>
Using the js instead it looks like if the bridge commands looks for a<br>
REGISTERED user at ext. 118, and so it fails.<br>
<br>
Using the transfer option, as suggested, the Ekiga user (1001) get to be<br>
connected to the ext 118, bur the connection drops immediately after.<br>
<br>
====================================================<br>
freeswitch@Linux61&gt; jsrun alarm.js<br>
API CALL [jsrun(alarm.js)] output:<br>
OK<br>
<br>
freeswitch@Linux61&gt; 2009-07-08 22:03:47 [NOTICE] switch_channel.c:567<br>
switch_channel_set_name() New Channel sofia/internal/1001<br>
[7267f936-6bfa-11de-b2fa-f3963e050c84]<br>
2009-07-08 22:03:47 [NOTICE] sofia.c:2782 sofia_handle_sip_i_state()<br>
Ring-Ready sofia/internal/1001!<br>
2009-07-08 22:03:51 [NOTICE] sofia.c:3220 sofia_handle_sip_i_state() Channel<br>
[sofia/internal/1001] has been answered<br>
2009-07-08 22:03:51 [NOTICE] switch_ivr.c:1343 switch_ivr_session_transfer()<br>
Transfer sofia/internal/1001 to XML[118@default]<br>
2009-07-08 22:03:51 [NOTICE] mod_spidermonkey.c:2994 session_destroy() Hangup<br>
sofia/internal/1001 [CS_ROUTING] [NORMAL_CLEARING]<br>
2009-07-08 22:03:51 [NOTICE] switch_core_session.c:970<br>
switch_core_session_thread() Session 35 (sofia/internal/1001) Ended<br>
2009-07-08 22:03:51 [NOTICE] switch_core_session.c:972<br>
switch_core_session_thread() Close Channel sofia/internal/1001 [CS_HANGUP]<br>
==================================================<br>
<br>
May be I&#39;m on the wrong way, but this is my target:<br>
<br>
1) From the external Perl freeswitch interface call a simple js<br>
2) Make this script dial a sip/pstn phone number at the assistance location<br>
3) Connect the just dialled assistance location to the IVR at ext 118 and let<br>
the support people hear some info about the raising fault.<br>
<br>
Thanks in advance for any suggestion.<br>
<br>
<br>
<br>
Roberto<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>
</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>