<br><br><div class="gmail_quote">2011/11/9 Richard Mudgett <span dir="ltr">&lt;<a href="mailto:rmudgett@digium.com">rmudgett@digium.com</a>&gt;</span><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></div><div class="h5">&gt; &gt; &gt; As promised, here is a follow up on my quest to get CallerID<br>
&gt; &gt; &gt; correctly<br>
&gt; &gt; &gt; presented when forwarding calls to cellphones.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Here is a reminder of the issue at hand:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Alice (GSM handset) calls Bob (ISDN-connected Asterisk extension)<br>
&gt; &gt; &gt; which forwards to Cory (GSM handset)<br>
&gt; &gt; &gt; What I would like to get is to see Alice&#39;s number (not Bob&#39;s<br>
&gt; &gt; &gt; number)<br>
&gt; &gt; &gt; presented to Cory.<br>
&gt; &gt; &gt; Sometimes, I get Alice&#39;s number, sometimes, I get Bob&#39;s number<br>
&gt; &gt; &gt; (new<br>
&gt; &gt; &gt; findings from last sunday trials).<br>
&gt; &gt; &gt; And of course, if Daniel or Eric would call Bob, the CallerID<br>
&gt; &gt; &gt; number<br>
&gt; &gt; &gt; presented to Cory would either be Daniel&#39;s number, Eric&#39;s number<br>
&gt; &gt; &gt; or<br>
&gt; &gt; &gt; Bob&#39;s number depending on a root cause I&#39;m looking after for<br>
&gt; &gt; &gt; several<br>
&gt; &gt; &gt; days now.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; To check if CallerID is filtered or controlled by Telco, I<br>
&gt; &gt; &gt; originated<br>
&gt; &gt; &gt; calls from Asterisk using hand crafted caller ids: any CallerID<br>
&gt; &gt; &gt; was<br>
&gt; &gt; &gt; correctly presented.<br>
&gt; &gt; &gt; So I originally thought the root cause I&#39;m after is a telco<br>
&gt; &gt; &gt; equipment<br>
&gt; &gt; &gt; switching ANI and CID.<br>
&gt; &gt; &gt; But a close look at some last trials output makes me asking for<br>
&gt; &gt; &gt; opinions from this list readers.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Here follows, the anonymized (and hand indented) output of command<br>
&gt; &gt; &gt; PRI<br>
&gt; &gt; &gt; debug command.<br>
&gt; &gt; &gt; I focused on the end of call setup dialog.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; For the successfully presented call, the output is:<br>
&gt; &gt; &gt; [Nov 6 09:32:07] VERBOSE[27954] chan_dahdi.c: &gt; [6c 0b 21 83 37 38<br>
&gt; &gt; &gt; 36<br>
&gt; &gt; &gt; XX XX XX XX XX XX]<br>
&gt; &gt; &gt; [Nov 6 09:32:07] VERBOSE[27954] chan_dahdi.c: &gt; Calling Number<br>
&gt; &gt; &gt; (len=13) [ Ext: 0 TON: National Number (2) NPI: ISDN/Telephony<br>
&gt; &gt; &gt; Numbering Plan (E.164/E.163) (1)<br>
&gt; &gt; &gt; [Nov 6 09:32:07] VERBOSE[27954] chan_dahdi.c: &gt; Presentation:<br>
&gt; &gt; &gt; Presentation allowed of network provided number (3) &#39;78649XXXX&#39; ]<br>
&gt; &gt; &gt; [Nov 6 09:32:07] VERBOSE[27954] chan_dahdi.c: &gt; [70 0b 80 30 36 37<br>
&gt; &gt; &gt; 31<br>
&gt; &gt; &gt; XX XX XX XX XX XX]<br>
&gt; &gt; &gt; [Nov 6 09:32:07] VERBOSE[27954] chan_dahdi.c: &gt; Called Number<br>
&gt; &gt; &gt; (len=13)<br>
&gt; &gt; &gt; [ Ext: 1 TON: Unknown Number Type (0) NPI: Unknown Number Plan (0)<br>
&gt; &gt; &gt; &#39;067100XXXX&#39; ]<br>
&gt; &gt; &gt; [Nov 6 09:32:07] VERBOSE[27954] chan_dahdi.c: &gt; [74 0e 21 01 8f 33<br>
&gt; &gt; &gt; 33<br>
&gt; &gt; &gt; 33 34 34 XX XX XX XX XX XX]<br>
&gt; &gt; &gt; [Nov 6 09:32:07] VERBOSE[27954] chan_dahdi.c: &gt; Redirecting Number<br>
&gt; &gt; &gt; (len=16) [ Ext: 0 TON: National Number (2) NPI: ISDN/Telephony<br>
&gt; &gt; &gt; Numbering Plan (E.164/E.163) (1)<br>
&gt; &gt; &gt; [Nov 6 09:32:07] VERBOSE[27954] chan_dahdi.c: &gt; Ext: 0<br>
&gt; &gt; &gt; Presentation:<br>
&gt; &gt; &gt; Presentation permitted, user number passed network screening (1)<br>
&gt; &gt; &gt; [Nov 6 09:32:07] VERBOSE[27954] chan_dahdi.c: &gt; Ext: 1 Reason:<br>
&gt; &gt; &gt; Forwarded unconditionally (15)<br>
&gt; &gt; &gt; [Nov 6 09:32:07] VERBOSE[27954] chan_dahdi.c: &#39;3334436XXXX&#39; ]<br>
&gt; &gt; &gt; [Nov 6 09:32:07] VERBOSE[27954] chan_dahdi.c: &gt; [a1]<br>
&gt; &gt; &gt; [Nov 6 09:32:07] VERBOSE[27954] chan_dahdi.c: &gt; Sending Complete<br>
&gt; &gt; &gt; (len=<br>
&gt; &gt; &gt; 1)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; For the unsuccessfully presented call, the output is:<br>
&gt; &gt; &gt; [Nov 6 09:25:29] VERBOSE[27927] chan_dahdi.c: &gt; [6c 0b 21 83 36 37<br>
&gt; &gt; &gt; 38<br>
&gt; &gt; &gt; XX XX XX XX XX XX]<br>
&gt; &gt; &gt; [Nov 6 09:25:29] VERBOSE[27927] chan_dahdi.c: &gt; Calling Number<br>
&gt; &gt; &gt; (len=13) [ Ext: 0 TON: National Number (2) NPI: ISDN/Telephony<br>
&gt; &gt; &gt; Numbering Plan (E.164/E.163) (1)<br>
&gt; &gt; &gt; [Nov 6 09:25:29] VERBOSE[27927] chan_dahdi.c: &gt; Presentation:<br>
&gt; &gt; &gt; Presentation allowed of network provided number (3) &#39;67854XXXX&#39; ]<br>
&gt; &gt; &gt; [Nov 6 09:25:29] VERBOSE[27927] chan_dahdi.c: &gt; [70 0b 80 30 36 37<br>
&gt; &gt; &gt; 31<br>
&gt; &gt; &gt; XX XX XX XX XX XX]<br>
&gt; &gt; &gt; [Nov 6 09:25:29] VERBOSE[27927] chan_dahdi.c: &gt; Called Number<br>
&gt; &gt; &gt; (len=13)<br>
&gt; &gt; &gt; [ Ext: 1 TON: Unknown Number Type (0) NPI: Unknown Number Plan (0)<br>
&gt; &gt; &gt; &#39;067100XXXX&#39; ]<br>
&gt; &gt; &gt; [Nov 6 09:25:29] VERBOSE[27927] chan_dahdi.c: &gt; [a1]<br>
&gt; &gt; &gt; [Nov 6 09:25:29] VERBOSE[27927] chan_dahdi.c: &gt; Sending Complete<br>
&gt; &gt; &gt; (len=<br>
&gt; &gt; &gt; 1)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Am I correctly interpreting when saying that in the successful<br>
&gt; &gt; &gt; call,<br>
&gt; &gt; &gt; Asterisk is sending a [74 0e 21 01 8f 33 33 33 34 34 XX XX XX XX<br>
&gt; &gt; &gt; XX<br>
&gt; &gt; &gt; XX] message which is not otherwise sent ?<br>
&gt; &gt; &gt; What can explains this difference ?<br>
&gt; &gt; &gt; Is this something I can (should) control ?<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; For reference:<br>
&gt; &gt; &gt; dahdi show version<br>
&gt; &gt; &gt; DAHDI Version: SVN-trunk-r8853M Echo Canceller: OSLEC<br>
&gt; &gt; &gt; pri show version<br>
&gt; &gt; &gt; libpri version: 1.4.10.2<br>
&gt; &gt;<br>
&gt; &gt; Improved support for manipulation of redirecting number is available<br>
&gt; &gt; with the REDIRECTING dialplan function in Asterisk v1.8.x and<br>
&gt; &gt; libpri v1.4.12. Prior to Asterisk v1.8.x you only have<br>
&gt; &gt; CALLERID(RDNIS).<br>
&gt; &gt;<br>
&gt; &gt; <a href="https://wiki.asterisk.org/wiki/display/AST/Manipulating+Party+ID+Information" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Manipulating+Party+ID+Information</a><br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Richard<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Hi Richard,<br>
&gt; &gt;<br>
&gt; &gt; 1. Could you elaborate a bit ?<br>
&gt; &gt; Do you imply that the lines bellow were present (or missing) because<br>
&gt; &gt; I<br>
&gt; &gt; did somewhere set CALLERID(RDNIS) and that I should use them ?<br>
&gt; &gt;<br>
&gt; &gt; &gt; [Nov 6 09:32:07] VERBOSE[27954] chan_dahdi.c: &gt; Redirecting Number<br>
&gt; &gt; &gt; (len=16) [ Ext: 0 TON: National Number (2) NPI: ISDN/Telephony<br>
&gt; &gt; &gt; Numbering Plan (E.164/E.163) (1)<br>
&gt; &gt; &gt; [Nov 6 09:32:07] VERBOSE[27954] chan_dahdi.c: &gt; Ext: 0<br>
&gt; &gt; &gt; Presentation:<br>
&gt; &gt; &gt; Presentation permitted, user number passed network screening (1)<br>
&gt; &gt; &gt; [Nov 6 09:32:07] VERBOSE[27954] chan_dahdi.c: &gt; Ext: 1 Reason:<br>
&gt; &gt; &gt; Forwarded unconditionally (15)<br>
&gt; &gt; &gt; [Nov 6 09:32:07] VERBOSE[27954] chan_dahdi.c: &#39;3334436XXXX&#39; ]<br>
&gt;<br>
&gt; No. I was trying to say that the value in the redirecting ie is<br>
&gt; controllable by setting/clearing the CALLERID(RDNIS) value.<br>
&gt;<br>
&gt;<br>
&gt; &gt; 2. More generally, if I may ask, how do you understand both outputs<br>
&gt; &gt; (from my previous post) ?<br>
&gt;<br>
&gt; Since you are not changing the value of RDNIS, then the RDNIS value<br>
&gt; came in from the telco. The presence of the RDNIS value on the<br>
&gt; incoming<br>
&gt; call implies that the call has already been redirected at least once.<br>
&gt;<br>
&gt; The first example (working):<br>
&gt; I am interpreting the numbers as belonging to:<br>
&gt; Party A is the calling number<br>
&gt; Unknown party or Party B is the redirecting number<br>
&gt; Party C is the called number<br>
&gt;<br>
&gt; The second example (not working):<br>
&gt; I am interpreting the numbers as belonging to:<br>
&gt; Party A?? is the calling number<br>
&gt; (guessing here. It is either the calling number of the incoming<br>
&gt; call or your dialplan has set it with CALLERID(num).)<br>
&gt; Party C is the called number<br>
&gt;<br>
&gt; The information here suggests that you should try setting<br>
&gt; CALLERID(RDNIS) to<br>
&gt; party B and dialing. This would make the not working call look like<br>
&gt; the<br>
&gt; working call for your call forwarding case.<br>
&gt;<br>
&gt; Richard<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Thanks for this enlightment.<br>
&gt;<br>
&gt; I can confirm CALLERID(RDNIS) is not explicitely changed within the<br>
&gt; Asterisk server.<br>
&gt; The choosen format like 3334436XXXX is noticeable (the system is<br>
&gt; installed in France where numbers are in this <a href="tel:%2B33%280%29123456789" value="+33123456789">+33(0)123456789</a> shape).<br>
&gt;<br>
&gt; It seems that sometimes, calls come in with this CALLERID(RDNIS) value<br>
&gt; set and sometimes not, though all of them where direct.<br>
&gt;<br>
&gt; I agree that setting CALLERID(RDNIS) myself is definitively worth<br>
&gt; trying.<br>
&gt;<br>
&gt; 1. Would you expect CALLERID(RDNIS) to be implicitely changed within<br>
&gt; the Asterisk server ?<br>
</div></div>&gt; This page ( <a href="http://www.voip-info.org/wiki/view/RDNIS" target="_blank">http://www.voip-info.org/wiki/view/RDNIS</a> ) suggest this to<br>
<div class="im">&gt; be true (&quot;The Dial application also sets the RGN to the current<br>
&gt; extension&quot;) and suggest CALLERID(RDNIS) to be overwritten by Dial.<br>
<br>
</div>Asterisk will not normally change the RDNIS value received.  That web<br>
page does not state why the dial application sets RDNIS which can be<br>
confusing.  The only time RDNIS is set is if the outgoing call is itself<br>
redirected/forwarded by the peer.  For Asterisk v1.6.1 the only channel<br>
drivers that support this are SIP and skinny.<br></blockquote><div><br>OK : then I will try to set this value (and update <a href="http://voip-info.org">voip-info.org</a>) <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div class="im"><br>
&gt; 2. As I feel specically new to this RDNIS concept, how should I set<br>
&gt; CALLERID(RDNIS), before or after Answer() statement ?<br>
<br>
</div>It does not matter in this case.  Asterisk v1.6.1 will keep both legs<br>
of the call anyway.<br>
<br>
If you ultimately want to get the call entirely off of your Asterisk<br>
server, you will need Asterisk v1.6.2 or later.  You would also need<br>
libpri 1.4.12 to do this with ETSI(EuroISDN).  You would then use<br>
the DAHDISendCallreroutingFacility application *before* you answer<br>
the call to forward/deflect the incoming call back to the network.<br>
<div><div></div><div class="h5"><br>
Richard<br></div></div></blockquote><div><br>That&#39;s definitively worth to try.<br>I can&#39;t think of any use case but does this DAHDISendCallreroutingFacility generates AMI events, for curiosity&#39;s sake ?<br><br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div class="h5">
<br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
               <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</div></div></blockquote></div><br>