<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Henning<br>
<br>
Thanks for your reply.<br>
The debug at kamailio startup looks like this (multiple times, I
think for each IP interface), this is only a part of it:<br>
<br>
<--- snip ---><br>
May 29 06:21:41 siphost01 /usr/sbin/kamailio[26692]: DEBUG:
<core> [core/sr_module.c:984]: init_mod(): pdb<br>
May 29 06:21:41 siphost01 /usr/sbin/kamailio[26692]: DEBUG: pdb
[pdb.c:525]: add_server(): adding server 'siphost01.mydom.com:5574'<br>
May 29 06:21:41 siphost01 /usr/sbin/kamailio[26692]: DEBUG: pdb
[pdb.c:525]: add_server(): adding server 'siphost02.mydom.com:5574'<br>
May 29 06:21:41 siphost01 /usr/sbin/kamailio[26692]: DEBUG: pdb
[pdb.c:525]: add_server(): adding server 'siphost03.mydom.com:5574'<br>
May 29 06:21:42 siphost01 /usr/sbin/kamailio[26692]: DEBUG:
<core> [core/route.c:872]: fix_actions(): fixing pdb_query()<br>
May 29 06:21:42 siphost01 /usr/sbin/kamailio[26692]: DEBUG:
<core> [core/sr_module.c:937]: init_mod_child(): idx 0 rank
-127: pdb [main]<br>
May 29 06:21:42 siphost01 /usr/sbin/kamailio[26696]: DEBUG:
<core> [core/sr_module.c:937]: init_mod_child(): idx 2 rank 2:
pdb [udp receiver child=1 sock=127.0.0.1:5060]<br>
May 29 06:21:42 siphost01 /usr/sbin/kamailio[26696]: DEBUG: pdb
[pdb.c:651]: init_server_socket(): initializing socket for
'siphost03.mydom.com:5574'<br>
May 29 06:21:42 siphost01 /usr/sbin/kamailio[26696]: DEBUG: pdb
[pdb.c:651]: init_server_socket(): initializing socket for
'siphost02.mydom.com:5574'<br>
May 29 06:21:42 siphost01 /usr/sbin/kamailio[26696]: DEBUG: pdb
[pdb.c:651]: init_server_socket(): initializing socket for
'siphost01.mydom.com:5574'<br>
May 29 06:21:42 siphost01 /usr/sbin/kamailio[26696]: DEBUG: pdb
[pdb.c:675]: init_server_socket(): got 3 server in list<br>
<--- snap ---><br>
<br>
So it finds all configured PDB servers.<br>
The debug for a non working query:<br>
<br>
<--- snip ---><br>
May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: exec: ***
cfgtrace:request_route=[PSTN] c=[/etc/kamailio//kamailio.cfg] l=1542
a=26 n=pdb_query<br>
May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: DEBUG: pdb
[pdb.c:239]: pdb_query(): querying '0123334455'...<br>
May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: DEBUG: pdb
[pdb.c:264]: pdb_query(): flushed 0 packets for
'siphost03.mydom.com:5574'<br>
May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: DEBUG: pdb
[pdb.c:264]: pdb_query(): flushed 0 packets for
'siphost02.mydom.com:5574'<br>
May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: DEBUG: pdb
[pdb.c:264]: pdb_query(): flushed 0 packets for
'siphost01.mydom.com:5574'<br>
May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: DEBUG: pdb
[pdb.c:157]: pdb_msg_dbg(): Kamailio pdb client sends:#012version =
1#012type = 0#012code = 0#012id = 256#012len = 17#012payload = 30 31
32 33 33 33 34 34 35 35 00<br>
May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: DEBUG: pdb
[pdb.c:288]: pdb_query(): sending request to
'siphost03.mydom.com:5574'<br>
May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: DEBUG: pdb
[pdb.c:288]: pdb_query(): sending request to
'siphost02.mydom.com:5574'<br>
May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: DEBUG: pdb
[pdb.c:288]: pdb_query(): sending request to
'siphost01.mydom.com:5574'<br>
May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: DEBUG: pdb
[pdb.c:157]: pdb_msg_dbg(): Kamailio pdb client receives:#012version
= 0#012type = 0#012code = 0#012id = 256#012len = 17#012payload = 30
31 32 33 33 33 34 34 35 35 00<br>
May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: NOTICE: pdb
[pdb.c:359]: pdb_query(): Invalid code 0 received<br>
May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: INFO: pdb
[pdb.c:386]: pdb_query(): got an answer in 0.706000 ms<br>
May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: exec: ***
cfgtrace:request_route=[PSTN] c=[/etc/kamailio//kamailio.cfg] l=1543
a=26 n=xlog<br>
May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: INFO:
<script>: INFOSTD: PSTN pdb result for 0123334455: 0<br>
<--- snap ---><br>
<br>
Very strange for me too. <br>
<br>
Regards<br>
Stefan<br>
<br>
<br>
<div class="moz-cite-prefix">Am 28.05.18 um 21:00 schrieb Henning
Westerholt:<br>
</div>
<blockquote type="cite" cite="mid:32504204.uVKy9GECj6@linux-rdlu">
<meta name="qrichtext" content="1">
<style type="text/css">
p, li { white-space: pre-wrap; }
</style>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Am Montag, 28. Mai 2018, 15:10:16 CEST schrieb Stefan Rüetschli:</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> I have here Kamailio 5.1.2 with PDB Module.</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> I use the documented function from PDB-Module as follows:</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> pdb_query("$rU", "$avp(i:82)");</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> xlog("L_INFO","PDB result $rU: $avp(i:82)\n");</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> The problem is, that $avp(i:82) is always 0.</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> If I test the PDB-Server, with "pdbt -r localhost:5574 query</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> <phonenumber>" I get a valid response.</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> I use this already with Kamailio 4.3.6 and there it is working.</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> <a class="moz-txt-link-freetext" href="https://kamailio.org/docs/modules/5.1.x/modules/pdb.html">https://kamailio.org/docs/modules/5.1.x/modules/pdb.html</a></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Hello Stefan,</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">strange. Can you post the debug logs (enable debug logging in cfg) of kamailio for one not working query here? Maybe we can find something there, before we dig into the module.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Best regards,</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Henning</p>
</blockquote>
<br>
</body>
</html>