[OpenSIPS-Users] OpenSIPS CP Dialplan Edit

James Palic James_Palic at onlc.com
Thu Jan 23 17:50:13 CET 2014


Using OpenSIPS Control Panel 5.0, I am unable to edit entries made in
the dialplan module.  Adding works fine.  Clicking the pencil icon to
edit and then saving results in losing any text in the matching
expression, substitution expression and replacement expression fields.
(Bogdan this issue was identified during the OpenSIPS eBootcamp that
began Nov 2013)

 

In dialplan.php (dated 2011-10-20), after if ($action=="modify") (line
253) there are three instances where the PHP function
my_real_escape_string is used.  Line 289 processes $match_exp, line 317
is $subst_exp and line 319 is $repl_exp.  

 

In each instance, the format is:  mysql_real_escape_string( $var,
$link).  This function (in my case) seems to always return an empty
string thus explaining why saving loses the value of these three
variables.  If the function is called without the $link parameter:
mysql_real_escape_string( $var ) then the return value is not an empty
string and the values are retained.

 

When I add a debug statement to see what the value of the $link variable
is I get: MDB2_Driver_mysql: (phptype = mysql, dbsyntax = mysql)
[connected] .  I don't know enough about how PHP is connecting to the
database to say whether or not this is the problem but not using $link
results in the edits saving as expected.  

 

Jim

 

 

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20140123/024f9592/attachment-0001.htm>


More information about the Users mailing list