On Wed, Jul 8, 2009 at 7:41 AM,
<paparoga@mailinator.com> wrote:
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@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?
It looks like 118 is defined in your dialplan so use transfer instead of bridge:
session.execute("transfer", "118 XML default");
-MC