Skip to content

Commit 4508553

Browse files
authored
fix(kamailio): Store contact to be used for BYE only if there are multiple Record-Route (#83)
1 parent 86c1d56 commit 4508553

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/kamailio/config/kamailio.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ request_route {
242242
record_route();
243243

244244
# Store Contact URI for later use in dialog, especially for BYE requests
245-
if (is_method("INVITE") && has_body("application/sdp") && $dlg_var(direction)== "in") {
245+
if (is_method("INVITE") && has_body("application/sdp") && $dlg_var(direction)== "in" && $rr_count > 1) {
246246
# Store the Contact header from 200 OK responses to INVITE
247247
$dlg_var(target_contact) = $ct;
248248
if ($shv(debug) == 1) xlog('L_WARN', "[DEV] - $ci $rm-$cs - Stored Contact: $dlg_var(target_contact) \n");

0 commit comments

Comments
 (0)