[OpenSIPS-Users] Parse errore in config file

tom wish tomwish at gmail.com
Mon Jul 25 19:55:25 CEST 2011


I am trying to start opensips and am getting parse errors for bad
syntax.  I have followed everything I could find online and it looks
correct.

Could someone take a look and help me figure this out.

failure_route[1] {
        if (t_was_cancelled()) {
                exit;
        }

}

failure_route[12] {
 if (t_was_cancelled()) {
  exit;
 }

 if (t_check_status("408|5[0-9][0-9]")) {
{
  if (do_routing()) {
   t_on_failure("13");
   append_branch();
   route(1);
  };
  exit;
 } else if (t_check_status("3[0-9][0-9]")) {
  t_reply("404","Not found");
  exit;
 }
}

failure_route[13] {
 xlog("L_INFO", "entering failure_route[13] for reply code '$T_reply_code'\n");
 if (t_was_cancelled()) {
  exit;
 }
}


I am using 1.7 and the error is

Jul 24 13:38:30 [13314] CRITICAL:core:yyerror: parse error in config
file, line 379, column 1-14: syntax error
Jul 24 13:38:30 [13314] CRITICAL:core:yyerror: parse error in config
file, line 379, column 1-14: bad command!)
Jul 24 13:38:30 [13314] CRITICAL:core:yyerror: parse error in config
file, line 379, column 1-14: bad command!)
Jul 24 13:38:30 [13314] CRITICAL:core:yyerror: parse error in config
file, line 379, column 14-15: bad command!)
Jul 24 13:38:30 [13314] CRITICAL:core:yyerror: parse error in config
file, line 379, column 15-17: bad command!)
Jul 24 13:38:30 [13314] CRITICAL:core:yyerror: parse error in config
file, line 379, column 17-18: bad command!)
Jul 24 13:38:30 [13314] CRITICAL:core:yyerror: parse error in config
file, line 379, column 19-20: bad command!)
Jul 24 13:38:30 [13314] DBG:core:find_cmd_export_t: <t_was_cancelled> not found
Jul 24 13:38:30 [13314] DBG:core:find_cmd_export_t: found
<t_was_cancelled>(0) in module tm [/usr/local/lib/opensips/modules/]
Jul 24 13:38:30 [13314] CRITICAL:core:yyerror: parse error in config
file, line 380, column 22-23: Command cannot be used in the block

Jul 24 13:38:30 [13314] CRITICAL:core:yyerror: parse error in config
file, line 386, column 1-14: syntax error
Jul 24 13:38:30 [13314] CRITICAL:core:yyerror: parse error in config
file, line 386, column 1-14: bad command!)
Jul 24 13:38:30 [13314] CRITICAL:core:yyerror: parse error in config
file, line 386, column 1-14: bad command!)
Jul 24 13:38:30 [13314] CRITICAL:core:yyerror: parse error in config
file, line 386, column 14-15: bad command!)
Jul 24 13:38:30 [13314] CRITICAL:core:yyerror: parse error in config
file, line 386, column 15-17: bad command!)
Jul 24 13:38:30 [13314] CRITICAL:core:yyerror: parse error in config
file, line 386, column 17-18: bad command!)
Jul 24 13:38:30 [13314] CRITICAL:core:yyerror: parse error in config
file, line 386, column 19-20: bad command!)
Jul 24 13:38:30 [13314] DBG:core:find_cmd_export_t: <t_was_cancelled> not found
Jul 24 13:38:30 [13314] DBG:core:find_cmd_export_t: found
<t_was_cancelled>(0) in module tm [/usr/local/lib/opensips/modules/]
Jul 24 13:38:30 [13314] CRITICAL:core:yyerror: parse error in config
file, line 387, column 22-23: Command cannot be used in the block

Jul 24 13:38:30 [13314] DBG:core:find_cmd_export_t: found
<t_check_status>(1) in module tm [/usr/local/lib/opensips/modules/]
Jul 24 13:38:30 [13314] CRITICAL:core:yyerror: parse error in config
file, line 392, column 1-2: syntax error
Jul 24 13:38:30 [13314] CRITICAL:core:yyerror: parse error in config
file, line 392, column 1-2: bad command!)
Jul 24 13:38:30 [13314] CRITICAL:core:yyerror: parse error in config
file, line 392, column 1-2: bad command!)
Jul 24 13:38:30 [13314] DBG:core:find_cmd_export_t: found
<do_routing>(0) in module drouting [/usr/local/lib/opensips/modules/]
Jul 24 13:38:30 [13314] DBG:core:find_cmd_export_t: found
<t_on_failure>(1) in module tm [/usr/local/lib/opensips/modules/]
Jul 24 13:38:30 [13314] CRITICAL:core:yyerror: parse error in config
file, line 399, column 4-8: syntax error
Jul 24 13:38:30 [13314] CRITICAL:core:yyerror: parse error in config
file, line 399, column 4-8:
Jul 24 13:38:30 [13314] ERROR:core:main: bad config file (21 errors)


Thanks for your help.

Tom

-- 
Tom Wish



More information about the Users mailing list