I would put these in an $xavp array and iterate through them in a failure_route.
On Tue, Jan 21, 2020 at 11:09:51PM +0200, George Diamantopoulos wrote:
Hello all,
I'm trying to accomplish the following scenario, and some questions have been raised during testing: I'd like to be able to fork serially to a number of downstream destinations in case of failure, but also try several hosts which are available per destination network before failing over to the next one. To that end, I'm using something similar to the following:
request_route { ... $vn(some_var) = "some_value"; $vn(some_other_var) = "some_other_value"; ... $avp(provider_order) = "last_provider"; $avp(provider_order) = "first_provider"; ... t_set_fr(120000, 2000); route(PROVIDER_SELECTION); ... }
route[PROVIDER_SELECTION] { if ( is_avp_set("$avp(provider_order)") ) { t_on_failure("PROVIDER_SERIAL"); if ( $avp(provider_priority) == "first_provider" )
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users