I made it an error now to do it this way which should clear things up.<br>Doing it that way probably led to instability in js.<br><br><br><div class="gmail_quote">On Fri, Feb 13, 2009 at 8:25 AM, Alexandru Nedelcu <span dir="ltr"><<a href="mailto:alex@sinapticode.ro">alex@sinapticode.ro</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I wrote that document ... I can't remember from where I got the idea<br>
that you should specify the a-leg as being the same session.<br>
<br>
That document is a draft, but it got indexed by Google unfortunately :(<br>
<div><div></div><div class="Wj3C7c"><br>
<br>
On Fri, 2009-02-13 at 14:12 +0000, Nik Middleton wrote:<br>
> I think this page (external) is the source<br>
><br>
><br>
><br>
> <a href="http://alexn.org/docs/dialer.html" target="_blank">http://alexn.org/docs/dialer.html</a><br>
><br>
><br>
><br>
> Regards,<br>
><br>
><br>
><br>
><br>
> ______________________________________________________________________<br>
> <a href="mailto:From%3Afreeswitch-users-bounces@lists.freeswitch.org">From:freeswitch-users-bounces@lists.freeswitch.org</a><br>
> [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a>] On Behalf Of<br>
> Anthony Minessale<br>
> Sent: 13 February 2009 14:06<br>
> To: <a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a><br>
> Subject: Re: [Freeswitch-users] Setting outbound callerid using js<br>
><br>
><br>
><br>
><br>
> 1) session.originate is depricated.<br>
> 2) the first arg to session.originate is *another* session (not the<br>
> same one) *or* undefined.....<br>
> session.originate(undefined, "<dial string>");<br>
> session.originate(a_leg_session, "<dial string>");<br>
><br>
> session.originate(session, "<dial string>") is asking the session to<br>
> use itself as it's own a leg which makes no sense.<br>
><br>
> This is perhaps the 4th time i have seen someone do this, can you<br>
> point out where this is incorrectly documented?<br>
><br>
> BTW<br>
><br>
> effective_caller_id_name/number are variables you set on the A leg so<br>
> when it's used to generate b legs that var is copied instead.<br>
><br>
> a_leg_session.setVariable("effective_caller_id_number=1234");<br>
> b_leg_session = new Session(a_leg_session, "<dial string>");<br>
><br>
> which is of course pointless because you never need to create the<br>
> session if you just use the bridge application.<br>
><br>
><br>
> session.execute("bridge", "<dial string>");<br>
><br>
> even better just set the dest to a var and exit the script and use<br>
> that var in your dialplan.<br>
><br>
><br>
> --- contents of get_dest.js ---<br>
> session.setVariable("dial_string", "<dial string>");<br>
><br>
> -- dialplan --<br>
> <action application="javascript" data="get_dest.js"/><br>
> <action application="bridge" data="${dial_string}/><br>
><br>
><br>
><br>
><br>
><br>
> On Wed, Feb 11, 2009 at 6:26 PM, Michael Collins <<a href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>><br>
> wrote:<br>
><br>
> session.originate(session,'{accountcode=54321,ignore_early_media=true,origination_caller_id_number=07630600000,originate_timeout=25}sofia/gateway/mygw/01XXXXXXXXXXX');<br>
> ><br>
> ><br>
> ><br>
> > (this works using lua BTW)<br>
> ><br>
><br>
><br>
> hmmmm... how about using "effective_caller_id_number" instead? I think<br>
> the JavaScript paradigm is a bit different than the Lua/Perl one. Let<br>
> us know if that works or not.<br>
> -MC<br>
><br>
> _______________________________________________<br>
> Freeswitch-users mailing list<br>
> <a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
><br>
><br>
><br>
><br>
><br>
> --<br>
> Anthony Minessale II<br>
><br>
> FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
> ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
><br>
> AIM: anthm<br>
> <a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>
> GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
> IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br>
><br>
> FreeSWITCH Developer Conference<br>
> <a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br>
> <a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br>
> <a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
> pstn:213-799-1400<br>
><br>
><br>
> _______________________________________________<br>
> Freeswitch-users mailing list<br>
> <a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
<br>
_______________________________________________<br>
Freeswitch-users mailing list<br>
<a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
<br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400<br>