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.
> > >
> > >
> > >
> > > https://kamailio.org/docs/modules/5.1.x/modules/pdb.html
> >
> > 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