<p>I have now made the following changes:</p>

<p>pdbt.c:</p>

<pre><code> bufsize = slen + 1 + 1 + 5 + 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) {
</code></pre>

<p>common.h:</p>

<pre><code> #define MAX_PDB_CARRIERID 99999
 #define MAX_CARRIERID 99999
 …
 typedef int32_t carrier_t;
</code></pre>

<p>I still get no answer for prefixes bigger than 32767. I have a server with only this two lines :</p>

<pre><code> 0778667682;32768
 0781541867;32767
</code></pre>

<p>The results of 2 querys are:</p>

<pre><code> processing command line parameters...
 got an answer in 0.180000 ms
 0778667682: not_found: comment=''

 processing command line parameters...
 got an answer in 0.155000 ms
 0781541867:32767:unknown carrier
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/kamailio/kamailio/issues/433#issuecomment-162852315">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36Zf3rmQPNYviLP5DltCkzan21UjKHks5pNrJxgaJpZM4Gw2Iw.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/433#issuecomment-162852315"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>