Hello,
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:439
439new_rule->dpid=VAL_INT(values);
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.
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
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
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
Kamailio (OpenSER) Advanced Training
Jan 24-26, 2011, Irvine, CA, USA
http://www.asipto.com