<div dir="ltr">Hi <span style="font-family:arial,sans-serif;font-size:13px">Grigoriy,</span><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><div>I had the same problem, maybe.</div><div>

I have the number 1000 calling the number 2000, I need to know if the call is internal, national or international.</div><div><br></div><div>To do this, Asterisk 1.8 sets the variable $ {CALLERID (TON)} that contains code ... if I remember correctly 33 is unknow (internal), 73 are national and international calls can not remember (maybe 43).</div>

<div><br></div><div>Hope that helps.</div><div><br></div><div>Danilo</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/3/15 Richard Mudgett <span dir="ltr">&lt;<a href="mailto:rmudgett@digium.com" target="_blank">rmudgett@digium.com</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">&gt; 14.03.2013 17:53, Gianluca Merlo wrote:<br>
&gt; &gt; Hello Grigoriy,<br>
&gt; &gt;<br>
&gt; &gt; i think that you can access the information you need by using the<br>
&gt; &gt; dialplan function CALLERID(num-plan). It should contain the lower 7<br>
&gt; &gt; bits of the Q.931 type-of-number/numbering-plan-identification<br>
&gt; &gt; octet.<br>
&gt; &gt;<br>
&gt; &gt; Best regards<br>
&gt; &gt;<br>
&gt; &gt; Gianluca<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt;<br>
&gt; Nope. CALLERID(num-plan) shows numbering plan of caller&#39;s number, not<br>
&gt; the called one. In example, where A calls B, CALLERID(num-plan) shows<br>
&gt; numbering plan of A number. In my case I need to know numbering plan<br>
&gt; of<br>
&gt; B number.<br>
&gt;<br>
&gt; CALLERID(dnid-num-plan) is not set anywhere for PRI calls.<br>
&gt;<br>
&gt; Looks like CALLEDTON is the right answer, however it needs mangling<br>
&gt; (${MATH(${CALLEDTON}&gt;&gt;4&amp;0x7,i)}) to get right values.<br>
<br>
</div>I created the following issue to get CALLERID(dnid-num-plan) to have the<br>
same value as CALLEDTON.<br>
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-21248" target="_blank">https://issues.asterisk.org/jira/browse/ASTERISK-21248</a><br>
<span class="HOEnZb"><font color="#888888"><br>
Richard<br>
</font></span><div class="HOEnZb"><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></div></div>