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='00', $natAccessCode='55[1-9][1-9]',$CountryCode='',$ENUMtldRegexp="([2-9]{7,})") {<br> $this->regexp_international = "/^".$intAccessCode."([1-9][0-9]{5,})\$/";<br>
$this->regexp_national = "/^".$natAccessCode."([2-9][0-9]{6,})\$/";<br> $this->CountryCode = trim($CountryCode);<br> $this->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> "E164_class" => "E164_Brazil",<br><br>i reload cdrtool, i restart cdrtool, but all my calls are not billed (all are on-net to cdrtool)<br><br><table width="100%" border="0" cellspacing="2">
<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&cdr_table=radacct201108&order_by=RadAcctId&order_type=DESC&begin_datetime=1314659280&end_datetime=1314744900&maxrowsperpage=15&action=search#">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 valign="top" align="right">00:05</td>
<td valign="top" align="right"><br></td>
<td valign="top" align="right">37.89 </td>
<td valign="top" align="right">92.97</td>
<td valign="top" align="right"><font color="green"> Ok (200)</font></td>
<td valign="top" align="right">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>