Happy Eastern
Kamailio 5.4 used.
On dialogues calls, I noticed this happening on the second re-invite to refresh the session from the B side.
dlg_onroute(): unable to find dialog for INVITE with route param 'df9.da75' [2557:22445] and call-id '14148a68-f1b2-485d-b5a2-f9dd7773d2c0'
The did df9.da75 is identical to the one in the route-header on the first re-invite from the B side, before this one. No CDR was (yet) generated, and the dialogues is still present and on-going according to the database:
CallID [14148a68-f1b2-485d-b5a2-f9dd7773d2c0] H-Entry: 2557 H-ID: 22445
But most probably not in memory as kamcmd dlg.stat_active shows zero (this is on a development node, so no other calls running).
There are no sip messages that end the call in between those two re-invites. I see no session timeouts or similar in the logs.
Any hint what could cause Kamailio not to find the corresponding dialogue on this re-invite?
Hi Again
Any hint what could cause Kamailio not to find the corresponding dialogue on this re-invite?
I went through syslog and found out, that in between the two re-invites some stuff got reloaded by a cronjob:
KAMCMD="/usr/sbin/kamcmd" $KAMCMD dispatcher.reload $KAMCMD htable.reload spithash $KAMCMD mtree.reload rules $KAMCMD mtree.reload prefix $KAMCMD mtree.reload antispoof
Could this cause kamailio to forget about running dialogues? That could also explain, why I keep seeing the dialogue tables filling up with stale dialogues over time.
Hi Again
Narrowing down the issue with dialogues disappearing.
It looks like something is not working as I expect with the session timers.
modparam("sst", "enable_stats", 0) modparam("sst", "min_se", 1800) modparam("sst", "sst_flag", 6) modparam("sst", "timeout_avp", "$avp(dlgtimeout)")
modparam("dialog", "timeout_avp", "$avp(dlgtimeout)") modparam("dialog", "send_bye", 1) modparam("dialog", "dlg_match_mode", 1) modparam("dialog", "ka_timer", 0) modparam("dialog", "ka_interval", 30 ) modparam("dialog", "enable_stats", 1 ) modparam("dialog", "detect_spirals", 1 ) modparam("dialog", "default_timeout", 43200 )
request_route {
# Initial Invite... if ($rm == "INVITE" && !has_totag()) { if(is_present_hf("Session-Expires")) { $avp(dlgtimeout) = $(hdr(Session-Expires){s.int}); } }
# handle requests within SIP dialogs if (has_totag()) { route(WITHINDLG); exit; }
}
route[WITHINDLG] { if (loose_route()) { setflag(6); dlg_manage(); route(RELAY); exit; } }
From my understanding of the docs, this should extend the session timer on every re-invite, but that does not seem to happen.
Maybe I'm confused by the flags. The sst module shows examples where both flags are used.
modparam("dialog", "dlg_flag", 5) modparam("sst", "sst_flag", 6)
But when reading the docs to the dialog modules, I understood that the dlg_flag is purely optional and does not need to be set when using dlg_manage as I do. Maybe it's not optional when using dialog AND sst together?
Also I wonder why no BYE is being sent, when the dialogue times out, despite being configured that way.