1) session.originate is depricated.<br>2) the first arg to session.originate is *another* session (not the 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 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 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 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 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 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><div class="gmail_quote">
On Wed, Feb 11, 2009 at 6:26 PM, Michael Collins <span dir="ltr"><<a href="mailto:msc@freeswitch.org">msc@freeswitch.org</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;">
<div class="Ih2E3d">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>
</div>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>
</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>