Using Javascript, I'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('notice', trace(session, "GOT: (" + callid + "," + greeting + "," + phone + "," + gw + ","+ timeout + ","<br> + caller_id + "," + caller_name + ")\n"));<br>
<br>sessionx = new Session();<br><br>var call = "{origination_caller_id_number=XXXXXXXX,origination_caller_id_name=XXXX,ignore_early_media=true," +<br> "originate_timeout=" + timeout +<br>
"}" +<br> "sofia/gateway/" +<br> gw +<br> "/" +<br> phone;<br><br>console_log('notice', trace(session, "originate: " + call + "\n"));<br>
<br>console_log('notice', session.caller_id_Name + "\n");<br>rs = sessionx.originate(session, call, timeout);<br>console_log('debug', trace(session, "origination complete: " + rs + "\n"));<br>
console_log('notice', sessionx.caller_id_Name + "\n");<br><br>(trace is an internal function that just adds some additional information, such as cause, to the string)<br><br>I've traced the SIP calls, so has Gafachi, and we're not seeing the caller_id. They are rejecting the calls because of this:<br>
<br> SIP/2.0 604 Invalid Calling Party Number<br> 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> From: "" <<a href="mailto:sip%3Aa6031sTVQLeOhyIV@sip.gafachi.com">sip:a6031sTVQLeOhyIV@sip.gafachi.com</a>;transport=udp>;tag=j8BBv5jaycaFF<br>
To: <<a href="mailto:sip%3A15025482003@sip.gafachi.com">sip:15025482003@sip.gafachi.com</a>>;tag=gss0c342e9c3ad2398e2f610f7ce613a089<br> Call-ID: b161c7c6-b33c-122b-33b2-123138006c07<br> CSeq: 100525131 INVITE<br>
Server: Gafachi UAS v110.08<br> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE<br> Contact: <<a href="mailto:sip%3A15025482003@64.192.112.13">sip:15025482003@64.192.112.13</a>><br> Content-Length: 0<br><br>From reading various docs, I assume that I'm looking for the caller_id_number in the FROM header of the INVITE sent to the gateway?<br>
<br>Here's my internal logs after running the code, above:<br><br>2008-06-12 12:08:52 [NOTICE] alert_cid.js:1 console_log() =>[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() =>[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 <=== 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'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's
something simple I've missed ... at this point I'm just going through
the code and adding additional logging to the routines so I can try to
figure out what it is I'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'm at work right now, I'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 <<a href="mailto:brian@freeswitch.org">brian@freeswitch.org</a>> 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't get what you're doing here.. effective_caller_id_number and origination_caller_id_number depending on if you're originating or if you're doing a bridge. I have verified they work. Can you elaborate on your situation because you shouldn'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 , this test is returning false (no session):<br><br> if (session) {<br> ....<br> }<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'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 <<a href="mailto:brian@freeswitch.org" target="_blank">brian@freeswitch.org</a>> 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 = "{ignore_early_media=true,originate_timeout=30}sofia/gateway/<a href="http://sip.gafachi.com/1XXXXXXXXXX" target="_blank">sip.gafachi.com/1XXXXXXXXXX</a>";</span></blockquote>
</div><br><div><br></div></div><div>Try to export instead of set. The variable isn'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 = "{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>";</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>