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

Stefan Mititelu notifications at github.com
Tue Dec 8 11:13:19 CET 2015


Hi Igor,

Looking at the kamailio pdb module code I can see that it should work well for prefixes smaller than the MAX_SHORT_INT= 32767 = 2^15-1 because:
```
typedef int16_t carrier_t;
...
struct dt_node_t {
	struct dt_node_t *child[10];
	carrier_t carrier;
};
```

Also I think you should try:
```
bufsize = slen + 1 + 1 + *5* + 1 + 1; // instead of your "+ 4"
```
Also the utils/pdbt/pdb_server.c is using the same int16_t for carrierid.

This can be an idea of enhancing the kamailio pdb module to be able to set the number of prefix digits via modparam (and use uint32_t for carrierid).

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


More information about the sr-dev mailing list