[Asterisk-code-review] res_pjsip: Actually enable session timers when timers=always (asterisk[18])

Trevor Peirce asteriskteam at digium.com
Tue Jun 7 17:11:25 CDT 2022


Trevor Peirce has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/18611 )


Change subject: res_pjsip: Actually enable session timers when timers=always
......................................................................

res_pjsip: Actually enable session timers when timers=always

When a pjsip endpoint is defined with timers=always, this has been a
functional noop.  This patch correctly sets the feature bitmap to both
enable support for session timers and to enable them even when the
endpoint itself does not request or support timers.

ASTERISK-29603
Reported-By: Ray Crumrine

Change-Id: I8b5eeaa9ec7f50cc6d96dd34c2b4aa9c53fb5440
---
M res/res_pjsip/pjsip_configuration.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/11/18611/1

diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c
index 39c3dab..ace68d2 100644
--- a/res/res_pjsip/pjsip_configuration.c
+++ b/res/res_pjsip/pjsip_configuration.c
@@ -220,7 +220,7 @@
 	} else if (!strcasecmp(var->value, "required")) {
 		endpoint->extensions.flags |= PJSIP_INV_REQUIRE_TIMER;
 	} else if (!strcasecmp(var->value, "always") || !strcasecmp(var->value, "forced")) {
-		endpoint->extensions.flags |= PJSIP_INV_ALWAYS_USE_TIMER;
+		endpoint->extensions.flags |= (PJSIP_INV_SUPPORT_TIMER | PJSIP_INV_ALWAYS_USE_TIMER);
 	} else if (!ast_false(var->value)) {
 		return -1;
 	}

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/18611
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 18
Gerrit-Change-Id: I8b5eeaa9ec7f50cc6d96dd34c2b4aa9c53fb5440
Gerrit-Change-Number: 18611
Gerrit-PatchSet: 1
Gerrit-Owner: Trevor Peirce <trev at acrovoice.ca>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220607/52dc26cd/attachment.html>


More information about the asterisk-code-review mailing list