Hello Guys, <br><br>Im sorry for te long delay, <br><br>Justo to know of all the change that was necessary to me was.<br><br>1) - Create your e164 rule<br><br>class E164_Brazil extends E164 {<br>    function E164_Brazil ($intAccessCode=&#39;00&#39;, $natAccessCode=&#39;55[1-9][1-9]&#39;,<div id=":3ff">
$CountryCode=&#39;&#39;,$ENUMtldRegexp=&quot;([1-9][0-9]{7,})&quot;) {<br>
        $this-&gt;regexp_international = &quot;/^&quot;.$intAccessCode.&quot;([0-9][0-9]{5,})\$/&quot;;<br>        $this-&gt;regexp_national      = &quot;/^&quot;.$natAccessCode.&quot;([2-9][0-9]{7})\$/&quot;;<div class="im">
<br>        $this-&gt;CountryCode          = trim($CountryCode);<br>
        $this-&gt;ENUMtldRegexp        = trim($ENUMtldRegexp);<br>    }<br>}<br><br><br></div>2) - Comment these variables on your cdr_generic.php file<br>      //var $intAccessCode       = &#39;00&#39;;<br>     //var $natAccessCode       = &#39;0&#39;;<br>

       // var $E164_class          = &#39;E164_Europe&#39;;<br><br>3) - Changes these values on your global.inc file<br><br>                       &quot;E164_class&quot;         =&gt; &quot;E164_Brazil&quot;, // change the class name for your needed<br>

                     &quot;intAccessCode&quot;      =&gt; &quot;&quot;,           // give this blank because was specified on your e164 rule<br>                    &quot;natAccessCode&quot;      =&gt; &quot;&quot;,            // give this blank because was specified on your e164 rule<br>

<br><br><br><br>Below the result on cdrtool<br><br><table cellpadding="0" cellspacing="0" border="0"><tbody><tr></tr><tr>
            <td>To (dialed URI):</td>
            <td>551135444444@XX.XX.XX.YY</td>
        </tr>
        
        <tr>
            <td><br></td>
            <td>Canonical URI:   </td>
            <td>551135444444@XX.XX.XX.YY</td>
        </tr>
        
        <tr>
            <td><br></td>
            <td>Next Hop URI:</td>
            <td>00551135444444@XX.XX.XX.XX</td>
        </tr>
        
            <tr>
                <td><br></td>
                <td>Destination: </td>
                <td>BRAZIL SAO PAULO (5511)</td></tr></tbody></table><br><br>Span: 1<br>
    Duration: 3 s<br>
   ProfileId: grn_premium / weekend<br>
      RateId: grn_premium / 0-24h<br>
        Rate: 0.0305 / 60 s<br>
       Price: 0.0015</div><br><br><div class="gmail_quote">2011/8/30 Mike Tesliuk <span dir="ltr">&lt;<a href="mailto:mike@ultra.net.br">mike@ultra.net.br</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello Guys, <br><br><br>Im trying to change the E164 rule used by cdrtool to charge my calls (is a test enviroment), i create on library/cdr_generic.php the class E164_Brazil<br><br>Below the code that i insert on cdr_generic<br>

<br><br>class E164_Brazil extends E164 {<br>    function E164_Brazil ($intAccessCode=&#39;00&#39;, $natAccessCode=&#39;55[1-9][1-9]&#39;,$CountryCode=&#39;&#39;,$ENUMtldRegexp=&quot;([2-9]{7,})&quot;) {<br>        $this-&gt;regexp_international = &quot;/^&quot;.$intAccessCode.&quot;([1-9][0-9]{5,})\$/&quot;;<br>

        $this-&gt;regexp_national      = &quot;/^&quot;.$natAccessCode.&quot;([2-9][0-9]{6,})\$/&quot;;<br>        $this-&gt;CountryCode          = trim($CountryCode);<br>        $this-&gt;ENUMtldRegexp        = trim($ENUMtldRegexp);<br>

    }<br>}<br><br>Just to jusitfy the Brazil country code is 55 and our area codes are [1-9][1-9], later we have the number with 8 digits start from 2 <br><br><br>I put on my global.inc datasource (opensips section) the value<br>

<br>                    &quot;E164_class&quot;         =&gt; &quot;E164_Brazil&quot;,<br><br>i  reload cdrtool, i restart cdrtool, but all my calls are not billed (all are on-net to cdrtool)<br><br><table cellspacing="2" width="100%" border="0">

<tbody><tr bgcolor="lightgrey"><td>Id</td>
        <td><b>Start Time</b></td>
        <td><b>Flow</b></td>
        <td><b>SIP Caller</b></td>
        <td><b>Location</b></td>
        <td><b>Sip Proxy</b></td>
        <td><b>Apps</b></td>
        <td><b>SIP Destination</b></td>
        <td><b>Dur</b></td>
        <td><b>Price</b></td>
        <td align="right"><b>KBIn</b></td>
        <td align="right"><b>KBOut</b></td>
        <td align="right"><b>Status</b></td>
        <td align="right"><b>Codecs</b></td>
        </tr>
        
        <tr bgcolor="white">
        <td valign="top"><a href="http://ser1.ultra.net.br/CDRTool/callsearch.phtml?cdr_source=opensips_radius&amp;cdr_table=radacct201108&amp;order_by=RadAcctId&amp;order_type=DESC&amp;begin_datetime=1314659280&amp;end_datetime=1314744900&amp;maxrowsperpage=15&amp;action=search#" target="_blank">1N</a></td>


        <td valign="top">2011-08-30 09:57:51</td>
        <td valign="top">on-net</td>
        <td valign="top">MY_USER@MY_SERVER</td>
        <td valign="top"></td>
        <td valign="top"><br></td>
        <td valign="top">audio</td>
        <td valign="top">551135444444@MY_SERVER
        </td>
            <td align="right" valign="top">00:05</td>
            <td align="right" valign="top"><br></td>
            <td align="right" valign="top">37.89 </td>
            <td align="right" valign="top">92.97</td>
            
        <td align="right" valign="top"><font color="green"> Ok (200)</font></td>
        <td align="right" valign="top">G711u</td></tr></tbody></table><br><br>If i try to call with internation prefix (00) i get my call billed correctly<br><br><br> Have sombody an idea about where is my mistake ?<br><br>

<br>Thanks for all<br>
</blockquote></div><br>