[OpenSIPS-Users] Custom E164 Dialplan on CDRTool

Mike Tesliuk mike at ultra.net.br
Thu Sep 1 14:08:05 CEST 2011


Nobody know about this question ?

2011/8/30 Mike Tesliuk <mike at ultra.net.br>

> Hello Guys,
>
>
> 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
>
> Below the code that i insert on cdr_generic
>
>
> class E164_Brazil extends E164 {
>     function E164_Brazil ($intAccessCode='00',
> $natAccessCode='55[1-9][1-9]',$CountryCode='',$ENUMtldRegexp="([2-9]{7,})")
> {
>         $this->regexp_international =
> "/^".$intAccessCode."([1-9][0-9]{5,})\$/";
>         $this->regexp_national      =
> "/^".$natAccessCode."([2-9][0-9]{6,})\$/";
>         $this->CountryCode          = trim($CountryCode);
>         $this->ENUMtldRegexp        = trim($ENUMtldRegexp);
>     }
> }
>
> 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
>
>
> I put on my global.inc datasource (opensips section) the value
>
>                     "E164_class"         => "E164_Brazil",
>
> i  reload cdrtool, i restart cdrtool, but all my calls are not billed (all
> are on-net to cdrtool)
>
> Id *Start Time* *Flow* *SIP Caller* *Location* *Sip Proxy* *Apps* *SIP
> Destination* *Dur* *Price* *KBIn* *KBOut* *Status* *Codecs*  1N<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#> 2011-08-30
> 09:57:51 on-net MY_USER at MY_SERVER
> audio 551135444444 at MY_SERVER 00:05
> 37.89 92.97 Ok (200) G711u
>
> If i try to call with internation prefix (00) i get my call billed
> correctly
>
>
>  Have sombody an idea about where is my mistake ?
>
>
> Thanks for all
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110901/5f33f251/attachment.htm>


More information about the Users mailing list