Link to home
Start Free TrialLog in
Avatar of dizel247
dizel247

asked on

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

Avatar of grblades
grblades
Flag of United Kingdom of Great Britain and Northern Ireland image

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

Avatar of dizel247
dizel247

ASKER

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

Thanks for respond,

Roman
Can you repost the config file by itself. Posting it as an attachment would be better rather than copying and pasting the contents.
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();
}
ASKER CERTIFIED SOLUTION
Avatar of grblades
grblades
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
it worked thanks