Hi
I have here Kamailio 5.1.2 with PDB Module. I use the documented function from PDB-Module as follows:
pdb_query("$rU", "$avp(i:82)"); xlog("L_INFO","PDB result $rU: $avp(i:82)\n");
The problem is, that $avp(i:82) is always 0.
If I test the PDB-Server, with "pdbt -r localhost:5574 query <phonenumber>" I get a valid response.
I use this already with Kamailio 4.3.6 and there it is working.
https://kamailio.org/docs/modules/5.1.x/modules/pdb.html
Any ideas?
Thanks & regards Stefan
Am Montag, 28. Mai 2018, 15:10:16 CEST schrieb Stefan Rüetschli:
I have here Kamailio 5.1.2 with PDB Module. I use the documented function from PDB-Module as follows:
pdb_query("$rU", "$avp(i:82)"); xlog("L_INFO","PDB result $rU: $avp(i:82)\n");
The problem is, that $avp(i:82) is always 0.
If I test the PDB-Server, with "pdbt -r localhost:5574 query <phonenumber>" I get a valid response.
I use this already with Kamailio 4.3.6 and there it is working.
Hello Stefan,
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.
Best regards,
Henning
Hi Henning
Thanks for your reply. The debug at kamailio startup looks like this (multiple times, I think for each IP interface), this is only a part of it:
<--- snip ---> May 29 06:21:41 siphost01 /usr/sbin/kamailio[26692]: DEBUG: <core> [core/sr_module.c:984]: init_mod(): pdb May 29 06:21:41 siphost01 /usr/sbin/kamailio[26692]: DEBUG: pdb [pdb.c:525]: add_server(): adding server 'siphost01.mydom.com:5574' May 29 06:21:41 siphost01 /usr/sbin/kamailio[26692]: DEBUG: pdb [pdb.c:525]: add_server(): adding server 'siphost02.mydom.com:5574' May 29 06:21:41 siphost01 /usr/sbin/kamailio[26692]: DEBUG: pdb [pdb.c:525]: add_server(): adding server 'siphost03.mydom.com:5574' May 29 06:21:42 siphost01 /usr/sbin/kamailio[26692]: DEBUG: <core> [core/route.c:872]: fix_actions(): fixing pdb_query() 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] 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] 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' 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' 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' May 29 06:21:42 siphost01 /usr/sbin/kamailio[26696]: DEBUG: pdb [pdb.c:675]: init_server_socket(): got 3 server in list <--- snap --->
So it finds all configured PDB servers. The debug for a non working query:
<--- snip ---> 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 May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: DEBUG: pdb [pdb.c:239]: pdb_query(): querying '0123334455'... 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' 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' 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' 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 May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: DEBUG: pdb [pdb.c:288]: pdb_query(): sending request to 'siphost03.mydom.com:5574' May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: DEBUG: pdb [pdb.c:288]: pdb_query(): sending request to 'siphost02.mydom.com:5574' May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: DEBUG: pdb [pdb.c:288]: pdb_query(): sending request to 'siphost01.mydom.com:5574' 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 May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: NOTICE: pdb [pdb.c:359]: pdb_query(): Invalid code 0 received May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: INFO: pdb [pdb.c:386]: pdb_query(): got an answer in 0.706000 ms 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 May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: INFO: <script>: INFOSTD: PSTN pdb result for 0123334455: 0 <--- snap --->
Very strange for me too.
Regards Stefan
Am 28.05.18 um 21:00 schrieb Henning Westerholt:
Am Montag, 28. Mai 2018, 15:10:16 CEST schrieb Stefan Rüetschli:
I have here Kamailio 5.1.2 with PDB Module.
I use the documented function from PDB-Module as follows:
pdb_query("$rU", "$avp(i:82)");
xlog("L_INFO","PDB result $rU: $avp(i:82)\n");
The problem is, that $avp(i:82) is always 0.
If I test the PDB-Server, with "pdbt -r localhost:5574 query
<phonenumber>" I get a valid response.
I use this already with Kamailio 4.3.6 and there it is working.
Hello Stefan,
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.
Best regards,
Henning
Am Dienstag, 29. Mai 2018, 08:47:00 CEST schrieb Stefan Rüetschli:
Thanks for your reply. The debug at kamailio startup looks like this (multiple times, I think for each IP interface), this is only a part of it:
Hello Stefan,
sorry for the really late reply. Do you managed to solve the issue on your own? Or does the problem persists?
Best regards,
Henning
<--- snip ---> May 29 06:21:41 siphost01 /usr/sbin/kamailio[26692]: DEBUG: <core> [core/sr_module.c:984]: init_mod(): pdb May 29 06:21:41 siphost01 /usr/sbin/kamailio[26692]: DEBUG: pdb [pdb.c:525]: add_server(): adding server 'siphost01.mydom.com:5574' May 29 06:21:41 siphost01 /usr/sbin/kamailio[26692]: DEBUG: pdb [pdb.c:525]: add_server(): adding server 'siphost02.mydom.com:5574' May 29 06:21:41 siphost01 /usr/sbin/kamailio[26692]: DEBUG: pdb [pdb.c:525]: add_server(): adding server 'siphost03.mydom.com:5574' May 29 06:21:42 siphost01 /usr/sbin/kamailio[26692]: DEBUG: <core> [core/route.c:872]: fix_actions(): fixing pdb_query() 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] 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] 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' 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' 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' May 29 06:21:42 siphost01 /usr/sbin/kamailio[26696]: DEBUG: pdb [pdb.c:675]: init_server_socket(): got 3 server in list <--- snap --->
So it finds all configured PDB servers. The debug for a non working query:
<--- snip ---> 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 May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: DEBUG: pdb [pdb.c:239]: pdb_query(): querying '0123334455'... 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' 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' 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' 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 May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: DEBUG: pdb [pdb.c:288]: pdb_query(): sending request to 'siphost03.mydom.com:5574' May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: DEBUG: pdb [pdb.c:288]: pdb_query(): sending request to 'siphost02.mydom.com:5574' May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: DEBUG: pdb [pdb.c:288]: pdb_query(): sending request to 'siphost01.mydom.com:5574' 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 May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: NOTICE: pdb [pdb.c:359]: pdb_query(): Invalid code 0 received May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: INFO: pdb [pdb.c:386]: pdb_query(): got an answer in 0.706000 ms 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 May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: INFO: <script>: INFOSTD: PSTN pdb result for 0123334455: 0 <--- snap --->
Very strange for me too.
Regards Stefan
Am 28.05.18 um 21:00 schrieb Henning Westerholt:
Am Montag, 28. Mai 2018, 15:10:16 CEST schrieb Stefan Rüetschli:
I have here Kamailio 5.1.2 with PDB Module.
I use the documented function from PDB-Module as follows:
pdb_query("$rU", "$avp(i:82)");
xlog("L_INFO","PDB result $rU: $avp(i:82)\n");
The problem is, that $avp(i:82) is always 0.
If I test the PDB-Server, with "pdbt -r localhost:5574 query
<phonenumber>" I get a valid response.
Hi Henning
Thanks for coming back to this. I didn't solve it until now, I don't know where to search. Does somebody also use PDB with 5.1.2 on Ubuntu 16.04.4?
Regards Stefan
Am 17.06.18 um 21:06 schrieb Henning Westerholt:
Am Dienstag, 29. Mai 2018, 08:47:00 CEST schrieb Stefan Rüetschli:
Thanks for your reply.
The debug at kamailio startup looks like this (multiple times, I think
for each IP interface), this is only a part of it:
Hello Stefan,
sorry for the really late reply. Do you managed to solve the issue on your own? Or does the problem persists?
Best regards,
Henning
<--- snip --->
May 29 06:21:41 siphost01 /usr/sbin/kamailio[26692]: DEBUG: <core>
[core/sr_module.c:984]: init_mod(): pdb
May 29 06:21:41 siphost01 /usr/sbin/kamailio[26692]: DEBUG: pdb
[pdb.c:525]: add_server(): adding server 'siphost01.mydom.com:5574'
May 29 06:21:41 siphost01 /usr/sbin/kamailio[26692]: DEBUG: pdb
[pdb.c:525]: add_server(): adding server 'siphost02.mydom.com:5574'
May 29 06:21:41 siphost01 /usr/sbin/kamailio[26692]: DEBUG: pdb
[pdb.c:525]: add_server(): adding server 'siphost03.mydom.com:5574'
May 29 06:21:42 siphost01 /usr/sbin/kamailio[26692]: DEBUG: <core>
[core/route.c:872]: fix_actions(): fixing pdb_query()
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]
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]
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'
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'
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'
May 29 06:21:42 siphost01 /usr/sbin/kamailio[26696]: DEBUG: pdb
[pdb.c:675]: init_server_socket(): got 3 server in list
<--- snap --->
So it finds all configured PDB servers.
The debug for a non working query:
<--- snip --->
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
May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: DEBUG: pdb
[pdb.c:239]: pdb_query(): querying '0123334455'...
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'
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'
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'
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
May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: DEBUG: pdb
[pdb.c:288]: pdb_query(): sending request to 'siphost03.mydom.com:5574'
May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: DEBUG: pdb
[pdb.c:288]: pdb_query(): sending request to 'siphost02.mydom.com:5574'
May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: DEBUG: pdb
[pdb.c:288]: pdb_query(): sending request to 'siphost01.mydom.com:5574'
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
May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: NOTICE: pdb
[pdb.c:359]: pdb_query(): Invalid code 0 received
May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: INFO: pdb
[pdb.c:386]: pdb_query(): got an answer in 0.706000 ms
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
May 29 06:23:05 siphost01 /usr/sbin/kamailio[26706]: INFO: <script>:
INFOSTD: PSTN pdb result for 0123334455: 0
<--- snap --->
Very strange for me too.
Regards
Stefan
Am 28.05.18 um 21:00 schrieb Henning Westerholt:
Am Montag, 28. Mai 2018, 15:10:16 CEST schrieb Stefan Rüetschli:
I have here Kamailio 5.1.2 with PDB Module.
I use the documented function from PDB-Module as follows:
pdb_query("$rU", "$avp(i:82)");
xlog("L_INFO","PDB result $rU: $avp(i:82)\n");
The problem is, that $avp(i:82) is always 0.
If I test the PDB-Server, with "pdbt -r localhost:5574 query
<phonenumber>" I get a valid response.
I use this already with Kamailio 4.3.6 and there it is working.
Hello Stefan,
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.
Best regards,
Henning
--
If you like my work in the Kamailio project, it would be great if you could consider supporting me on Patreon: https://www.patreon.com/henningw
Am Montag, 18. Juni 2018, 07:51:24 CEST schrieb Stefan Rüetschli:
Thanks for coming back to this. I didn't solve it until now, I don't know where to search. Does somebody also use PDB with 5.1.2 on Ubuntu 16.04.4?
Hello Stefan,
I digged further into this issue and looked to the protocol format in utils/pdbt/docs/ network_protocol.txt.
One strange thing I noticed:
[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
Kamailio sends a request in version 1 out, this is the default since 2015 or so.
[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
Kamailio recieves a reply in version 0, it should be version 1 as well.
I use this already with Kamailio 4.3.6 and there it is working.
Do you query with the Kamailio 5.1.x to the pdbt server in version 4.x? If yes then I suspect this is the problem.
The version change in pdbt was done after the release of the 4.3 branch.
Best regards
Henning
Hi Henning
Am 18.06.18 um 23:13 schrieb Henning Westerholt:
Am Montag, 18. Juni 2018, 07:51:24 CEST schrieb Stefan Rüetschli:
Thanks for coming back to this.
I didn't solve it until now, I don't know where to search.
Does somebody also use PDB with 5.1.2 on Ubuntu 16.04.4?
Hello Stefan,
I digged further into this issue and looked to the protocol format in utils/pdbt/docs/network_protocol.txt.
One strange thing I noticed:
[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
Kamailio sends a request in version 1 out, this is the default since 2015 or so.
[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
Kamailio recieves a reply in version 0, it should be version 1 as well.
I use this already with Kamailio 4.3.6 and there it is working.
Do you query with the Kamailio 5.1.x to the pdbt server in version 4.x? If yes then I suspect this is the problem.
I tried to use the pdb server from kamailio 4.x (because I was sure it works) and I also used only the pdb-server on localhost where kamailio 5.1.2 is running. But the result is the same, asking with version 1, response with version 0 and result=0. How can I check the version of pdb_server to make sure it's up to date and should work with kamailio 5.1.2?
The version change in pdbt was done after the release of the 4.3 branch.
Best regards
Henning
--
If you like my work in the Kamailio project, it would be great if you could consider supporting me on Patreon: https://www.patreon.com/henningw
Regards Stefan
Am Dienstag, 19. Juni 2018, 17:24:04 CEST schrieb Stefan Rüetschli:
[..] I tried to use the pdb server from kamailio 4.x (because I was sure it works) and I also used only the pdb-server on localhost where kamailio 5.1.2 is running. But the result is the same, asking with version 1, response with version 0 and result=0.
Hello Stefan,
I today tried to reproduce this with current git master. It worked for me ok in the simple test case
0(12121) DEBUG: pdb [pdb.c:239]: pdb_query(): querying '495041748'... 0(12121) DEBUG: pdb [pdb.c:264]: pdb_query(): flushed 0 packets for 'localhost:5574' 0(12121) DEBUG: pdb [pdb.c:162]: pdb_msg_dbg(): Kamailio pdb client sends: version = 1 type = 0 code = 0 id = 0 len = 16 payload = 34 39 35 30 34 31 37 34 38 00 0(12121) DEBUG: pdb [pdb.c:288]: pdb_query(): sending request to 'localhost:5574' 0(12121) DEBUG: pdb [pdb.c:162]: pdb_msg_dbg(): Kamailio pdb client receives: version = 1 type = 1 code = 1 id = 0 len = 18 payload = 34 39 35 30 34 31 37 34 38 00 00 0C 0(12121) INFO: pdb [pdb.c:386]: pdb_query(): got an answer in 0.316000 ms 0(12121) ERROR: <script>: DEBUG-PDB-HW: 12
How can I check the version of pdb_server to make sure it's up to date and should work with kamailio 5.1.2?
The version change in pdbt was done after the release of the 4.3 branch.
There is (unfortunately) no version output in the help, should be added. You can check with strings
git master version: $ strings pdb_server | grep -i version version = %d PDB_VERSION_MAX PDB_VERSION_1 version pdb_versions .gnu.version .gnu.version_r
4.3 version: strings ./pdb_server | grep -i version .gnu.version .gnu.version_r
Best regards,
Henning
Hi Henning!
Thank you very much, the hint with strings helped me. It was really a version problem, it was an old pdb_server. I compiled from source 5.1.2 and now it works!
Thank you for your time!
Regards Stefan
Am 20.06.18 um 17:23 schrieb Henning Westerholt:
Am Dienstag, 19. Juni 2018, 17:24:04 CEST schrieb Stefan Rüetschli:
[..]
I tried to use the pdb server from kamailio 4.x (because I was sure it
works) and I also used only the pdb-server on localhost where kamailio
5.1.2 is running.
But the result is the same, asking with version 1, response with version
0 and result=0.
Hello Stefan,
I today tried to reproduce this with current git master. It worked for me ok in the simple test case
0(12121) DEBUG: pdb [pdb.c:239]: pdb_query(): querying '495041748'...
0(12121) DEBUG: pdb [pdb.c:264]: pdb_query(): flushed 0 packets for 'localhost:5574'
0(12121) DEBUG: pdb [pdb.c:162]: pdb_msg_dbg(): Kamailio pdb client sends:
version = 1
type = 0
code = 0
id = 0
len = 16
payload = 34 39 35 30 34 31 37 34 38 00
0(12121) DEBUG: pdb [pdb.c:288]: pdb_query(): sending request to 'localhost:5574'
0(12121) DEBUG: pdb [pdb.c:162]: pdb_msg_dbg(): Kamailio pdb client receives:
version = 1
type = 1
code = 1
id = 0
len = 18
payload = 34 39 35 30 34 31 37 34 38 00 00 0C
0(12121) INFO: pdb [pdb.c:386]: pdb_query(): got an answer in 0.316000 ms
0(12121) ERROR: <script>: DEBUG-PDB-HW: 12
How can I check the version of pdb_server to make sure it's up to date
and should work with kamailio 5.1.2?
The version change in pdbt was done after the release of the 4.3
branch.
There is (unfortunately) no version output in the help, should be added. You can check with strings
git master version:
$ strings pdb_server | grep -i version
version = %d
PDB_VERSION_MAX
PDB_VERSION_1
version
pdb_versions
.gnu.version
.gnu.version_r
4.3 version:
strings ./pdb_server | grep -i version
.gnu.version
.gnu.version_r
Best regards,
Henning
--
If you like my work in the Kamailio project, it would be great if you could consider supporting me on Patreon: https://www.patreon.com/henningw