Hello,
there is (still) some incoherence in dispatcher module regarding the marking of a destination (e.g., to inactive state) and execution of event route.
First, which I tried to address earlier today, was that ds_mark_dst() was taking in consideration the value of ds_probing_threshold, which was intended for keepalives, so the use of the function was not having any effect (as documented) till it was used so many times as the parameter value, probably not noticed so far because the default value for the parameter is 1. Similar would be for setting destination active and the value of ds_inactive_threshold.
Going on the same execution path as with setting the state of a destination based on keepalives, the use of ds_mark_dst() results in running the event routes, which I am not sure it is really expected. But then, setting the state of a destination via RPC is not running event routes and it was done immediately via reinitialising the state, without any relation to ds_probing_threshold or ds_inactive_threshold.
So the questions would be:
1) the documented way is the expected one on admin-instructed state update (via config functions or rpc), respectively do it immediately, without considering ds_probing_threshold or ds_inactive_threshold? It is like now in git master branch, but for many years the config functions took in consideration the parameters.
2) shall event routes be executed only on SIP keepalives, or also on admin-instructed state update (via config functions or rpc)? Or leave it only for keepalives and config functions, like it is now, with updating documentation to be clear.
Cheers, Daniel