[sr-dev] [kamailio] PDB module prefixes (#433)

igorPot notifications at github.com
Tue Dec 8 10:22:49 CET 2015


Hi all,

I had configured my pdb module to accept 5 number prefixes by modifying:

In pdbt.c:

     bufsize = slen + 1 + 1 + 4 + 1 + 1; // line buffer (telephone number + colon + white space + carrier ID + newline + \0)

     ...

      ret = snprintf(p, 7, "%d\n", node->carrier);
               if (ret < 1 || ret > 6) {

And in common.h:

     #define MAX_PDB_CARRIERID 99999

And i hadn't had any problem until now. I had rows in my .csv like:

0645052050;10122

And it worked. The problem I have now is with prefixes bigger than 40000. I get segmentation fault when doiong a query with pdbt, however the pdbt build works good without any error. 

At first i thought of a buffer problem but eventhough testing with a .csv of 2 rows with 50000 prefixes will not work. Another curious effect is that for a prefix like 84238 the server changes the answer to 18754. I dont know why...

Could anyone help me please?

Thanks.

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/433
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20151208/8b1e98ed/attachment.html>


More information about the sr-dev mailing list