<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Ok,<br>
<br>
there was a ; missing in the partition modparam, which is getting
a step further<br>
<br>
dialplanis loading:<br>
Mar 22 17:11:40 gl-sip-01 /usr/sbin/opensips[3866]:
INFO:dialplan:mod_init: initializing module...<br>
Mar 22 17:11:40 gl-sip-01 /usr/sbin/opensips[3866]:
DBG:dialplan:dp_print_list: Partition default url
<a class="moz-txt-link-abbreviated" href="mailto:mysql://root:opensips@192.168.36.85:3306/opensips">mysql://root:opensips@192.168.36.85:3306/opensips</a> table dialplan<br>
Mar 22 17:11:40 gl-sip-01 /usr/sbin/opensips[3866]:
DBG:dialplan:dp_print_list: Partition greenlight url
<a class="moz-txt-link-abbreviated" href="mailto:mysql://root:opensips@192.168.36.85:3306/opensips">mysql://root:opensips@192.168.36.85:3306/opensips</a> table dialplan<br>
Mar 22 17:11:40 gl-sip-01 /usr/sbin/opensips[3866]:
DBG:dialplan:init_data: Adding partition with name [default]<br>
Mar 22 17:11:40 gl-sip-01 /usr/sbin/opensips[3866]:
DBG:dialplan:dp_add_connection: Added dialplan partition [default]
table [dialplan].<br>
Mar 22 17:11:40 gl-sip-01 /usr/sbin/opensips[3866]:
DBG:dialplan:init_data: Adding partition with name [greenlight]<br>
Mar 22 17:11:40 gl-sip-01 /usr/sbin/opensips[3866]:
DBG:dialplan:dp_add_connection: Added dialplan partition
[greenlight] table [dialplan].<br>
Mar 22 17:11:40 gl-sip-01 /usr/sbin/opensips[3866]:
DBG:core:init_mod: register MI for dialplan<br>
Mar 22 17:11:40 gl-sip-01 /usr/sbin/opensips[3867]:
DBG:core:init_mod_child: type=PROC_MODULE, rank=-2,
module=dialplan<br>
Mar 22 17:11:40 gl-sip-01 /usr/sbin/opensips[3868]:
DBG:core:init_mod_child: type=PROC_MODULE, rank=-2,
module=dialplan<br>
Mar 22 17:11:40 gl-sip-01 /usr/sbin/opensips[3872]:
DBG:core:init_mod_child: type=CHILD, rank=2, module=dialplan<br>
Mar 22 17:11:40 gl-sip-01 /usr/sbin/opensips[3866]:
DBG:core:init_mod_child: type=PROC_MAIN, rank=0, module=dialplan<br>
Mar 22 17:11:40 gl-sip-01 /usr/sbin/opensips[3874]:
DBG:core:init_mod_child: type=CHILD, rank=4, module=dialplan<br>
Mar 22 17:11:40 gl-sip-01 /usr/sbin/opensips[3873]:
DBG:core:init_mod_child: type=CHILD, rank=3, module=dialplan<br>
<br>
<br>
the problem now is the MI commands are failing<br>
<br>
dp_translate default:10 01382843843 gives the following:<br>
<br>
<br>
ERROR:dialplan:mi_translate: Wrong id parameter - should be an
integer<br>
<br>
Also the documentation implies that this should work without the
partition and the partition is an optional parameter.<br>
<br>
<br>
without the partition <br>
<b>dp_translate 10 01382843843 </b> you get<br>
<pre>400 Wrong db connection para</pre>
<br>
/usr/sbin/opensips[3905]: ERROR:dialplan:mi_translate: Unable to
get connection<br>
<br>
<br>
<br>
although the MI is not working (could be incorrect syntax)<br>
<br>
the route script seems to be despite the regex not matching<br>
<br>
Mar 22 17:20:15 gl-sip-01 /usr/sbin/opensips[4033]:
DBG:dialplan:dp_translate_f: dpid is 10 partition is default<br>
Mar 22 17:20:15 gl-sip-01 /usr/sbin/opensips[4033]:
DBG:dialplan:dp_get_svalue: searching 15<br>
Mar 22 17:20:15 gl-sip-01 /usr/sbin/opensips[4033]:
DBG:dialplan:dp_translate_f: input is 0800800150<br>
Mar 22 17:20:15 gl-sip-01 /usr/sbin/opensips[4033]:
DBG:dialplan:dp_translate_f: Checking with dpid 10<br>
Mar 22 17:20:15 gl-sip-01 /usr/sbin/opensips[4033]:
DBG:dialplan:translate: Regex operator testing. Got result: -1<br>
Mar 22 17:20:15 gl-sip-01 /usr/sbin/opensips[4033]:
DBG:dialplan:translate: No matching rule for input 0800800150<br>
Mar 22 17:20:15 gl-sip-01 /usr/sbin/opensips[4033]:
DBG:dialplan:dp_translate_f: could not translate 0800800150 with
dpid 10<br>
Mar 22 17:20:15 gl-sip-01 /usr/sbin/opensips[4033]:
DBG:dialplan:dp_translate_f: dpid is 10 partition is default<br>
Mar 22 17:20:15 gl-sip-01 /usr/sbin/opensips[4033]:
DBG:dialplan:dp_get_svalue: searching 15<br>
Mar 22 17:20:15 gl-sip-01 /usr/sbin/opensips[4033]:
DBG:dialplan:dp_translate_f: input is 0800800150<br>
Mar 22 17:20:15 gl-sip-01 /usr/sbin/opensips[4033]:
DBG:dialplan:dp_translate_f: Checking with dpid 10<br>
Mar 22 17:20:15 gl-sip-01 /usr/sbin/opensips[4033]:
DBG:dialplan:translate: Regex operator testing. Got result: -1<br>
Mar 22 17:20:15 gl-sip-01 /usr/sbin/opensips[4033]:
DBG:dialplan:translate: No matching rule for input 0800800150<br>
Mar 22 17:20:15 gl-sip-01 /usr/sbin/opensips[4033]:
DBG:dialplan:dp_translate_f: could not translate 0800800150 with
dpid 10<br>
Mar 22 17:20:15 gl-sip-01 /usr/sbin/opensips[4033]:
DBG:dialplan:dp_get_ivalue: searching 78<br>
Mar 22 17:20:15 gl-sip-01 /usr/sbin/opensips[4033]:
DBG:dialplan:dp_get_svalue: searching 78<br>
Mar 22 17:20:15 gl-sip-01 /usr/sbin/opensips[4033]:
DBG:dialplan:dp_translate_f: dpid is 10 partition is greenlight<br>
Mar 22 17:20:15 gl-sip-01 /usr/sbin/opensips[4033]:
DBG:dialplan:dp_get_svalue: searching 14<br>
Mar 22 17:20:15 gl-sip-01 /usr/sbin/opensips[4033]:
DBG:dialplan:dp_translate_f: input is <a class="moz-txt-link-freetext" href="sip:0800800150@192.168.36.85">sip:0800800150@192.168.36.85</a><br>
Mar 22 17:20:15 gl-sip-01 /usr/sbin/opensips[4033]:
DBG:dialplan:dp_translate_f: Checking with dpid 10<br>
Mar 22 17:20:15 gl-sip-01 /usr/sbin/opensips[4033]:
DBG:dialplan:translate: Regex operator testing. Got result: -1<br>
Mar 22 17:20:15 gl-sip-01 /usr/sbin/opensips[4033]:
DBG:dialplan:translate: No matching rule for input
<a class="moz-txt-link-freetext" href="sip:0800800150@192.168.36.85">sip:0800800150@192.168.36.85</a><br>
Mar 22 17:20:15 gl-sip-01 /usr/sbin/opensips[4033]:
DBG:dialplan:dp_translate_f: could not translate
<a class="moz-txt-link-freetext" href="sip:0800800150@192.168.36.85">sip:0800800150@192.168.36.85</a> with dpid 10<br>
<br>
<br>
<br>
<br>
Regards,<br>
<br>
Richard<br>
<br>
<br>
On 22/03/2016 16:13, Bogdan-Andrei Iancu wrote:<br>
</div>
<blockquote cite="mid:56F16F2C.5000207@opensips.org" type="cite">Hi
Richard,
<br>
<br>
Have you provided the partition name while firing the MI command ?
<br>
<br>
See
<a class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/2.1.x/dialplan.html#id294353">http://www.opensips.org/html/docs/modules/2.1.x/dialplan.html#id294353</a>
(1.8.2. dp_translate)
<br>
<br>
Regards,
<br>
<br>
Bogdan-Andrei Iancu
<br>
OpenSIPS Founder and Developer
<br>
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
<br>
<br>
On 22.03.2016 14:28, Richard Robson wrote:
<br>
<blockquote type="cite">Hi,
<br>
<br>
I'm trying to use the dialplan module, but every time I get a
"400 Wrong
<br>
db connection para"
<br>
<br>
the connection is the same for all other modules, which are
working fine
<br>
and I can connect via opensipsCP, mysql and phpmyadmin.
<br>
<br>
I'm using version 2.1
<br>
<br>
Mar 22 12:22:13 gl-sip-01 opensips: ERROR:dialplan:mi_translate:
Unable
<br>
to get connection
<br>
Mar 22 12:22:13 gl-sip-01 opensips:
DBG:mi_datagram:mi_datagram_server:
<br>
command process (dp_translate)succeded
<br>
Mar 22 12:22:13 gl-sip-01 opensips:
DBG:mi_datagram:mi_datagram_server:
<br>
the response: 400 Wrong db connection para#012 has been sent in
29 octets
<br>
<br>
Dialplan table:
<br>
<br>
+----+------+------+----------+------------------+-------------+-----------+----------+---------+----------+-------+
<br>
| id | dpid | pr | match_op | match_exp | match_flags |
<br>
subst_exp | repl_exp | timerec | disabled | attrs |
<br>
+----+------+------+----------+------------------+-------------+-----------+----------+---------+----------+-------+
<br>
| 1 | 10 | 1 | 1 | "^0[1-9][0-9]+$" | 0 |
<br>
"^0(.*)$" | "44\0" | | 0 | |
<br>
+----+------+------+----------+------------------+-------------+-----------+----------+---------+----------+-------+
<br>
<br>
<br>
#### Dialplan ####
<br>
loadmodule "dialplan.so"
<br>
modparam("dialplan", "db_url",
<br>
<a class="moz-txt-link-rfc2396E" href="mailto:mysql://root:opensips@127.0.0.1:3306/opensips">"mysql://root:opensips@127.0.0.1:3306/opensips"</a>)
<br>
<br>
I also tried with the same results:
<br>
modparam("dialplan", "partition", " default : table_name =
dialplan ;
<br>
db_url = <a class="moz-txt-link-abbreviated" href="mailto:mysql://root:opensips@127.0.0.1:3306/opensips">mysql://root:opensips@127.0.0.1:3306/opensips</a>")
<br>
<br>
does anyone know why this is happening for this module only
<br>
<br>
Regards,
<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Richard Robson
Greenlight Support
01382 843843
<a class="moz-txt-link-abbreviated" href="mailto:support@greenlightcrm.com">support@greenlightcrm.com</a></pre>
</body>
</html>