<HTML>
<HEAD>
<TITLE>Dialplan Segfaults with Blank Fields</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>I was having problem with control panel (dialplan) so I decides to enter diaplan rules using mysql commands. If I dont populate the fields “sub_exp” and “repl_exp”, opensips will segfault when doing a opensipsctl fifo dp_reload. What Im a doing wrong?<BR>
<BR>
insert into dialplan (dpid,pr,match_op,match_exp,match_len) values ('0','1','1','911','0');<BR>
<BR>
Which is just a simple rule that matches 911 but doesn’t manipulate it.<BR>
<BR>
My debug looks like this:<BR>
<BR>
<BR>
Jun 3 10:40:51 os2 /sbin/opensips[31304]: DBG:db_mysql:db_mysql_str2val: converting INT [0] <BR>
Jun 3 10:40:52 os2 /sbin/opensips[31304]: DBG:db_mysql:db_mysql_str2val: converting INT [1] <BR>
Jun 3 10:40:52 os2 /sbin/opensips[31304]: DBG:db_mysql:db_mysql_str2val: converting INT [1] <BR>
Jun 3 10:40:52 os2 /sbin/opensips[31304]: DBG:db_mysql:db_mysql_str2val: converting STRING [911] <BR>
Jun 3 10:40:52 os2 /sbin/opensips[31304]: DBG:db_mysql:db_mysql_str2val: converting INT [0] <BR>
Jun 3 10:40:52 os2 /sbin/opensips[31304]: DBG:db_mysql:db_mysql_str2val: converting STRING [] <BR>
Jun 3 10:40:52 os2 last message repeated 2 times<BR>
Jun 3 10:40:52 os2 /sbin/opensips[31304]: DBG:dialplan:build_rule: build_rule <BR>
Jun 3 10:40:52 os2 /sbin/opensips[31304]: DBG:dialplan:build_rule: references:2 , max:2 <BR>
Jun 3 10:40:52 os2 /sbin/opensips[31304]: DBG:dialplan:build_rule: attrs are <BR>
Jun 3 10:40:52 os2 /sbin/opensips[31304]: DBG:dialplan:add_rule2hash: new dpl_id 0 <BR>
Jun 3 10:40:52 os2 /sbin/opensips[31304]: DBG:dialplan:add_rule2hash: new index , len 0 <BR>
Jun 3 10:40:52 os2 /sbin/opensips[31304]: DBG:dialplan:add_rule2hash: added the rule id 0 index 0 pr 1 next (nil) to the index with 0 len <BR>
Jun 3 10:40:52 os2 /sbin/opensips[31304]: DBG:dialplan:build_rule: build_rule <BR>
Jun 3 10:40:52 os2 /sbin/opensips[31304]: DBG:dialplan:build_rule: references:2 , max:1 <BR>
Jun 3 10:40:52 os2 /sbin/opensips[31304]: DBG:dialplan:build_rule: attrs are <BR>
Jun 3 10:40:52 os2 /sbin/opensips[31304]: DBG:dialplan:add_rule2hash: added the rule id 0 index 0 pr 1 next (nil) to the index with 0 len <BR>
Jun 3 10:40:52 os2 /sbin/opensips[31304]: DBG:dialplan:build_rule: build_rule <BR>
Jun 3 10:40:52 os2 kernel: opensips[31304]: segfault at 0000000000000020 rip 00002b2b257e79cc rsp 00007fffaf333910 error 4<BR>
Jun 3 10:40:52 os2 /sbin/opensips[31314]: CRITICAL:core:receive_fd: EOF on 19 <BR>
Jun 3 10:40:52 os2 /sbin/opensips[31266]: INFO:core:handle_sigs: child process 31304 exited by a signal 11 <BR>
Jun 3 10:40:52 os2 /sbin/opensips[31314]: DBG:core:handle_ser_child: dead child 11, pid 31304 (shutting down?) <BR>
Jun 3 10:40:53 os2 /sbin/opensips[31266]: INFO:core:handle_sigs: core was generated <BR>
Jun 3 10:40:53 os2 /sbin/opensips[31314]: DBG:core:io_watch_del: io_watch_del (0x745920, 19, -1, 0x0) fd_no=21 called <BR>
Jun 3 10:40:53 os2 /sbin/opensips[31266]: INFO:core:handle_sigs: terminating due to SIGCHLD <BR>
Jun 3 10:40:53 os2 /sbin/opensips[31301]: INFO:core:sig_usr: signal 15 received <BR>
Jun 3 10:40:53 os2 /sbin/opensips[31314]: INFO:core:sig_usr: signal 15 received <BR>
</SPAN></FONT>
</BODY>
</HTML>