1) session.originate is depricated.<br>2) the first arg to session.originate is *another* session (not the same one) *or* undefined.....<br>&nbsp;&nbsp;&nbsp; session.originate(undefined, &quot;&lt;dial string&gt;&quot;);<br>&nbsp;&nbsp;&nbsp; session.originate(a_leg_session, &quot;&lt;dial string&gt;&quot;);<br>
<br>session.originate(session, &quot;&lt;dial string&gt;&quot;) is asking the session to use itself as it&#39;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&#39;s used to generate b legs that var is copied instead.<br><br>a_leg_session.setVariable(&quot;effective_caller_id_number=1234&quot;);<br>
b_leg_session = new Session(a_leg_session, &quot;&lt;dial string&gt;&quot;);<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(&quot;bridge&quot;, &quot;&lt;dial string&gt;&quot;);<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(&quot;dial_string&quot;, &quot;&lt;dial string&gt;&quot;);<br>
<br>-- dialplan -- <br>&lt;action application=&quot;javascript&quot; data=&quot;get_dest.js&quot;/&gt;<br>&lt;action application=&quot;bridge&quot; data=&quot;${dial_string}/&gt;<br><br><br><br><br><div class="gmail_quote">
On Wed, Feb 11, 2009 at 6:26 PM, Michael Collins <span dir="ltr">&lt;<a href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>&gt;</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,&#39;{accountcode=54321,ignore_early_media=true,origination_caller_id_number=07630600000,originate_timeout=25}sofia/gateway/mygw/01XXXXXXXXXXX&#39;);<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; (this works using lua BTW)<br>
&gt;<br>
</div>hmmmm... how about using &quot;effective_caller_id_number&quot; 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>