Where did you learn how to use js this way?<br>session.originate is being misused here and is depricated and may be removed.<br><br>the first arg to session.originate is either undefined or a *different* session (the a leg)<br>
<br>session1 = new Session();<br>session1.originate(undefined, &quot;{ignore_early_media=true}user/<a href="mailto:1008@192.168.1.122">1008@192.168.1.122</a>&quot;);<br><br>session1.setVariable(&quot;effective_caller_id_number&quot;,&quot;fixed0248b&quot;);<br>
<br>//once you have session1 when you originate session2 you pass session1 as the arg <br>// the effective_caller_id is taken from session1<br><br>session2 = new Session();<br>session2.originate(session1, &quot;sofia/gateway/halonet/0225490317&quot;);<br>
<div id=":1ty" class="ArwC7c ckChnd"><br>Anyway this whole code is depricated in favor of this:<br><br>session1 = new Session(&quot;{ignore_early_media=true}user/<a href="mailto:1008@192.168.1.122">1008@192.168.1.122</a>&quot;);<br>

</div>if (session1.ready()) {<br>&nbsp; session1.setVariable(&quot;effective_caller_id_number&quot;,&quot;fixed0248b&quot;);<br>
&nbsp; session2 = new Session(&quot;sofia/gateway/halonet/0225490317&quot;, session1);<br>}<br><br>and could be further refactored down to this:<br><br>session1 = new Session(&quot;{ignore_early_media=true}user/<a href="mailto:1008@192.168.1.122">1008@192.168.1.122</a>&quot;);<br>


if (session1.ready()) {<br>
&nbsp; session1.setVariable(&quot;effective_caller_id_number&quot;,&quot;fixed0248b&quot;);<br>&nbsp; session1.execute(&quot;bridge&quot;, &quot;sofia/gateway/halonet/0225490317&quot;);<br>
}<br>
<br>or down to this one line of code that will setup the call detached from the script and exit.<br><br>var result = apiExecute(&quot;originate&quot;, &quot;{effective_caller_id_number=fixed0248b,origination_caller_id_number=1000,ignore_early_media=true}user/<a href="mailto:1008@192.168.1.122">1008@192.168.1.122</a> bridge:sofia/gateway/halonet/0225490317 inline&quot;);<br>
<br>if you dont care about the result and want to exit even before the call is completed.<br><br>var result = apiExecute(&quot;bgapi&quot;,
&quot;originate {effective_caller_id_number=fixed0248b,origination_caller_id_number=1000,ignore_early_media=true}user/<a href="mailto:1008@192.168.1.122">1008@192.168.1.122</a> bridge:sofia/gateway/halonet/0225490317 inline&quot;);<br>

<br><br><br><div class="gmail_quote">On Wed, Feb 4, 2009 at 2:51 AM, Jacek Sokulski <span dir="ltr">&lt;jsokulski@dotsystems.pl&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;">
<br>
We have tried setting both effective_caller_id_number and<br>
origination_caller_id_number:<br>
<br>
session1.originate(session1,&quot;{origination_caller_id_number=fixed0248b}sofia/gateway/halonet/0225490317&quot;,15);<br>
&nbsp;but the problem still exists. The solution we have found for the case<br>
when we originate two calls, local and external, is as follow:<br>
<br>
session1 = new Session();<br>
session1.originate(session1,&quot;user/<a href="mailto:1003@192.168.1.122">1003@192.168.1.122</a>&quot;,15);//local<br>
if(session1.ready()) {<br>
 &nbsp; &nbsp;session1.execute(&quot;execute_extension&quot;,&quot;00930691688627 XML default&quot;);//external<br>
}<br>
<br>
so the external call goes through the dialplan.<br>
It does not work if both calls are external. One possible solution could be<br>
to pass the originating call through dialplan (loopback?) but we have not managed<br>
to figure out how to do it.<br>
<br>
Thanks<br>
Jacek<br>
<br>
Dnia 03-02-2009, wto o godzinie 14:31 -0300, Nicolas Brenner pisze:<br>
<div><div></div><div class="Wj3C7c">&gt; Oops! Well, fortunately I don&#39;t use that voip provider anymore (nor the script).<br>
&gt;<br>
&gt; Thanks Brian.<br>
&gt;<br>
&gt; Nicolas<br>
&gt;<br>
&gt; On Tue, Feb 3, 2009 at 2:25 PM, Brian West &lt;<a href="mailto:brian@freeswitch.org">brian@freeswitch.org</a>&gt; wrote:<br>
&gt; &gt; YOU should NEVER use this method or call setCallerData at all &nbsp;you<br>
&gt; &gt; should use the correct methods to override the callerid.<br>
&gt; &gt;<br>
&gt; &gt; If its a B-Leg born from an A-Leg you use these on the on the A-Leg:<br>
&gt; &gt;<br>
&gt; &gt; <a href="http://wiki.freeswitch.org/wiki/Channel_Variables#effective_caller_id_name" target="_blank">http://wiki.freeswitch.org/wiki/Channel_Variables#effective_caller_id_name</a><br>
&gt; &gt; <a href="http://wiki.freeswitch.org/wiki/Channel_Variables#effective_caller_id_number" target="_blank">http://wiki.freeswitch.org/wiki/Channel_Variables#effective_caller_id_number</a><br>
&gt; &gt;<br>
&gt; &gt; If you&#39;re originating you use this:<br>
&gt; &gt;<br>
&gt; &gt; <a href="http://wiki.freeswitch.org/wiki/Channel_Variables#origination_caller_id_name" target="_blank">http://wiki.freeswitch.org/wiki/Channel_Variables#origination_caller_id_name</a><br>
&gt; &gt; <a href="http://wiki.freeswitch.org/wiki/Channel_Variables#origination_caller_id_number" target="_blank">http://wiki.freeswitch.org/wiki/Channel_Variables#origination_caller_id_number</a><br>
&gt; &gt;<br>
&gt; &gt; /b<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><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>