[Freeswitch-users] simple originate / bridge js

Michael Collins msc at freeswitch.org
Wed Jul 8 09:48:08 PDT 2009


On Wed, Jul 8, 2009 at 7:41 AM, <paparoga at 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 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?


It looks like 118 is defined in your dialplan so use transfer instead of
bridge:
 session.execute("transfer", "118 XML default");

-MC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090708/eb3464bb/attachment-0002.html 


More information about the FreeSWITCH-users mailing list