Hi, Use debug=4 when doing the ds_next_dst() - see the setdebug() function : http://www.opensips.org/Documentation/Script-CoreFunctions-1-11#toc47
Also try an avp_print() after ds_select_dst() to see what data is kept into transaction.
Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 16.09.2014 18:18, Satish Patel wrote:
Thanks for point out but still its not working, does my flags looks good? "F" or do i need something else? If i manually shutdown FS1 then it is going inside failure route and saying "No more gateways in route set" but i have FS2 active state and if i call again next call works.. do i need to set some like ( !ds_select_dst("1", "4", "F")) in failure_route ?route[to_dispatcher] { # Dispatch to FS if ( !ds_select_dst("1", "4", "F")) { send_reply("500","Unable to dispatch call to Freeswitch"); exit; ... ... failure_route[dispatcher_rollover] { xlog("Inside dispatcher failure route\n"); if (t_was_cancelled()) { exit; } ds_mark_dst("p"); if(!ds_next_dst()) {xlog("L_ERR", "R-DISPATCHER-ROLLOVER:$ci No more gateways in route set\n");t_reply("503", "Out of gateways"); exit; }xlog("L_INFO", "R-DISPATCHER-ROLLOVER:$ci Attempting relay to new gateway: $rd:$rp\n");t_on_failure("dispatcher_rollover"); t_relay();On Tue, Sep 16, 2014 at 3:16 AM, Bogdan-Andrei Iancu <[email protected] <mailto:[email protected]>> wrote:Hi, your logic in failure route is broken - do the "ds_mark_dst" before selecting a new destination via "ds_next_dst". Firs mark the used one as probing and then use the next one. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 16.09.2014 07:59, Satish Patel wrote:following is my config, I have two Freeswitch, if i stop one of freeswitch and call it won't failover itself. but if again i call if send call to other FS and if again i call it send to failed one but not auto failover.. But after my prob detect it is dead then it change status from Active to Probing but that detection time is (10 to 30 second around), mean time it should failover call to other freeswitch right? we have 1000 call per second and 10/30 second if big :( #### Dispatcher loadmodule "dispatcher.so" modparam("dispatcher", "dst_avp", "$avp(i:271)") modparam("dispatcher", "attrs_avp", "$avp(i:272)") modparam("dispatcher", "grp_avp", "$avp(i:273)") modparam("dispatcher", "cnt_avp", "$avp(i:274)") modparam("dispatcher", "ds_ping_interval", 5) modparam("dispatcher", "ds_probing_threshhold", 10) modparam("dispatcher", "ds_probing_mode", 1) modparam("dispatcher", "options_reply_codes", "501, 403, 200") modparam("dispatcher", "db_url", "mysql://opensips:opensipsrw@localhost/opensips") route[to_dispatcher] { # Dispatch to FS if ( !ds_select_dst("1", "4", "F")) { 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"); route(relay); } failure_route[dispatcher_rollover] { xlog("Inside dispatcher failure route\n"); if (t_was_cancelled()) { exit; } if(!ds_next_dst()) { xlog("L_ERR", "R-DISPATCHER-ROLLOVER:$ci No more gateways in route set\n"); t_reply("503", "Out of gateways"); exit; } ds_mark_dst("p"); xlog("L_INFO", "R-DISPATCHER-ROLLOVER:$ci Attempting relay to new gateway: $rd:$rp\n"); t_on_failure("dispatcher_rollover"); route(relay); } _______________________________________________ Users mailing list [email protected] <mailto:[email protected]> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
