]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_pjsip: Actually enable session timers when timers=always
authorTrevor Peirce <trev@acrovoice.ca>
Tue, 7 Jun 2022 21:53:34 +0000 (14:53 -0700)
committerJoshua Colp <jcolp@sangoma.com>
Thu, 9 Jun 2022 08:48:34 +0000 (03:48 -0500)
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

res/res_pjsip/pjsip_configuration.c

index 53a0e9b0421e1839315edadb0a753e7309bc901d..1bde576f9204b20e9a1ab605d8fd5d9435cc9dad 100644 (file)
@@ -220,7 +220,7 @@ static int timers_handler(const struct aco_option *opt, struct ast_variable *var
        } 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;
        }