[SR-Users] Re: Dialog + DMQ: dlg_ontimeout() triggered on wrong node!
Hi I'm opening an issue on github as I consider this a bug. This fixes the issue: route[DMQ_CAPTURE] { if(is_method("KDMQ")) { if(has_body("application/json") && $fU == 'dialog') { if (jansson_get("lifetime", $rb, "$var(lifetime)")) { $var(new_lifetime) = $var(lifetime) + 60; # Add 60 seconds on DMQ peer to make sure it expires AFTER main node. $var(newrb) = $rb; jansson_set("integer", "lifetime", $var(new_lifetime), "$var(newrb)"); set_body("$var(newrb)","application/json"); msg_apply_changes(); } } dmq_handle_message(); exit; } } Mit freundlichen Grüssen -Benoît Panizzon- -- I m p r o W a r e A G-Leiter Commerce Kunden __ Zurlindenstrasse 29 Tel +41 61 826 93 00 CH-4133 PrattelnFax +41 61 826 93 01 Schweiz Web http://www.imp.ch __ __ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
[SR-Users] Re: Dialog + DMQ: dlg_ontimeout() triggered on wrong node!
Hi Some more testing... It looks like, in REPLY_ROUTE if (is_known_dlg()) { dlg_set_timeout("3"); xlog("L_INFO", "$cfg(route): DEBUG DLG Lifetime $dlg(lifetime)\n"); } indeed does set the lifetime to 3 seconds. Unfortunately this is replicated on the other DMQ node which then again has a 50% chance of wrongfully triggering timeout after 3 seconds instead of what the default is. So no luck in setting a generous default lifetime and then shortening the lifetime on the node handling the case to make sure it is the one triggering the timeout. I had a quick glimpse into the source. As an n00b coder, I think I understand that the dmq message is parsed and then timer inserted or updated on all dmq nodes when a DQM dialog message is received. I fear, this causes this behaviour of the timer expiring on the wrong node. So is this a bug? Shall I report an issue on github? -- Mit freundlichen Grüssen -Benoît Panizzon- @ HomeOffice und normal erreichbar -- I m p r o W a r e A G-Leiter Commerce Kunden __ Zurlindenstrasse 29 Tel +41 61 826 93 00 CH-4133 PrattelnFax +41 61 826 93 01 Schweiz Web http://www.imp.ch __ __ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
[SR-Users] Re: Dialog + DMQ: dlg_ontimeout() triggered on wrong node!
Hi > Shall I try by setting the default_timeout and then use a timeout_avp > to set that timeout slightly lower AFTER the dialog has started? Or > would this be synced to the other node too? No, this does not work. Tested on our dev platform (Kamailio 5.6) by setting default_timeout to 5 seconds and trying to lower this value to 3 seconds during call to force the timeout being triggered on the node which is handling the call. modparam("dialog", "default_timeout", 5 ) modparam("dialog", "timeout_avp", "$avp(dlgtimeout)") $avp(dlgtimeout) = 3; dlg_manage(); => Still timing out after 5 seconds, about half the attempts on wrong node. dlg_manage(); $avp(dlgtimeout) = 3; => Still timing out after 5 seconds, same issue. $dlg_ctx(default_timeout) = 3 => Invalid! event_route[dialog:start] { $avp(dlgtimeout) = 3 } => Still timing out after 5 seconds, same issue. Ping Olle and Alex. Any idea how to fix this issue? -- Mit freundlichen Grüssen -Benoît Panizzon- @ HomeOffice und normal erreichbar -- I m p r o W a r e A G-Leiter Commerce Kunden __ Zurlindenstrasse 29 Tel +41 61 826 93 00 CH-4133 PrattelnFax +41 61 826 93 01 Schweiz Web http://www.imp.ch __ __ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe: