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