[SR-Users] drouting

Daniel-Constantin Mierla miconda at gmail.com
Fri Apr 24 12:11:13 CEST 2015


Hello,

On 24/04/15 11:59, Keith wrote:
> Hi,
>
> I am using drouting but having issues when trying to route numbers in
> E164 in the prefix. Any ideas how to allow for a + in the prefix field
> in the DB?
>
checking quickly, looks like drouting was designed to accept only digits
for prefix.

You can try following options:

1) store 00 instead of + in database and replace + with 00 in
kamailio.cfg before calling drouting function

2) edit modules/drouting/prefix_tree.h and replace the block:

#define PTREE_CHILDREN 10
#define IS_DECIMAL_DIGIT(d) \
    (((d)>='0') && ((d)<= '9')) 

with:

#define PTREE_CHILDREN 11
#define IS_DECIMAL_DIGIT(d) \
    ( ((d)=='+') || ( ((d)>='0') && ((d)<= '9') ) ) 

recompile and re-install module.

If 2) works, then it can be considered to be fixed in the main git
repository.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com




More information about the sr-users mailing list