[Freeswitch-users] simple originate / bridge js

paparoga at mailinator.com paparoga at mailinator.com
Wed Jul 8 07:41:40 PDT 2009


Hi all,

I'm attempting to setup a simple alarm handling machine.

It should be triggered by an external event, dial a phone number (depending on 
the alarm type), and play a few wav files indicating the failure happened.

Using Free, up to now, I've created a simple IVR and connected it to my EXT. 
118.

Connecting a softphone to the ext. 1001 and dialing the ext 118 the IVR is ok.

Also using the following Free command from the console all is ok:

originate sofia/zz.xxx.200.29/1001 118

My softphone at ext 1001 get ringed and then connected to the IVR at ext. 118.

I cannot get the same from a simple js.

I tried:
=====================================
session = new Session("sofia/zz.xxx.200.29/1001");
//session = new Session();
//session.originate(session, "sofia/zz.yyy.200.29/118");
session.execute("bridge", "sofia/default/118");
=====================================
and almost all possibles variations, but I'get this result:

2009-07-08 16:23:00 [NOTICE] sofia.c:3220 sofia_handle_sip_i_state() Channel 
[sofia/internal/1001] has been answered
2009-07-08 16:23:00 [WARNING] mod_sofia.c:2495 sofia_outgoing_channel() Cannot 
locate registered user 118 at default
2009-07-08 16:23:00 [NOTICE] mod_sofia.c:2591 sofia_outgoing_channel() Close 
Channel N/A [CS_NEW]

How can I tell to the script that the EXT. 118 is an IVR and not a registered 
USER?

By the way, I attempted also the 'transfer' function, but I get the following:

2009-07-08 16:35:43 [NOTICE] sofia.c:2782 sofia_handle_sip_i_state() 
Ring-Ready sofia/internal/1001!
2009-07-08 16:35:50 [NOTICE] sofia.c:3220 sofia_handle_sip_i_state() Channel 
[sofia/internal/1001] has been answered
2009-07-08 16:35:50 [NOTICE] switch_ivr.c:1343 switch_ivr_session_transfer() 
Transfer sofia/internal/1001 to XML[sofia/default/118 at default]
2009-07-08 16:35:50 [NOTICE] mod_spidermonkey.c:2994 session_destroy() Hangup 
sofia/internal/1001 [CS_ROUTING] [NORMAL_CLEARING]
2009-07-08 16:35:50 [NOTICE] switch_core_session.c:970 
switch_core_session_thread() Session 8 (sofia/internal/1001) Ended
2009-07-08 16:35:50 [NOTICE] switch_core_session.c:972 
switch_core_session_thread() Close Channel sofia/internal/1001 [CS_HANGUP]


Any suggestion?

Regards

Kowalsky




More information about the FreeSWITCH-users mailing list