Using Javascript, I&#39;m simply trying to originate a call:<br><br>(variables sent over XMLRPC from something similar to:<br>jsrun alert_cid.js $id $wave $phone $gateway $timeout $caller_id_number $caller_id_name<br>)<br>
<br><br>console_log(&#39;notice&#39;, trace(session, &quot;GOT: (&quot; + callid + &quot;,&quot; + greeting + &quot;,&quot; + phone + &quot;,&quot; + gw + &quot;,&quot;+ timeout + &quot;,&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + caller_id + &quot;,&quot; + caller_name + &quot;)\n&quot;));<br>
<br>sessionx = new Session();<br><br>var call =&nbsp; &quot;{origination_caller_id_number=XXXXXXXX,origination_caller_id_name=XXXX,ignore_early_media=true,&quot; +<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;originate_timeout=&quot; + timeout +<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;}&quot; +<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;sofia/gateway/&quot; +<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gw&nbsp; +<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;/&quot; +<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; phone;<br><br>console_log(&#39;notice&#39;, trace(session, &quot;originate: &quot; + call + &quot;\n&quot;));<br>
<br>console_log(&#39;notice&#39;, session.caller_id_Name + &quot;\n&quot;);<br>rs = sessionx.originate(session, call,&nbsp; timeout);<br>console_log(&#39;debug&#39;, trace(session, &quot;origination complete: &quot; + rs + &quot;\n&quot;));<br>
console_log(&#39;notice&#39;, sessionx.caller_id_Name + &quot;\n&quot;);<br><br>(trace is an internal function that just adds some additional information, such as cause, to the string)<br><br>I&#39;ve traced the SIP calls, so has Gafachi, and we&#39;re not seeing the caller_id. They are rejecting the calls because of this:<br>
<br>&nbsp;&nbsp; SIP/2.0 604 Invalid Calling Party Number<br>&nbsp;&nbsp; Via: SIP/2.0/UDP 75.101.133.137:5080;branch=z9hG4bKm4028av6cyD0F;received=<a href="http://75.101.133.137">75.101.133.137</a>;rport=5080<br>&nbsp;&nbsp; From: &quot;&quot; &lt;<a href="mailto:sip%3Aa6031sTVQLeOhyIV@sip.gafachi.com">sip:a6031sTVQLeOhyIV@sip.gafachi.com</a>;transport=udp&gt;;tag=j8BBv5jaycaFF<br>
&nbsp;&nbsp; To: &lt;<a href="mailto:sip%3A15025482003@sip.gafachi.com">sip:15025482003@sip.gafachi.com</a>&gt;;tag=gss0c342e9c3ad2398e2f610f7ce613a089<br>&nbsp;&nbsp; Call-ID: b161c7c6-b33c-122b-33b2-123138006c07<br>&nbsp;&nbsp; CSeq: 100525131 INVITE<br>
&nbsp;&nbsp; Server: Gafachi UAS v110.08<br>&nbsp;&nbsp; Allow: INVITE, ACK, CANCEL, OPTIONS, BYE<br>&nbsp;&nbsp; Contact: &lt;<a href="mailto:sip%3A15025482003@64.192.112.13">sip:15025482003@64.192.112.13</a>&gt;<br>&nbsp;&nbsp; Content-Length: 0<br><br>From reading various docs, I assume that I&#39;m looking for the caller_id_number in the FROM header of the INVITE sent to the gateway?<br>
<br>Here&#39;s my internal logs after running the code, above:<br><br>2008-06-12 12:08:52 [NOTICE] alert_cid.js:1 console_log() =&gt;[undefined] (undefined) GOT: (54,/tmp/4dc180ba-37fd-1e14-ad0c-7aa0770f2d0e.wav,XX,default,30,XX,XX)<br>
<br>2008-06-12 12:08:52 [NOTICE] alert_cid.js:1 console_log() =&gt;[undefined] (undefined) originate: {origination_caller_id_number=XX,origination_caller_id_name=XX,ignore_early_media=true,originate_timeout=30}sofia/gateway/default/XX<br>
<br>2008-06-12 12:08:52 [NOTICE] alert_cid.js:1 console_log() undefined &lt;=== caller_id_number should be defined here for sure<br>2008-06-12 12:08:52 [NOTICE] switch_channel.c:533 switch_channel_set_name() New Channel sofia/external/XX [d1be5806-7535-4168-8ad2-e6d787f603bd]<br>
<br>[SIP TRACE DELETED. relevent error portion quoted above]<br><br>2008-06-12 12:08:53 [NOTICE] sofia.c:2085 sofia_handle_sip_i_state() Hangup sofia/external/1502XXXXXXX [CS_CONSUME_MEDIA] [NO_ROUTE_DESTINATION]<br>2008-06-12 12:08:53 [WARNING] mod_spidermonkey.c:2771 session_originate() Cannot Create Outgoing Channel! [{origination_caller_id_number=502XXXXXXX,origination_caller_id_name=XXXX,ignore_early_media=true,originate_timeout=30}sofia/gateway/default/1502XXXXXXX]<br>
<br>Obviously from the note below effective_caller_id_name was not correct, I should have been using origination_caller_id_xxxx instead ... I&#39;ve tried both many times, I just happened to start tracing (grepping) effective_caller_id_name first to see if I could get a handle on what was going on.<br>
<br>I just know it&#39;s
something simple I&#39;ve missed ... at this point I&#39;m just going through
the code and adding additional logging to the routines so I can try to
figure out what it is I&#39;ve missed, mis-spelled or whatever - or even hard-code the caller_id if necessary to get past this (seemingly tiny) hurdle.<br><br>I&#39;m at work right now, I&#39;ll try to get on IRC this evening or tomorrow.<br>
<br>Nick<br><br><br><br><div class="gmail_quote">On Thu, Jun 12, 2008 at 9:20 AM, Brian West &lt;<a href="mailto:brian@freeswitch.org">brian@freeswitch.org</a>&gt; 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 style="">I don&#39;t get what you&#39;re doing here..&nbsp;effective_caller_id_number and origination_caller_id_number depending on if you&#39;re originating or if you&#39;re doing a bridge. &nbsp;I have verified they work. &nbsp;Can you elaborate on your situation because you shouldn&#39;t have to go digging in the code for this.<div>
<br></div><div>/b</div><div><div><div></div><div class="Wj3C7c"><br><div>On Jun 12, 2008, at 2:10 AM, Nick Temple wrote:<br><blockquote type="cite"><br>I see where the caller_id_number is being set in:<br>switch_core_session_outgoing_channel<br>
<br>However my tests are showing that <br><br>It looks like in&nbsp; , this test is returning false (no session):<br><br>&nbsp;if (session) {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ....<br>&nbsp;}<br><br>hence it appears that the caller_id_number part of the struct is not being set from th effective_caller_id_number. Later in the code it&#39;s looking for a channel if (channel) { .... }, which is also null, making the entire function pretty much a no-op in this case.<br>
 <br>Am I even looking in the right place?<br><br>Thanks,<br><br>Nick<br><br><br><br><br><br><br><br><br><br><div class="gmail_quote">On Wed, Jun 11, 2008 at 9:28 PM, Brian West &lt;<a href="mailto:brian@freeswitch.org" target="_blank">brian@freeswitch.org</a>&gt; 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><div><br><div><div>On Jun 11, 2008, at 8:18 PM, Nick Temple wrote:</div><br><blockquote type="cite">
<span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">call = &quot;{ignore_early_media=true,originate_timeout=30}sofia/gateway/<a href="http://sip.gafachi.com/1XXXXXXXXXX" target="_blank">sip.gafachi.com/1XXXXXXXXXX</a>&quot;;</span></blockquote>
 </div><br><div><br></div></div><div>Try to export instead of set. &nbsp;The variable isn&#39;t on the b-leg so you actually have it set on the a-leg or you can try this which should be documented rather well on the wiki:</div>
 <div><br></div><div>call = &quot;{effective_caller_id_number=12345,ignore_early_media=true,originate_timeout=30}sofia/gateway/<a href="http://sip.gafachi.com/1XXXXXXXXXX" target="_blank">sip.gafachi.com/1XXXXXXXXXX</a>&quot;;</div>
 <div><br></div><font color="#888888"><div>/b</div><div><br></div></font></div><br>_______________________________________________<br> Freeswitch-users mailing list<br> <a href="mailto:Freeswitch-users@lists.freeswitch.org" target="_blank">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></blockquote></div><br> _______________________________________________<br>Freeswitch-users mailing list<br><a href="mailto:Freeswitch-users@lists.freeswitch.org" target="_blank">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></div></div><font color="#888888"><div> <span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div style="">
<div>Brian West</div><div><a>sip:brian@freeswitch.org</a></div><div><br></div></div></span><br> </div><br></font></div></div><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></blockquote></div><br>