[Freeswitch-users] Problems with Originate
Anthony Minessale
anthony.minessale at gmail.com
Sat Feb 14 09:19:50 PST 2009
are you running this as a dialplan app?
session is a reserved variable name for the session you executed the app on.
are you using an alternate name for your new session like my_session
etc....?
this works for me, try it yourself.
var my_session = new Session("sofia/external/7003 at conference.freeswitch.org
");
consoleLog("err", "ready: " + my_session.ready() + "\n");
On Sat, Feb 14, 2009 at 7:17 AM, Nik Middleton <
nik.middleton at noblesolutions.co.uk> wrote:
> Understood.
>
>
>
> However, using the second method, how can I trap on call failure?
>
>
>
> If I originate a call and the user is busy, the console reports this fact,
> but then the script continues to execute
>
>
>
> if (session.ready()) {
>
> console_log("notice","Session result=[" +
> session.cause + "] \n");
>
> if (session.cause == "USER_BUSY") {
>
> Disposition =
> "BUSY";
>
> session.Hangup();
>
> }
>
> In this case session.cause reports 'NONE' and what's surprising is that
> even though the call failed (busy) session.ready returns a true value.
> ------------------------------
>
> *From:* freeswitch-users-bounces at lists.freeswitch.org [mailto:
> freeswitch-users-bounces at lists.freeswitch.org] *On Behalf Of *Anthony
> Minessale
> *Sent:* 13 February 2009 13:55
> *To:* freeswitch-users at lists.freeswitch.org
> *Subject:* Re: [Freeswitch-users] Problems with Originate
>
>
>
> The first way is deprecated and will be removed.
> The 2nd way is the correct way.
>
> On Fri, Feb 13, 2009 at 5:48 AM, Alexandru Nedelcu <alex at sinapticode.ro>
> wrote:
>
> On Fri, 2009-02-13 at 13:33 +0200, Alexandru Nedelcu wrote:
> > The problem with this setup is that origination_caller_id_number doesn't
> > work from inside the JS file (when calling session.originate).
>
> I just discovered something interesting.
>
> When originating the call like this ...
> session = new Session("<connection_string>")
> instead of this ...
> session = new Session(); session.originate("<connection_string>")
>
> ... then it works. Is this some kind of bug, or what's the difference
> here?
>
>
> Thanks,
>
> --
> Alexandru Nedelcu
> Software Developer, Sinapticode
>
>
>
> _______________________________________________
> 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
>
> _______________________________________________
> 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/20090214/4592692a/attachment-0002.html
More information about the FreeSWITCH-users
mailing list