[OpenSIPS-Users] drouting dr_rules prefix only supports numeric
    Dovid Bender 
    os-list at dovid.net
       
    Mon Jan 30 15:11:25 CET 2012
    
    
  
Hi,
 
Since it's regex don't you need a \ in the front to escape the +?
 
 
 
  _____  
From: users-bounces at lists.opensips.org
[mailto:users-bounces at lists.opensips.org] On Behalf Of Anil M Pannikode
Sent: Thursday, January 26, 2012 21:50
To: users at lists.opensips.org
Subject: [OpenSIPS-Users] drouting dr_rules prefix only supports numeric
 
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/20120130/c389cfae/attachment.htm>
    
    
More information about the Users
mailing list