Hi, somebody can help me?? I am trying to set up OpenSer 1.0.1 like dispatcher to loadbalance and failover but when I use ds_next_dst() for failover I obtain the next error: 0(19024) parse error (128,25-26): unknown command, missing loadmodule?
ERROR: bad config file (1 errors)
My config file is the next:
loadmodule "/lib/openser/modules/sl.so" loadmodule "/lib/openser/modules/tm.so" loadmodule "/lib/openser/modules/rr.so" loadmodule "/lib/openser/modules/maxfwd.so" loadmodule "/lib/openser/modules/usrloc.so" loadmodule "/lib/openser/modules/registrar.so" loadmodule "/lib/openser/modules/textops.so" loadmodule "/lib/openser/modules/dispatcher.so" loadmodule "/lib/openser/modules/avpops.so"
modparam("dispatcher", "list_file", "/usr/local/etc/openser/dispatcher.list") modparam("dispatcher", "force_dst", 1) modparam("dispatcher", "flags", 2)
route{
if ( !mf_process_maxfwd_header("10") ) { sl_send_reply("483","To Many Hops"); drop(); };
ds_select_dst("2","0"); sl_send_reply("100","Trying"); forward(uri:host, uri:port); t_on_failure("1"); if (!t_relay()) { sl_reply_error(); return; }; }
failure_route[1] {
if (t_check_status("408")) { if (ds_next_dst()) { # On Failure: Choose next Proxy t_on_failure("1"); # Relay to Proxy t_relay(); } else { t_reply("503", "Service not available"); return; } } }
I try to use modparam("dispatcher", "dst_avp_id", 100) but I obtain:
0(19260) set_mod_param_regex: parameter <dst_avp_id> not found in module <dispatcher> 0(19260) parse error (86,21-22): Can't set module parameter 0(19260) parse error (128,25-26): unknown command, missing loadmodule?
ERROR: bad config file (2 errors)
--------------------------------- Do You Yahoo!? La mejor conexión a Internet y 2GB extra a tu correo por $100 al mes. http://net.yahoo.com.mx
Look line 128, columns 25 and 26... there is something wrong.... ;)
Edson.
P.S.: After fixing, try openser c <Your-config-file> to get rid all syntax errors. :-)
_____
From: users-bounces@openser.org [mailto:users-bounces@openser.org] On Behalf Of Jose Gil Navarrete Sent: segunda-feira, 10 de julho de 2006 21:06 To: users@openser.org Subject: [Users] Problem with module dispatcher funtion ds_next_dst()
Hi, somebody can help me?? I am trying to set up OpenSer 1.0.1 like dispatcher to loadbalance and failover but when I use ds_next_dst() for failover I obtain the next error: 0(19024) parse error (128,25-26): unknown command, missing loadmodule?
ERROR: bad config file (1 errors)
My config file is the next:
loadmodule "/lib/openser/modules/sl.so" loadmodule "/lib/openser/modules/tm.so" loadmodule "/lib/openser/modules/rr.so" loadmodule "/lib/openser/modules/maxfwd.so" loadmodule "/lib/openser/modules/usrloc.so" loadmodule "/lib/openser/modules/registrar.so" loadmodule "/lib/openser/modules/textops.so" loadmodule "/lib/openser/modules/dispatcher.so" loadmodule "/lib/openser/modules/avpops.so"
modparam("dispatcher", "list_file", "/usr/local/etc/openser/dispatcher.list") modparam("dispatcher", "force_dst", 1) modparam("dispatcher", "flags", 2)
route{
if ( !mf_process_maxfwd_header("10") ) { sl_send_reply("483","To Many Hops"); drop(); };
ds_select_dst("2","0"); sl_send_reply("100","Trying"); forward(uri:host, uri:port); t_on_failure("1"); if (!t_relay()) { sl_reply_error(); return; }; }
failure_route[1] {
if (t_check_status("408")) { if (ds_next_dst()) { # On Failure: Choose next Proxy t_on_failure("1"); # Relay to Proxy t_relay(); } else { t_reply("503", "Service not available"); return; } } }
I try to use modparam("dispatcher", "dst_avp_id", 100) but I obtain:
0(19260) set_mod_param_regex: parameter <dst_avp_id> not found in module <dispatcher> 0(19260) parse error (86,21-22): Can't set module parameter 0(19260) parse error (128,25-26): unknown command, missing loadmodule?
ERROR: bad config file (2 errors)
_____
Do You Yahoo!? La mejor conexión a Internet y 2GB extra a tu correo por $100 al mes. http://net.yahoo.com.mx
I believe that the failover in the dispatcher was only introduced in the OpenSER 1.1 (not 1.0.1).
On Mon, 2006-07-10 at 19:06 -0500, Jose Gil Navarrete wrote:
Hi, somebody can help me?? I am trying to set up OpenSer 1.0.1 like dispatcher to loadbalance and failover but when I use ds_next_dst() for failover I obtain the next error: 0(19024) parse error (128,25-26): unknown command, missing loadmodule?
ds_select_dst("2","0"); sl_send_reply("100","Trying"); forward(uri:host, uri:port); t_on_failure("1"); if (!t_relay()) { sl_reply_error(); return; };
Wouldn't you do the following (OpenSER will do 100 for you... and you don't need to forward() and t_relay()...
ds_select_dst("2", "0"); t_on_failure("1"); if( !t_relay()) { sl_reply_error(); return; };
Just a thought...
Also, in your example, failure_route[1] will be called for things like 404 (not found), and 486 (busy), and you will be attempting the same thing again using different media gateways etc...
I get around this by using a t_on_reply("1") and in onreply_route[1] do
if( status =~ "18[0-9]" ) { t_on_failure("0"); }
So if you get a provisional response from your media gateway (ie a 180 Ringing, or 183 Session Progress) you don't do any more gateway attempts if you then get a 4xx/5xx/6xx response....
You may also wish in route{} to split out the handling of CANCEL, BYE, and INVITE. You want your INVITE to do the ds_select_dst(), but you should just be able to t_relay() your CANCELs and BYEs and OpenSER will match them to the selected destination based on an existing transaction.
YMMV but this is similar to what I have been doing and testing with OpenSER.
Cheers, Peter
Hi,
yes, that's right. OpenSER 1.0.1 dispatcher module does not contain the function/parameter you want to use. See: http://openser.org/docs/modules/1.0.x/dispatcher.html You need to use the 1.1.0 version: http://openser.org/docs/modules/1.1.x/dispatcher.html
regards, bogdan
Peter Childs wrote:
I believe that the failover in the dispatcher was only introduced in the OpenSER 1.1 (not 1.0.1).
On Mon, 2006-07-10 at 19:06 -0500, Jose Gil Navarrete wrote:
Hi, somebody can help me?? I am trying to set up OpenSer 1.0.1 like dispatcher to loadbalance and failover but when I use ds_next_dst() for failover I obtain the next error: 0(19024) parse error (128,25-26): unknown command, missing loadmodule?
ds_select_dst("2","0"); sl_send_reply("100","Trying"); forward(uri:host, uri:port); t_on_failure("1"); if (!t_relay()) { sl_reply_error(); return; };
Wouldn't you do the following (OpenSER will do 100 for you... and you don't need to forward() and t_relay()...
ds_select_dst("2", "0"); t_on_failure("1"); if( !t_relay()) { sl_reply_error(); return; };
Just a thought...
Also, in your example, failure_route[1] will be called for things like 404 (not found), and 486 (busy), and you will be attempting the same thing again using different media gateways etc...
I get around this by using a t_on_reply("1") and in onreply_route[1] do
if( status =~ "18[0-9]" ) { t_on_failure("0"); }
So if you get a provisional response from your media gateway (ie a 180 Ringing, or 183 Session Progress) you don't do any more gateway attempts if you then get a 4xx/5xx/6xx response....
You may also wish in route{} to split out the handling of CANCEL, BYE, and INVITE. You want your INVITE to do the ds_select_dst(), but you should just be able to t_relay() your CANCELs and BYEs and OpenSER will match them to the selected destination based on an existing transaction.
YMMV but this is similar to what I have been doing and testing with OpenSER.
Cheers, Peter
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users