Hello everyone is there a possibility to check working dialplan rules in kamailio (ver 1.4) with the command kamctl fifo dp_translate ? "fifo which" shows that there is such command but I can't figure out how to use it. some rules are not working and I want to check if kamailio loads everything from dialplan table correctly. Mainly I use fifo commands to reload dialplan and dispatcher so fifo is configured right I suppose.
Borin writes:
is there a possibility to check working dialplan rules in kamailio (ver 1.4) with the command kamctl fifo dp_translate ? "fifo which" shows that there is such command but I can't figure out how to use it. some rules are not working and I want to check if kamailio loads everything from dialplan table correctly. Mainly I use fifo commands to reload dialplan and dispatcher so fifo is configured right I suppose.
i tried with 3.1 and could not make dp_translate mi command to work either:
# sip-proxy_ctl mi dp_translate 10 9958814084445555 error: 500 - execution failed
error 500 does not come from dialplan module. perhaps there is something wrong with mi module?
-- juha
On 12/29/10 7:32 PM, Juha Heinanen wrote:
Borin writes:
is there a possibility to check working dialplan rules in kamailio (ver 1.4) with the command kamctl fifo dp_translate ? "fifo which" shows that there is such command but I can't figure out how to use it. some rules are not working and I want to check if kamailio loads everything from dialplan table correctly. Mainly I use fifo commands to reload dialplan and dispatcher so fifo is configured right I suppose.
i tried with 3.1 and could not make dp_translate mi command to work either:
# sip-proxy_ctl mi dp_translate 10 9958814084445555 error: 500 - execution failed
error 500 does not come from dialplan module. perhaps there is something wrong with mi module?
could be because mi function returns null -- mi_translate returns 0 in couple of cases. Can you run with higher debug level and send the output?
Cheers, Daniel
Daniel-Constantin Mierla writes:
could be because mi function returns null -- mi_translate returns 0 in couple of cases. Can you run with higher debug level and send the output?
looks like dp_translate does not get the second argument correctly or alternatively there is a problem with the debug message:
# sip-proxy_ctl mi_dg dp_translate 10 9958814084445555 error: 500 - execution failed Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: ctl [../../io_wait.h:390]: DBG: io_watch_add(0xb72d3860, 16, 3, 0x8541f48), fd_no=1 Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: ctl [io_listener.c:452]: handle_stream read: new connection (1) on /tmp/sip-proxy_ctl Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: dialplan [dp_repl.c:308]: regex operator testing Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: dialplan [dp_repl.c:308]: regex operator testing Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: dialplan [dp_repl.c:308]: regex operator testing Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: dialplan [dp_repl.c:308]: regex operator testing Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: dialplan [dp_repl.c:308]: regex operator testing Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: dialplan [dp_repl.c:308]: regex operator testing Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: dialplan [dp_repl.c:308]: regex operator testing Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: dialplan [dp_repl.c:337]: no matching rule Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: dialplan [dialplan.c:537]: could not translate 2147483647 with dpid 10 Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: ctl [io_listener.c:505]: handle_stream read: eof on /tmp/sip-proxy_ctl Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: ctl [../../io_wait.h:617]: DBG: io_watch_del (0xb72d3860, 16, -1, 0x10) fd_no=2 called
-- juha
I also get the same result while executing kamctl fifo dp_translate 10 123456789 500 command 'dp_translate' failed Probably is there other way to check why kamailio does not use the rule properly?
On Thu, Dec 30, 2010 at 7:35 AM, Juha Heinanen jh@tutpro.com wrote:
Daniel-Constantin Mierla writes:
could be because mi function returns null -- mi_translate returns 0 in couple of cases. Can you run with higher debug level and send the output?
looks like dp_translate does not get the second argument correctly or alternatively there is a problem with the debug message:
# sip-proxy_ctl mi_dg dp_translate 10 9958814084445555 error: 500 - execution failed Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: ctl [../../io_wait.h:390]: DBG: io_watch_add(0xb72d3860, 16, 3, 0x8541f48), fd_no=1 Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: ctl [io_listener.c:452]: handle_stream read: new connection (1) on /tmp/sip-proxy_ctl Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: dialplan [dp_repl.c:308]: regex operator testing Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: dialplan [dp_repl.c:308]: regex operator testing Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: dialplan [dp_repl.c:308]: regex operator testing Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: dialplan [dp_repl.c:308]: regex operator testing Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: dialplan [dp_repl.c:308]: regex operator testing Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: dialplan [dp_repl.c:308]: regex operator testing Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: dialplan [dp_repl.c:308]: regex operator testing Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: dialplan [dp_repl.c:337]: no matching rule Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: dialplan [dialplan.c:537]: could not translate 2147483647 with dpid 10 Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: ctl [io_listener.c:505]: handle_stream read: eof on /tmp/sip-proxy_ctl Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: ctl [../../io_wait.h:617]: DBG: io_watch_del (0xb72d3860, 16, -1, 0x10) fd_no=2 called
-- juha
On 12/30/10 7:35 AM, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
could be because mi function returns null -- mi_translate returns 0 in couple of cases. Can you run with higher debug level and send the output?
looks like dp_translate does not get the second argument correctly or alternatively there is a problem with the debug message:
# sip-proxy_ctl mi_dg dp_translate 10 9958814084445555
can you try with kamctl via fifo?
kamctl fifo dp_translate 10 9958814084445555
Or, if your tool is using sercmd to send the dp_translate command, try prefixing the parameter with 's:' to tell is string (see 'sercmd -h' for more - it tries to auto-detect and convert numbers).
Also, I just committed a small patch to master in order to improve the debugging, if you can try it, then it will be sure if the parameter is read ok or (very unlikely) altered inside translation.
Cheers, Daniel
error: 500 - execution failed Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: ctl [../../io_wait.h:390]: DBG: io_watch_add(0xb72d3860, 16, 3, 0x8541f48), fd_no=1 Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: ctl [io_listener.c:452]: handle_stream read: new connection (1) on /tmp/sip-proxy_ctl Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: dialplan [dp_repl.c:308]: regex operator testing Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: dialplan [dp_repl.c:308]: regex operator testing Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: dialplan [dp_repl.c:308]: regex operator testing Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: dialplan [dp_repl.c:308]: regex operator testing Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: dialplan [dp_repl.c:308]: regex operator testing Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: dialplan [dp_repl.c:308]: regex operator testing Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: dialplan [dp_repl.c:308]: regex operator testing Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: dialplan [dp_repl.c:337]: no matching rule Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: dialplan [dialplan.c:537]: could not translate 2147483647 with dpid 10 Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: ctl [io_listener.c:505]: handle_stream read: eof on /tmp/sip-proxy_ctl Dec 30 08:33:28 sip /usr/sbin/sip-proxy[17355]: DEBUG: ctl [../../io_wait.h:617]: DBG: io_watch_del (0xb72d3860, 16, -1, 0x10) fd_no=2 called
-- juha
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Daniel-Constantin Mierla writes:
Or, if your tool is using sercmd to send the dp_translate command, try prefixing the parameter with 's:' to tell is string (see 'sercmd -h' for more - it tries to auto-detect and convert numbers).
it works as
# sip-proxy_ctl mi_dg dp_translate 10 s:9958814084445555 200 OK
Output:: +14084445555
ATTRIBUTES::
it is VERY confusing that s: needs to be used.
-- juha