[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 885
  • Last Modified:

Problem with dispatcher module OpenSer 1.3

Hello,

I have installed openSer 1.3 with dispatcher module. I am getting an error and I cant figure out whats going on. Please help me how to fix this error. Thanks in advance.

Roman
+++++++++++++++++++  ERROR WITH DEBUG ++++++++++++++++
Feb  5 11:26:06 [5301] DBG:core:yyparse: loading module /usr/local/lib/openser/modules/sl.so
Feb  5 11:26:06 [5301] DBG:core:yyparse: loading module /usr/local/lib/openser/modules/tm.so
Feb  5 11:26:06 [5301] DBG:core:register_module: register_pv: tm
Feb  5 11:26:06 [5301] DBG:core:pv_add_extra: extra items list is not initialized
Feb  5 11:26:06 [5301] DBG:core:yyparse: loading module /usr/local/lib/openser/modules/rr.so
Feb  5 11:26:06 [5301] DBG:core:yyparse: loading module /usr/local/lib/openser/modules/maxfwd.so
Feb  5 11:26:06 [5301] DBG:core:yyparse: loading module /usr/local/lib/openser/modules/dispatcher.so
Feb  5 11:26:06 [5301] DBG:core:set_mod_param_regex: dispatcher matches module dispatcher
Feb  5 11:26:06 [5301] DBG:core:set_mod_param_regex: found <list_file> in module dispatcher [/usr/local/lib/openser/modules/dispatcher.so]
Feb  5 11:26:06 [5301] DBG:core:set_mod_param_regex: dispatcher matches module dispatcher
Feb  5 11:26:06 [5301] DBG:core:set_mod_param_regex: found <force_dst> in module dispatcher [/usr/local/lib/openser/modules/dispatcher.so]
Feb  5 11:26:06 [5301] DBG:core:set_mod_param_regex: rr matches module rr
Feb  5 11:26:06 [5301] DBG:core:set_mod_param_regex: found <enable_full_lr> in module rr [/usr/local/lib/openser/modules/rr.so]
Feb  5 11:26:06 [5301] DBG:core:find_cmd_export_t: found <mf_process_maxfwd_header>(1) in module maxfwd [/usr/local/lib/openser/modules/maxfwd.so]
Feb  5 11:26:06 [5301] DBG:core:find_cmd_export_t: found <sl_send_reply>(2) in module sl [/usr/local/lib/openser/modules/sl.so]
Feb  5 11:26:06 [5301] DBG:core:find_cmd_export_t: found <loose_route>(0) in module rr [/usr/local/lib/openser/modules/rr.so]
Feb  5 11:26:06 [5301] DBG:core:find_cmd_export_t: found <t_relay>(0) in module tm [/usr/local/lib/openser/modules/tm.so]
Feb  5 11:26:06 [5301] DBG:core:find_cmd_export_t: found <record_route>(0) in module rr [/usr/local/lib/openser/modules/rr.so]
Feb  5 11:26:06 [5301] DBG:core:find_cmd_export_t: found <t_on_failure>(1) in module tm [/usr/local/lib/openser/modules/tm.so]
Feb  5 11:26:06 [5301] DBG:core:find_cmd_export_t: found <t_relay>(0) in module tm [/usr/local/lib/openser/modules/tm.so]
Feb  5 11:26:06 [5301] DBG:core:find_cmd_export_t: found <t_on_failure>(1) in module tm [/usr/local/lib/openser/modules/tm.so]
Feb  5 11:26:06 [5301] DBG:core:find_cmd_export_t: found <t_relay>(0) in module tm [/usr/local/lib/openser/modules/tm.so]
Feb  5 11:26:06 [5301] DBG:core:find_cmd_export_t: found <ds_select_dst>(2) in module dispatcher [/usr/local/lib/openser/modules/dispatcher.so]
Feb  5 11:26:06 [5301] DBG:core:find_cmd_export_t: found <t_on_failure>(1) in module tm [/usr/local/lib/openser/modules/tm.so]
Feb  5 11:26:06 [5301] DBG:core:find_cmd_export_t: found <t_relay>(0) in module tm [/usr/local/lib/openser/modules/tm.so]
Feb  5 11:26:06 [5301] DBG:core:find_cmd_export_t: <ds_select_dst> not found 
Feb  5 11:26:06 [5301] DBG:core:find_cmd_export_t: found <ds_select_dst>(2) in module dispatcher [/usr/local/lib/openser/modules/dispatcher.so]
Feb  5 11:26:06 [5301] CRITICAL:core:yyerror: parse error in config file, line 70, column 22-23: Command cannot be used in the block
 
Feb  5 11:26:06 [5301] DBG:core:find_cmd_export_t: found <t_on_failure>(1) in module tm [/usr/local/lib/openser/modules/tm.so]
Feb  5 11:26:06 [5301] DBG:core:find_cmd_export_t: found <t_relay>(0) in module tm [/usr/local/lib/openser/modules/tm.so]
Feb  5 11:26:06 [5301] ERROR:core:main: bad config file (1 errors)
Feb  5 11:26:06 [5301] DBG:dispatcher:destroy: destroying module ...
Feb  5 11:26:06 [5301] DBG:tm:tm_shutdown: tm_shutdown : start
Feb  5 11:26:06 [5301] DBG:tm:tm_shutdown: emptying hash table
Feb  5 11:26:06 [5301] DBG:tm:tm_shutdown: releasing timers
Feb  5 11:26:06 [5301] DBG:tm:tm_shutdown: removing semaphores
Feb  5 11:26:06 [5301] DBG:tm:tm_shutdown: destroying callback lists
Feb  5 11:26:06 [5301] DBG:tm:tm_shutdown: tm_shutdown : done
Feb  5 11:26:06 [5301] DBG:core:shm_mem_destroy:
 
+++++++++++++++++++  openser.cfg ++++++++++++++++
debug=4          # debug level (cmd line: -dddddddddd)
fork=no
log_stderror=yes  # (cmd line: -E)
 
children=8
check_via=no      # (cmd. line: -v)
dns=off           # (cmd. line: -r)
rev_dns=off       # (cmd. line: -R)
port=5060
#fifo="/tmp/openser_fifo_5060"
listen=10.10.10.66:5060
 
 
#set module path
mpath="/usr/local/lib/openser/modules/"
# ------------------ module loading ----------------------------------
loadmodule "/usr/local/lib/openser/modules/sl.so"
loadmodule "/usr/local/lib/openser/modules/tm.so"
loadmodule "/usr/local/lib/openser/modules/rr.so"
# loadmodule "mi_fifo.so"
loadmodule "/usr/local/lib/openser/modules/maxfwd.so"
loadmodule "/usr/local/lib/openser/modules/dispatcher.so"
 
# ----------------- setting module-specific parameters ---------------
modparam("dispatcher", "list_file", "/usr/local/etc/openser/dispatcher.list")
modparam("dispatcher", "force_dst", 1)
 
# ----- mi_fifo params -----
# modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")
 
modparam("rr", "enable_full_lr", 1)
 
route{
        if ( !mf_process_maxfwd_header("10") )
        {
                sl_send_reply("483","To Many Hops");
                drop();
        };
 
        if (loose_route()) 
        {
                t_relay();
                exit;
        };
 
        record_route();
 
        if(uri=~"^sip:.*2122222222@") {
                rewritehostport("10.10.10.10:5060");
                t_on_failure("1");
                t_relay();
                exit;
        };
 
        if(uri=~"^sip:.*2127777777@") {
                rewritehostport("10.10.10.10:5060");
                t_on_failure("1");
                t_relay();
                exit;
        };
 
 
        ds_select_dst("2", "0");
        t_on_failure("1");
        t_relay();
}
 
 failure_route[1]{
        ds_select_dst("2", "0");
        t_on_failure("1");
        t_relay();
 }
 
+++++++++++++++++++  disptacher.list ++++++++++++++++
# $Id: dispatcher.list 2 2005-06-13 16:47:24Z bogdan_iancu $
# dispatcher destination sets
#
 
# gateways
2 sip:10.10.10.69:5060
2 sip:10.10.10.67:5060
2 sip:10.10.10.68:5060

Open in new window

0
dizel247
Asked:
dizel247
  • 3
  • 3
1 Solution
 
grbladesCommented:
I dont know this software but this line in the debug looks significant:-

Feb  5 11:26:06 [5301] CRITICAL:core:yyerror: parse error in config file, line 70, column 22-23: Command cannot be used in the block

0
 
dizel247Author Commented:
i am aware that the mistake on line 70 i dont know how to fix it.

Thanks for respond,

Roman
0
 
grbladesCommented:
Can you repost the config file by itself. Posting it as an attachment would be better rather than copying and pasting the contents.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
dizel247Author Commented:
sure,

Please find bellow my config file.

#########################################
debug=4          # debug level (cmd line: -dddddddddd)
fork=no
log_stderror=yes  # (cmd line: -E)
 
children=8
check_via=no      # (cmd. line: -v)
dns=off           # (cmd. line: -r)
rev_dns=off       # (cmd. line: -R)
port=5060
#fifo="/tmp/openser_fifo_5060"
listen=10.10.10.66:5060
 
 
#set module path
mpath="/usr/local/lib/openser/modules/"
# ------------------ module loading ----------------------------------
loadmodule "/usr/local/lib/openser/modules/sl.so"
loadmodule "/usr/local/lib/openser/modules/tm.so"
loadmodule "/usr/local/lib/openser/modules/rr.so"
# loadmodule "mi_fifo.so"
loadmodule "/usr/local/lib/openser/modules/maxfwd.so"
loadmodule "/usr/local/lib/openser/modules/dispatcher.so"
 
# ----------------- setting module-specific parameters ---------------
modparam("dispatcher", "list_file", "/usr/local/etc/openser/dispatcher.list")
modparam("dispatcher", "force_dst", 1)
 
# ----- mi_fifo params -----
# modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")
 
modparam("rr", "enable_full_lr", 1)
 
route{
        if ( !mf_process_maxfwd_header("10") )
        {
                sl_send_reply("483","To Many Hops");
                drop();
        };
 
        if (loose_route())
        {
                t_relay();
                exit;
        };
 
        record_route();
 
        if(uri=~"^sip:.*2122222222@") {
                rewritehostport("10.10.10.10:5060");
                t_on_failure("1");
                t_relay();
                exit;
        };
 
        if(uri=~"^sip:.*2127777777@") {
                rewritehostport("10.10.10.10:5060");
                t_on_failure("1");
                t_relay();
                exit;
        };
 
 
        ds_select_dst("2", "0");
        t_on_failure("1");
        t_relay();
}
 
 failure_route[1]{
        ds_select_dst("2", "0");
        t_on_failure("1");
        t_relay();
}
0
 
grbladesCommented:
I dont think ds_select_dst can be used within a failure_route
Try commenting it out and seeing if you then get the same error.
0
 
dizel247Author Commented:
it worked thanks
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now