Re: [OpenSIPS-Users] Opensips-cp Dialplan Problem
Yes Alex, most CP modules except for dialplan work. Well, I haven't tested all of them, but at least drouting, monit, permissions, domains, mi commands and user management all work. Do I know db connection seems fine with those. All 3 of my test machines give the same results. They are all centos 5.4 with mysql 5.0.77, php 5.1.6 On 6/14/10 4:28 AM, "Alex Ionescu" wrote: > Hi Sven, > > I think I have a clue about your problem. > In the code we call mysql_real_escape string like this : > "mysql_real_escape_string($match_exp,$link)" ... you get the following error > (on our test platform it runs free of warnings) : > PHP Warning: mysql_real_escape_string() expects parameter 2 to be resource > > If you check this > http://php.net/manual/en/function.mysql-real-escape-string.php you will see > that the warning message that you are getting is caused by the lack of > connection to the db. As it is said in the php online manual : > > If the link identifier is not specified, the last link opened by > mysql_connect() <http://www.php.net/manual/en/function.mysql-connect.php> is > assumed. If no such link is found, it will try to create one as if > mysql_connect() <http://www.php.net/manual/en/function.mysql-connect.php> was > called with no arguments. If no connection is found or established, an > E_WARNING level error is generated. > > So, my guess is that there is something wrong with your db connection, since > on our platform works ... > You could try to see if the rest of the modules run error free and let me > know, maybe we can narrow down the possible causes of this issue. > > Regards, > Alex > > > On 6/11/2010 21:07, Sven Schulz wrote: >> Re: [OpenSIPS-Users] Opensips-cp Dialplan Problem Alex, >> >> I just took the latest from svn trunk and still getting the same results. >> I did see these php warnings in the log, not sure igf its helpful or not: >> >> [11-Jun-2010 14:00:39] PHP Notice: Undefined variable: dpid in >> /var/www/opensips-cp/web/tools/system/dialplan/template/dialplan.add.php on >> line 91 >> [11-Jun-2010 14:00:39] PHP Notice: Undefined variable: pr in >> /var/www/opensips-cp/web/tools/system/dialplan/template/dialplan.add.php on >> line 97 >> [11-Jun-2010 14:00:39] PHP Notice: Undefined variable: match_exp in >> /var/www/opensips-cp/web/tools/system/dialplan/template/dialplan.add.php on >> line 109 >> [11-Jun-2010 14:00:39] PHP Notice: Undefined variable: match_len in >> /var/www/opensips-cp/web/tools/system/dialplan/template/dialplan.add.php on >> line 115 >> [11-Jun-2010 14:00:39] PHP Notice: Undefined variable: subst_exp in >> /var/www/opensips-cp/web/tools/system/dialplan/template/dialplan.add.php on >> line 121 >> [11-Jun-2010 14:00:39] PHP Notice: Undefined variable: repl_exp in >> /var/www/opensips-cp/web/tools/system/dialplan/template/dialplan.add.php on >> line 127 >> [11-Jun-2010 14:00:57] PHP Warning: mysql_real_escape_string() expects >> parameter 2 to be resource, object given in >> /var/www/opensips-cp/web/tools/system/dialplan/dialplan.php on line 119 >> [11-Jun-2010 14:00:57] PHP Warning: mysql_real_escape_string() expects >> parameter 2 to be resource, object given in >> /var/www/opensips-cp/web/tools/system/dialplan/dialplan.php on line 139 >> [11-Jun-2010 14:00:57] PHP Warning: mysql_real_escape_string() expects >> parameter 2 to be resource, object given in >> /var/www/opensips-cp/web/tools/system/dialplan/dialplan.php on line 141 >> [11-Jun-2010 14:00:57] PHP Notice: Undefined index: dialplan_id in >> /var/www/opensips-cp/web/tools/system/dialplan/template/dialplan.main.php on >> line 28 >> >> >> >> On 6/10/10 11:18 AM, "Alex Ionescu" wrote: >> >> >>> Hi Sven, >>> >>> I've tried exactly your example. It worked for me. >>> Please take the last version of opensips-cp from svn trunk. Maybe that will >>> work for you. >>> >>> Regards, >>> Alex >>> On 6/4/2010 16:12, Sven Schulz wrote: >>> >>>> Re: [OpenSIPS-Users] Opensips-cp Dialplan Problem For example, if I use >>>> control panel cp to add a new rule: >>>> >>>> DialplanID = 0 >>>> Rule Priority = 1 >>>> Matching Operator=1 >>>> Matching reg exp= ^(2|3|5|7)[0-9]{4} >>>> Matching str len=0 >>>> Subst Reg Exp= (^(2|3|5|7)[0-9]{4}) >>>> Repl Reg Exp=181486\1 >>>> Attr= I leave this blank unchecked >>>> >>>> Then the webpage doesn¹t give any errors and
Re: [OpenSIPS-Users] Opensips-cp Dialplan Problem
Hi Sven, I think I have a clue about your problem. In the code we call mysql_real_escape string like this : "mysql_real_escape_string($match_exp,$link)" ... you get the following error (on our test platform it runs free of warnings) : PHP Warning: mysql_real_escape_string() expects parameter 2 to be resource If you check this http://php.net/manual/en/function.mysql-real-escape-string.php you will see that the warning message that you are getting is caused by the lack of connection to the db. As it is said in the php online manual : If the link identifier is not specified, the last link opened by mysql_connect() <http://www.php.net/manual/en/function.mysql-connect.php> is assumed. If no such link is found, it will try to create one as if mysql_connect() <http://www.php.net/manual/en/function.mysql-connect.php> was called with no arguments. If no connection is found or established, an *E_WARNING* level error is generated. So, my guess is that there is something wrong with your db connection, since on our platform works ... You could try to see if the rest of the modules run error free and let me know, maybe we can narrow down the possible causes of this issue. Regards, Alex On 6/11/2010 21:07, Sven Schulz wrote: Alex, I just took the latest from svn trunk and still getting the same results. I did see these php warnings in the log, not sure igf its helpful or not: [11-Jun-2010 14:00:39] PHP Notice: Undefined variable: dpid in /var/www/opensips-cp/web/tools/system/dialplan/template/dialplan.add.php on line 91 [11-Jun-2010 14:00:39] PHP Notice: Undefined variable: pr in /var/www/opensips-cp/web/tools/system/dialplan/template/dialplan.add.php on line 97 [11-Jun-2010 14:00:39] PHP Notice: Undefined variable: match_exp in /var/www/opensips-cp/web/tools/system/dialplan/template/dialplan.add.php on line 109 [11-Jun-2010 14:00:39] PHP Notice: Undefined variable: match_len in /var/www/opensips-cp/web/tools/system/dialplan/template/dialplan.add.php on line 115 [11-Jun-2010 14:00:39] PHP Notice: Undefined variable: subst_exp in /var/www/opensips-cp/web/tools/system/dialplan/template/dialplan.add.php on line 121 [11-Jun-2010 14:00:39] PHP Notice: Undefined variable: repl_exp in /var/www/opensips-cp/web/tools/system/dialplan/template/dialplan.add.php on line 127 [11-Jun-2010 14:00:57] PHP Warning: mysql_real_escape_string() expects parameter 2 to be resource, object given in /var/www/opensips-cp/web/tools/system/dialplan/dialplan.php on line 119 [11-Jun-2010 14:00:57] PHP Warning: mysql_real_escape_string() expects parameter 2 to be resource, object given in /var/www/opensips-cp/web/tools/system/dialplan/dialplan.php on line 139 [11-Jun-2010 14:00:57] PHP Warning: mysql_real_escape_string() expects parameter 2 to be resource, object given in /var/www/opensips-cp/web/tools/system/dialplan/dialplan.php on line 141 [11-Jun-2010 14:00:57] PHP Notice: Undefined index: dialplan_id in /var/www/opensips-cp/web/tools/system/dialplan/template/dialplan.main.php on line 28 On 6/10/10 11:18 AM, "Alex Ionescu" wrote: Hi Sven, I've tried exactly your example. It worked for me. Please take the last version of opensips-cp from svn trunk. Maybe that will work for you. Regards, Alex On 6/4/2010 16:12, Sven Schulz wrote: Re: [OpenSIPS-Users] Opensips-cp Dialplan Problem For example, if I use control panel cp to add a new rule: DialplanID = 0 Rule Priority = 1 Matching Operator=1 Matching reg exp= ^(2|3|5|7)[0-9]{4} Matching str len=0 Subst Reg Exp= (^(2|3|5|7)[0-9]{4}) Repl Reg Exp=181486\1 Attr= I leave this blank unchecked Then the webpage doesn't give any errors and creates the rule like this: DialplanID = 0 Rule Priority = 1 Matching Operator=1 Matching reg exp= Matching str len=0 Subst Reg Exp= Repl Reg Exp= Attr= Then I hit apply changes to do a dp_reload and the box segfaults. Im running Centos5.4 64 bit and using cp version 4.0 On 6/4/10 5:53 AM, "Alex Ionescu" wrote: Hi Sven, I have tested the latest version of CP (taken from SVN). I've inserted a few rules, and it worked just fine. All the fields were populated. Can you be more specific please ? Regards, Alex On 6/3/2010 16:55, Sven Schulz wrote: Opensips-cp Dialplan Problem Using opensips-cp latest version from SVN. Whenever I use CP to insert a new rule, some of the fields arnt populated. ___ Users mailing list Users@lists.opensips.org
Re: [OpenSIPS-Users] Opensips-cp Dialplan Problem
Alex, I just took the latest from svn trunk and still getting the same results. I did see these php warnings in the log, not sure igf its helpful or not: [11-Jun-2010 14:00:39] PHP Notice: Undefined variable: dpid in /var/www/opensips-cp/web/tools/system/dialplan/template/dialplan.add.php on line 91 [11-Jun-2010 14:00:39] PHP Notice: Undefined variable: pr in /var/www/opensips-cp/web/tools/system/dialplan/template/dialplan.add.php on line 97 [11-Jun-2010 14:00:39] PHP Notice: Undefined variable: match_exp in /var/www/opensips-cp/web/tools/system/dialplan/template/dialplan.add.php on line 109 [11-Jun-2010 14:00:39] PHP Notice: Undefined variable: match_len in /var/www/opensips-cp/web/tools/system/dialplan/template/dialplan.add.php on line 115 [11-Jun-2010 14:00:39] PHP Notice: Undefined variable: subst_exp in /var/www/opensips-cp/web/tools/system/dialplan/template/dialplan.add.php on line 121 [11-Jun-2010 14:00:39] PHP Notice: Undefined variable: repl_exp in /var/www/opensips-cp/web/tools/system/dialplan/template/dialplan.add.php on line 127 [11-Jun-2010 14:00:57] PHP Warning: mysql_real_escape_string() expects parameter 2 to be resource, object given in /var/www/opensips-cp/web/tools/system/dialplan/dialplan.php on line 119 [11-Jun-2010 14:00:57] PHP Warning: mysql_real_escape_string() expects parameter 2 to be resource, object given in /var/www/opensips-cp/web/tools/system/dialplan/dialplan.php on line 139 [11-Jun-2010 14:00:57] PHP Warning: mysql_real_escape_string() expects parameter 2 to be resource, object given in /var/www/opensips-cp/web/tools/system/dialplan/dialplan.php on line 141 [11-Jun-2010 14:00:57] PHP Notice: Undefined index: dialplan_id in /var/www/opensips-cp/web/tools/system/dialplan/template/dialplan.main.php on line 28 On 6/10/10 11:18 AM, "Alex Ionescu" wrote: > Hi Sven, > > I've tried exactly your example. It worked for me. > Please take the last version of opensips-cp from svn trunk. Maybe that will > work for you. > > Regards, > Alex > On 6/4/2010 16:12, Sven Schulz wrote: >> Re: [OpenSIPS-Users] Opensips-cp Dialplan Problem For example, if I use >> control panel cp to add a new rule: >> >> DialplanID = 0 >> Rule Priority = 1 >> Matching Operator=1 >> Matching reg exp= ^(2|3|5|7)[0-9]{4} >> Matching str len=0 >> Subst Reg Exp= (^(2|3|5|7)[0-9]{4}) >> Repl Reg Exp=181486\1 >> Attr= I leave this blank unchecked >> >> Then the webpage doesn¹t give any errors and creates the rule like this: >> >> DialplanID = 0 >> Rule Priority = 1 >> Matching Operator=1 >> Matching reg exp= >> Matching str len=0 >> Subst Reg Exp= >> Repl Reg Exp= >> Attr= >> >> Then I hit apply changes to do a dp_reload and the box segfaults. >> >> Im running Centos5.4 64 bit and using cp version 4.0 >> >> >> >> >> On 6/4/10 5:53 AM, "Alex Ionescu" wrote: >> >> >>> Hi Sven, >>> >>> I have tested the latest version of CP (taken from SVN). >>> I've inserted a few rules, and it worked just fine. All the fields were >>> populated. >>> Can you be more specific please ? >>> >>> Regards, >>> Alex >>> On 6/3/2010 16:55, Sven Schulz wrote: >>> >>>> Opensips-cp Dialplan Problem Using opensips-cp latest version from SVN. >>>> >>>> Whenever I use CP to insert a new rule, some of the fields arnt populated. >>>> >>>> >>>> ___ >>>> Users mailing list >>>> Users@lists.opensips.org >>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>>> >>>> >>> >>> >> >> >> >> ___ >> Users mailing list >> Users@lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Opensips-cp Dialplan Problem
Hi Sven, I've tried exactly your example. It worked for me. Please take the last version of opensips-cp from svn trunk. Maybe that will work for you. Regards, Alex On 6/4/2010 16:12, Sven Schulz wrote: For example, if I use control panel cp to add a new rule: DialplanID = 0 Rule Priority = 1 Matching Operator=1 Matching reg exp= ^(2|3|5|7)[0-9]{4} Matching str len=0 Subst Reg Exp= (^(2|3|5|7)[0-9]{4}) Repl Reg Exp=181486\1 Attr= I leave this blank unchecked Then the webpage doesn't give any errors and creates the rule like this: DialplanID = 0 Rule Priority = 1 Matching Operator=1 Matching reg exp= Matching str len=0 Subst Reg Exp= Repl Reg Exp= Attr= Then I hit apply changes to do a dp_reload and the box segfaults. Im running Centos5.4 64 bit and using cp version 4.0 On 6/4/10 5:53 AM, "Alex Ionescu" wrote: Hi Sven, I have tested the latest version of CP (taken from SVN). I've inserted a few rules, and it worked just fine. All the fields were populated. Can you be more specific please ? Regards, Alex On 6/3/2010 16:55, Sven Schulz wrote: Opensips-cp Dialplan Problem Using opensips-cp latest version from SVN. Whenever I use CP to insert a new rule, some of the fields arnt populated. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Alex Ionescu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Opensips-cp Dialplan Problem
For example, if I use control panel cp to add a new rule: DialplanID = 0 Rule Priority = 1 Matching Operator=1 Matching reg exp= ^(2|3|5|7)[0-9]{4} Matching str len=0 Subst Reg Exp= (^(2|3|5|7)[0-9]{4}) Repl Reg Exp=181486\1 Attr= I leave this blank unchecked Then the webpage doesn¹t give any errors and creates the rule like this: DialplanID = 0 Rule Priority = 1 Matching Operator=1 Matching reg exp= Matching str len=0 Subst Reg Exp= Repl Reg Exp= Attr= Then I hit apply changes to do a dp_reload and the box segfaults. Im running Centos5.4 64 bit and using cp version 4.0 On 6/4/10 5:53 AM, "Alex Ionescu" wrote: > Hi Sven, > > I have tested the latest version of CP (taken from SVN). > I've inserted a few rules, and it worked just fine. All the fields were > populated. > Can you be more specific please ? > > Regards, > Alex > On 6/3/2010 16:55, Sven Schulz wrote: >> Opensips-cp Dialplan Problem Using opensips-cp latest version from SVN. >> >> Whenever I use CP to insert a new rule, some of the fields arnt populated. >> >> >> ___ >> Users mailing list >> Users@lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Opensips-cp Dialplan Problem
Hi Sven, I have tested the latest version of CP (taken from SVN). I've inserted a few rules, and it worked just fine. All the fields were populated. Can you be more specific please ? Regards, Alex On 6/3/2010 16:55, Sven Schulz wrote: Using opensips-cp latest version from SVN. Whenever I use CP to insert a new rule, some of the fields arnt populated. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Alex Ionescu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Opensips-cp Dialplan Problem
Hi Sven, can you give a real example ? what CP version are you using? Regards, Bogdan Sven Schulz wrote: > Using opensips-cp latest version from SVN. > > Whenever I use CP to insert a new rule, some of the fields arnt > populated. > > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Opensips-cp Dialplan Problem
Using opensips-cp latest version from SVN. Whenever I use CP to insert a new rule, some of the fields arnt populated. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users