[Freeswitch-users] simple originate / bridge js

Anthony Minessale anthony.minessale at gmail.com
Wed Jul 8 09:40:11 PDT 2009


in the first example you are transferring to 118
in the script you are calling a sip address but you are not supplying the
domain

try
var my_domain = "1.2.3.4"
session.execute("bridge", "sofia/default/118%" + my_domain);

where you set my_domain to whatever domain your phone registered with.



On Wed, Jul 8, 2009 at 9: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?
>
> 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
>
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> 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:anthony_minessale at hotmail.com <MSN%3Aanthony_minessale at hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com<PAYPAL%3Aanthony.minessale at gmail.com>
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org <sip%3A888 at conference.freeswitch.org>
iax:guest at conference.freeswitch.org/888
googletalk:conf+888 at conference.freeswitch.org<googletalk%3Aconf%2B888 at conference.freeswitch.org>
pstn:213-799-1400
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090708/7dc0ff01/attachment-0002.html 


More information about the FreeSWITCH-users mailing list