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">&lt;<a href="mailto:alex@sinapticode.ro">alex@sinapticode.ro</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;">I wrote that document ... I can&#39;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>
&gt; I think this page (external) is the source<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; <a href="http://alexn.org/docs/dialer.html" target="_blank">http://alexn.org/docs/dialer.html</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Regards,<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; ______________________________________________________________________<br>
&gt; <a href="mailto:From%3Afreeswitch-users-bounces@lists.freeswitch.org">From:freeswitch-users-bounces@lists.freeswitch.org</a><br>
&gt; [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a>] On Behalf Of<br>
&gt; Anthony Minessale<br>
&gt; Sent: 13 February 2009 14:06<br>
&gt; To: <a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a><br>
&gt; Subject: Re: [Freeswitch-users] Setting outbound callerid using js<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; 1) session.originate is depricated.<br>
&gt; 2) the first arg to session.originate is *another* session (not the<br>
&gt; same one) *or* undefined.....<br>
&gt; &nbsp; &nbsp; session.originate(undefined, &quot;&lt;dial string&gt;&quot;);<br>
&gt; &nbsp; &nbsp; session.originate(a_leg_session, &quot;&lt;dial string&gt;&quot;);<br>
&gt;<br>
&gt; session.originate(session, &quot;&lt;dial string&gt;&quot;) is asking the session to<br>
&gt; use itself as it&#39;s own a leg which makes no sense.<br>
&gt;<br>
&gt; This is perhaps the 4th time i have seen someone do this, can you<br>
&gt; point out where this is incorrectly documented?<br>
&gt;<br>
&gt; BTW<br>
&gt;<br>
&gt; effective_caller_id_name/number are variables you set on the A leg so<br>
&gt; when it&#39;s used to generate b legs that var is copied instead.<br>
&gt;<br>
&gt; a_leg_session.setVariable(&quot;effective_caller_id_number=1234&quot;);<br>
&gt; b_leg_session = new Session(a_leg_session, &quot;&lt;dial string&gt;&quot;);<br>
&gt;<br>
&gt; which is of course pointless because you never need to create the<br>
&gt; session if you just use the bridge application.<br>
&gt;<br>
&gt;<br>
&gt; session.execute(&quot;bridge&quot;, &quot;&lt;dial string&gt;&quot;);<br>
&gt;<br>
&gt; even better just set the dest to a var and exit the script and use<br>
&gt; that var in your dialplan.<br>
&gt;<br>
&gt;<br>
&gt; --- contents of get_dest.js ---<br>
&gt; session.setVariable(&quot;dial_string&quot;, &quot;&lt;dial string&gt;&quot;);<br>
&gt;<br>
&gt; -- dialplan --<br>
&gt; &lt;action application=&quot;javascript&quot; data=&quot;get_dest.js&quot;/&gt;<br>
&gt; &lt;action application=&quot;bridge&quot; data=&quot;${dial_string}/&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Wed, Feb 11, 2009 at 6:26 PM, Michael Collins &lt;<a href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>&gt;<br>
&gt; wrote:<br>
&gt;<br>
&gt; 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; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; (this works using lua BTW)<br>
&gt; &gt;<br>
&gt;<br>
&gt;<br>
&gt; hmmmm... how about using &quot;effective_caller_id_number&quot; instead? I think<br>
&gt; the JavaScript paradigm is a bit different than the Lua/Perl one. Let<br>
&gt; us know if that works or not.<br>
&gt; -MC<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Freeswitch-users mailing list<br>
&gt; <a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Anthony Minessale II<br>
&gt;<br>
&gt; FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
&gt; ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
&gt;<br>
&gt; AIM: anthm<br>
&gt; <a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>
&gt; GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
&gt; IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br>
&gt;<br>
&gt; FreeSWITCH Developer Conference<br>
&gt; <a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br>
&gt; <a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br>
&gt; <a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
&gt; pstn:213-799-1400<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Freeswitch-users mailing list<br>
&gt; <a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <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>