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

Friendly Automation asteriskteam at digium.com
Wed Jun 8 21:52:31 CDT 2022


Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/18636 )

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(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  Kevin Harwell: Looks good to me, approved
  Friendly Automation: Approved for Submit



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/+/18636
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I8b5eeaa9ec7f50cc6d96dd34c2b4aa9c53fb5440
Gerrit-Change-Number: 18636
Gerrit-PatchSet: 2
Gerrit-Owner: Trevor Peirce <trev at acrovoice.ca>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220608/faf11339/attachment.html>


More information about the asterisk-code-review mailing list