Hi Daniel
Hello,I just did a configuration file with dialplan and a record like you showed and it started ok. My log messages are pasted next:
On 11/23/10 12:36 PM, Javier Gallart wrote:Hi,
same result after adding a second row in the table.
0(10267) DEBUG: db_mysql [km_res.c:136]: use DB1_STRING result type
0(10267) DEBUG: db_mysql [km_dbase.c:354]: converting row 0 of 1 count 1
0(10267) DEBUG: <core> [db_row.c:119]: allocate 160 bytes for row values at 0x82f53f4
0(10267) DEBUG: <core> [db_val.c:73]: converting INT [1]
0(10267) DEBUG: <core> [db_val.c:73]: converting INT [1]
0(10267) DEBUG: <core> [db_val.c:73]: converting INT [1]
0(10267) DEBUG: <core> [db_val.c:117]: converting STRING [^00]
0(10267) DEBUG: <core> [db_val.c:73]: converting INT [0]
0(10267) DEBUG: <core> [db_val.c:117]: converting STRING [^00]
0(10267) DEBUG: <core> [db_val.c:117]: converting STRING [011]
0(10267) DEBUG: <core> [db_val.c:117]: converting STRING [dp1]
0(10267) DEBUG: dialplan [dp_db.c:387]: build_rule
0(10267) DEBUG: dialplan [dp_db.c:447]: attrs are dp1
0(10267) DEBUG: dialplan [dp_db.c:493]: new dpl_id 1
0(10267) DEBUG: dialplan [dp_db.c:506]: new index , len 0
0(10267) DEBUG: dialplan [dp_db.c:542]: added the rule id 1 index 0 pr 1 next (nil) to the index with 0 len
0(10267) DEBUG: <core> [db_res.c:54]: freeing 1 rows
Is it a fresh installation or an update over an older installation? If is the second, can you doublecheck to see if all modules were compiled and installed at the same time and are no longer older versions?
Also, what is your operating system and architecture type?
I tried with both master/devel and 3.1 branches.
Thanks,
Daniel
Regards
Javier_______________________________________________ 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
On Tue, Nov 23, 2010 at 11:17 AM, Daniel-Constantin Mierla <miconda@gmail.com> wrote:
Thanks, I will look over it and try to reproduce in the lab, it may take a bit since I am pretty much time offline these days.
Can you add a second rule and see what happens? At the first sight of the debug messages, the result from database is ok, should not be a null value there.
Cheers,
Daniel
On 11/23/10 10:38 AM, Javier Gallart wrote:Thanks Daniel
you can find both the gdb and ./kamailio output at http://pastebin.ca/1999786
Regards
Javier_______________________________________________ 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
On Mon, Nov 22, 2010 at 10:19 PM, Daniel-Constantin Mierla <miconda@gmail.com> wrote:
Hello,this looks a bit strange at first sight, 'values' parameter is NULL and should not happen. Besides that, in build_rule() functions there are other uses of 'values' before line 439, so the crash should have been earlier.
On 11/22/10 5:32 PM, Javier Gallart wrote:Hello
I'd like to do some tests with the dialplan module, but Kamailio is crashing when it loads it. Actually the module is properly loaded if the table is empty, but it fails when a row is added; so I guess it's related with the way I've inserted the values. A core file is generated:
Core was generated by `./kamailio -f ../etc/kamailio/kamailio.cfg'.Program terminated with signal 11, Segmentation fault.#0 build_rule (values=0x0) at dp_db.c:439439 new_rule->dpid = VAL_INT(values);
Please send full backtrace of the core, in gdb, run 'bt' command (or better 'bt full').
Also, if this reproducible, run:
./kamailio -f ../etc/kamailio/kamailio.cfg -E -dddd
and send the output.
Cheers,
Daniel
_______________________________________________ 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
This is the relevant config:
#----- dialplan params ---modparam("dialplan", "db_url", "mysql://xxxx:yyyyy@localhost/db")modparam("dialplan", "table_name", "dialplan")modparam("dialplan", "dpid_col", "dpid")modparam("dialplan", "attrs_pvar", "$avp(s:dp_attrs)")
mysql> describe dialplan;+-----------+------------------+------+-----+---------+----------------+| Field | Type | Null | Key | Default | Extra |+-----------+------------------+------+-----+---------+----------------+| id | int(10) unsigned | NO | PRI | NULL | auto_increment || dpid | int(11) | NO | | NULL | || pr | int(11) | NO | | NULL | || match_op | int(11) | NO | | NULL | || match_exp | varchar(64) | NO | | NULL | || match_len | int(11) | NO | | NULL | || subst_exp | varchar(64) | NO | | NULL | || repl_exp | varchar(32) | NO | | NULL | || attrs | varchar(32) | NO | | NULL | |+-----------+------------------+------+-----+---------+----------------+9 rows in set (0.00 sec)
mysql> select * from dialplan;+----+------+----+----------+-----------+-----------+-----------+----------+-------+| id | dpid | pr | match_op | match_exp | match_len | subst_exp | repl_exp | attrs |+----+------+----+----------+-----------+-----------+-----------+----------+-------+| 1 | 1 | 1 | 1 | ^00 | 0 | ^00 | 011 | dp1 |+----+------+----+----------+-----------+-----------+-----------+----------+-------+1 row in set (0.00 sec)
I'm probably making some stupid mistake...any clue?
Thanks in advance
Javier
-- Daniel-Constantin Mierla Kamailio (OpenSER) Advanced Training Jan 24-26, 2011, Irvine, CA, USA http://www.asipto.com
-- Daniel-Constantin Mierla Kamailio (OpenSER) Advanced Training Jan 24-26, 2011, Irvine, CA, USA http://www.asipto.com
-- Daniel-Constantin Mierla Kamailio (OpenSER) Advanced Training Jan 24-26, 2011, Irvine, CA, USA http://www.asipto.com