[OpenSIPS-Users] Custom E164 Dialplan on CDRTool

Mike Tesliuk mike at ultra.net.br
Tue Aug 30 15:22:59 CEST 2011

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',
        $this->regexp_international =
        $this->regexp_national      =
        $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*
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/20110830/bf9797b3/attachment.htm>

More information about the Users mailing list