VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
nik.middleton at noble... Guest
|
Posted: Wed Feb 11, 2009 6:42 pm Post subject: [Freeswitch-users] Setting outbound callerid using js |
|
|
Hi Guys
I’m trying to set the outbound caller-id in js. The params seem to be acceptable, except I’m getting the default +000000000 caller-ID sent. Should the below work with js?
session.originate(session,'{accountcode=54321,ignore_early_media=true,origination_caller_id_number=07630600000,originate_timeout=25}sofia/gateway/mygw/01XXXXXXXXXXX');
(this works using lua BTW)
regards |
|
Back to top |
|
|
msc at freeswitch.org Guest
|
Posted: Wed Feb 11, 2009 7:29 pm Post subject: [Freeswitch-users] Setting outbound callerid using js |
|
|
session.originate(session,'{accountcode=54321,ignore_early_media=true,origination_caller_id_number=07630600000,originate_timeout=25}sofia/gateway/mygw/01XXXXXXXXXXX');
Quote: |
(this works using lua BTW)
| hmmmm... how about using "effective_caller_id_number" instead? I think
the JavaScript paradigm is a bit different than the Lua/Perl one. Let
us know if that works or not.
-MC
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org |
|
Back to top |
|
|
anthony.minessale at g... Guest
|
Posted: Fri Feb 13, 2009 9:11 am Post subject: [Freeswitch-users] Setting outbound callerid using js |
|
|
1) session.originate is depricated.
2) the first arg to session.originate is *another* session (not the same one) *or* undefined.....
session.originate(undefined, "<dial string>");
session.originate(a_leg_session, "<dial string>");
session.originate(session, "<dial string>") is asking the session to use itself as it's own a leg which makes no sense.
This is perhaps the 4th time i have seen someone do this, can you point out where this is incorrectly documented?
BTW
effective_caller_id_name/number are variables you set on the A leg so when it's used to generate b legs that var is copied instead.
a_leg_session.setVariable("effective_caller_id_number=1234");
b_leg_session = new Session(a_leg_session, "<dial string>");
which is of course pointless because you never need to create the session if you just use the bridge application.
session.execute("bridge", "<dial string>");
even better just set the dest to a var and exit the script and use that var in your dialplan.
--- contents of get_dest.js ---
session.setVariable("dial_string", "<dial string>");
-- dialplan --
<action application="javascript" data="get_dest.js"/>
<action application="bridge" data="${dial_string}/>
On Wed, Feb 11, 2009 at 6:26 PM, Michael Collins <msc@freeswitch.org (msc@freeswitch.org)> wrote:
--
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400 |
|
Back to top |
|
|
nik.middleton at noble... Guest
|
Posted: Fri Feb 13, 2009 9:17 am Post subject: [Freeswitch-users] Setting outbound callerid using js |
|
|
I think this page (external) is the source
http://alexn.org/docs/dialer.html
Regards,
From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Anthony Minessale
Sent: 13 February 2009 14:06
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] Setting outbound callerid using js
1) session.originate is depricated.
2) the first arg to session.originate is *another* session (not the same one) *or* undefined.....
session.originate(undefined, "<dial string>");
session.originate(a_leg_session, "<dial string>");
session.originate(session, "<dial string>") is asking the session to use itself as it's own a leg which makes no sense.
This is perhaps the 4th time i have seen someone do this, can you point out where this is incorrectly documented?
BTW
effective_caller_id_name/number are variables you set on the A leg so when it's used to generate b legs that var is copied instead.
a_leg_session.setVariable("effective_caller_id_number=1234");
b_leg_session = new Session(a_leg_session, "<dial string>");
which is of course pointless because you never need to create the session if you just use the bridge application.
session.execute("bridge", "<dial string>");
even better just set the dest to a var and exit the script and use that var in your dialplan.
--- contents of get_dest.js ---
session.setVariable("dial_string", "<dial string>");
-- dialplan --
<action application="javascript" data="get_dest.js"/>
<action application="bridge" data="${dial_string}/>
On Wed, Feb 11, 2009 at 6:26 PM, Michael Collins <msc@freeswitch.org (msc@freeswitch.org)> wrote:
session.originate(session,'{accountcode=54321,ignore_early_media=true,origination_caller_id_number=07630600000,originate_timeout=25}sofia/gateway/mygw/01XXXXXXXXXXX');
Quote: |
(this works using lua BTW)
|
hmmmm... how about using "effective_caller_id_number" instead? I think
the JavaScript paradigm is a bit different than the Lua/Perl one. Let
us know if that works or not.
-MC
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@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@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400 |
|
Back to top |
|
|
alex at sinapticode.ro Guest
|
Posted: Fri Feb 13, 2009 9:29 am Post subject: [Freeswitch-users] Setting outbound callerid using js |
|
|
I wrote that document ... I can't remember from where I got the idea
that you should specify the a-leg as being the same session.
That document is a draft, but it got indexed by Google unfortunately
On Fri, 2009-02-13 at 14:12 +0000, Nik Middleton wrote:
Quote: | I think this page (external) is the source
http://alexn.org/docs/dialer.html
Regards,
______________________________________________________________________
From:freeswitch-users-bounces@lists.freeswitch.org
[mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of
Anthony Minessale
Sent: 13 February 2009 14:06
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] Setting outbound callerid using js
1) session.originate is depricated.
2) the first arg to session.originate is *another* session (not the
same one) *or* undefined.....
session.originate(undefined, "<dial string>");
session.originate(a_leg_session, "<dial string>");
session.originate(session, "<dial string>") is asking the session to
use itself as it's own a leg which makes no sense.
This is perhaps the 4th time i have seen someone do this, can you
point out where this is incorrectly documented?
BTW
effective_caller_id_name/number are variables you set on the A leg so
when it's used to generate b legs that var is copied instead.
a_leg_session.setVariable("effective_caller_id_number=1234");
b_leg_session = new Session(a_leg_session, "<dial string>");
which is of course pointless because you never need to create the
session if you just use the bridge application.
session.execute("bridge", "<dial string>");
even better just set the dest to a var and exit the script and use
that var in your dialplan.
--- contents of get_dest.js ---
session.setVariable("dial_string", "<dial string>");
-- dialplan --
<action application="javascript" data="get_dest.js"/>
<action application="bridge" data="${dial_string}/>
On Wed, Feb 11, 2009 at 6:26 PM, Michael Collins <msc@freeswitch.org>
wrote:
session.originate(session,'{accountcode=54321,ignore_early_media=true,origination_caller_id_number=07630600000,originate_timeout=25}sofia/gateway/mygw/01XXXXXXXXXXX');
Quote: |
(this works using lua BTW)
|
hmmmm... how about using "effective_caller_id_number" instead? I think
the JavaScript paradigm is a bit different than the Lua/Perl one. Let
us know if that works or not.
-MC
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@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@hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org
pstn:213-799-1400
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
|
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org |
|
Back to top |
|
|
anthony.minessale at g... Guest
|
Posted: Fri Feb 13, 2009 10:38 am Post subject: [Freeswitch-users] Setting outbound callerid using js |
|
|
I made it an error now to do it this way which should clear things up.
Doing it that way probably led to instability in js.
On Fri, Feb 13, 2009 at 8:25 AM, Alexandru Nedelcu <alex@sinapticode.ro (alex@sinapticode.ro)> wrote:
Quote: | I wrote that document ... I can't remember from where I got the idea
that you should specify the a-leg as being the same session.
That document is a draft, but it got indexed by Google unfortunately
On Fri, 2009-02-13 at 14:12 +0000, Nik Middleton wrote:
Quote: | I think this page (external) is the source
http://alexn.org/docs/dialer.html
Regards,
______________________________________________________________________
From:freeswitch-users-bounces@lists.freeswitch.org ([email]From%3Afreeswitch-users-bounces@lists.freeswitch.org[/email])
[mailto:freeswitch-users-bounces@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org)] On Behalf Of
Anthony Minessale
Sent: 13 February 2009 14:06
To: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)
Subject: Re: [Freeswitch-users] Setting outbound callerid using js
1) session.originate is depricated.
2) the first arg to session.originate is *another* session (not the
same one) *or* undefined.....
session.originate(undefined, "<dial string>");
session.originate(a_leg_session, "<dial string>");
session.originate(session, "<dial string>") is asking the session to
use itself as it's own a leg which makes no sense.
This is perhaps the 4th time i have seen someone do this, can you
point out where this is incorrectly documented?
BTW
effective_caller_id_name/number are variables you set on the A leg so
when it's used to generate b legs that var is copied instead.
a_leg_session.setVariable("effective_caller_id_number=1234");
b_leg_session = new Session(a_leg_session, "<dial string>");
which is of course pointless because you never need to create the
session if you just use the bridge application.
session.execute("bridge", "<dial string>");
even better just set the dest to a var and exit the script and use
that var in your dialplan.
--- contents of get_dest.js ---
session.setVariable("dial_string", "<dial string>");
-- dialplan --
<action application="javascript" data="get_dest.js"/>
<action application="bridge" data="${dial_string}/>
On Wed, Feb 11, 2009 at 6:26 PM, Michael Collins <msc@freeswitch.org (msc@freeswitch.org)>
wrote:
session.originate(session,'{accountcode=54321,ignore_early_media=true,origination_caller_id_number=07630600000,originate_timeout=25}sofia/gateway/mygw/01XXXXXXXXXXX');
Quote: |
(this works using lua BTW)
|
hmmmm... how about using "effective_caller_id_number" instead? I think
the JavaScript paradigm is a bit different than the Lua/Perl one. Let
us know if that works or not.
-MC
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@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@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
|
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@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@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400 |
|
Back to top |
|
|
msc at freeswitch.org Guest
|
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|