[OpenSIPS-Users] dispatcher wired behavior

Răzvan Crainea razvan at opensips.org
Mon Mar 9 09:11:42 CET 2015


Hi, Satish!

If you want to stop OpenSIPS from failing over to next FS2, you should 
not call t_relay() in failure_route for the 404 status.

Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 03/08/2015 03:57 PM, Satish Patel wrote:
> I have two Freeswitch in dispatcher, everything works great but i have 
> notice in sip trace if FS1 receive 404 SIP code then it sending it to 
> next FS2, i think it should stop there instead of forwarding next FS2
>
> Following is my config
>
> #### Dispatcher
> loadmodule "dispatcher.so"
> modparam("dispatcher", "dst_avp", "$avp(271)")
> modparam("dispatcher", "grp_avp", "$avp(272)")
> modparam("dispatcher", "cnt_avp", "$avp(273)")
> modparam("dispatcher", "ds_ping_interval", 5)
> modparam("dispatcher", "ds_probing_threshhold", 5)
> modparam("dispatcher", "ds_probing_mode", 0)
> modparam("dispatcher", "options_reply_codes", "501, 403, 200")
> modparam("dispatcher", "db_url", 
> "mysql://opensips:xxxxxxxx@localhost/opensips")
>
>
> ...
> ...
>
> route[to_dispatcher] {
>
>         # Dispatch to FS
>         if ( !ds_select_dst("1", "4", "FM10")) {
>                 send_reply("500","Unable to dispatch call to Freeswitch");
>                 exit;
>         } else {
>         xlog("L_WARN", "dispatcher: Attempting to dispatch call to 
> $du\n");
>         }
>         t_on_failure("dispatcher_rollover");
>         t_relay();
> }
>
> failure_route[dispatcher_rollover] {
>         if (t_was_cancelled()) {
>                 exit;
>         }
>         if (t_check_status("408") && t_local_replied("all")) {
>         xlog("L_NOTICE", "dispatcher: connection timeout: $rd\n");
>         ds_mark_dst("p");
>         }
>         if(!ds_next_dst()) {
>                 xlog("L_ERR", "dispatcher: No more dispatcher in route 
> set\n");
>                 t_reply("500", "Temporary failure");
>                 exit;
>         }
>         xlog("L_INFO", "dispatcher: attempting relay to new 
> dispatcher: $du\n");
>         t_on_failure("dispatcher_rollover");
>         t_relay();
> }
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20150309/1b8e4374/attachment.htm>


More information about the Users mailing list