Just noticed, Daniel already answered ) Got his answer as a new thread
somehow )
Regards,
Igor
On 03.08.2021 22:16, Igor Olhovskiy wrote:
Serdar,
Have you tried to clean variables before calling new
ds_select_domain(), that are using by dispatcher module failover?
Like
https://kamailio.org/docs/modules/5.3.x/modules/dispatcher.html#dispatcher.…
and so on?
But as I got, you're saying, that calling ds_select_domain() with
different setid's in a case of fail, not really fails, but using "old"
available destinations from previous attempt?
Regards,
Igor
On 29.07.2021 11:19, Serdar GÜÇLÜER wrote:
>
>
> Hello all,
>
> I have a trouble that is related to the way of usage of dispatcher
> module.
>
> I am working with Kamailio 5.3.2 and using dispatcher module as load
> balancer to route calls to the media gateways.
>
> My dispatching routes are below as simply,
>
> route[DISPATCH] {
> if(ds_select_domain("2", "4")) {
> route(MYRELAY);
> } else {
>
send_reply("503","Service Unavailable - No MGW");
> exit;
> }
> }
> route[MYRELAY] {
> t_on_failure("MYFAILURE");
> if(!t_relay()) {
> sl_reply_error();
> }
> exit;
> }
> failure_route[MYFAILURE] {
> route(NATMANAGE);
> revert_uri();
> if (t_is_canceled()) {
> exit;
> }
> if ($T_reply_code == 408 || $T_reply_code == 503) {
> if(ds_next_domain()) {
> route(MYRELAY);
> } else {
> send_reply("503","Service Unavailable");
> exit;
> }
> } else {
> if(ds_select_domain("6", "4")) {
> route(MYVMRELAY);
> } else {
> send_reply(486,"Busy");
> exit;
> }
> }
> }
> route[MYVMRELAY] {
> t_on_failure("MYVMFAILURE");
> if(!t_relay()) {
> sl_reply_error();
> }
> exit;
> }
> failure_route[MYVMFAILURE] {
> route(NATMANAGE);
> revert_uri();
> if (t_is_canceled()) {
> exit;
> }
> if(ds_next_domain()) {
> route(MYVMRELAY);
> } else {
> send_reply("503","Service Unavailable");
> exit;
> }
> }
>
>
> I have multiple media gateways(setid=2) and voicemail
> servers(setid=6). As can be seen from the configuration,
> after first routing, for transaction reply code except 408 or 503, I
> am routing call to the voicemail server using dispatcher.
> In that phase, dispatcher module is remembering previously loaded
> destinations that come from first ds_select_domain
> and module try to route these destinations in the case that all
> voicemail servers are unavailable.
> So basically, I want to unload all destinations comes from previous
> ds_select_domain.
>
> From the documentation, i tried ds_load_update and ds_load_unset
> methods but not worked for me.
>
> Is there any way to overcome that problem or any right usages of
> these methods.
>
> Thank you,
>
> Serdar
>
>
>
>
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions
> *sr-users(a)lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to the sender!
> Edit mailing list options or unsubscribe:
> *https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users