[OpenSIPS-Users] drouting dr_rules prefix only supports numeric

Anil M Pannikode anilpannikode at hotmail.com
Thu Jan 26 20:49:49 CET 2012


My Request URI is something like  <sip:+12065555555> sip:+12065555555.....

 

However if I create a rule in dr_rules with prefix "+12065555555", while
loading the rules to memory drmodule seems to be dropping those rows as it
contains non-numeric chars.

 

Currently I am doing something like the following (Strip + before do_routing
and add it back )

 

if($rU =~ "^[+].*" )

  {

    strip(1);

    if (!do_routing()) 

    {

      send_reply("503", "No Rules matching the URI");

      exit;

    }

    prefix("+");

  }

 

Just wondering if there is a reason not to allow non-numeric chars  in
prefix column of dr_rules ?

 

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20120126/b7b7995e/attachment.htm>


More information about the Users mailing list