]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res/res_pjsip.c: allow user=phone when number contain *#
authorroadkill <bugs.digium.com@zombie.dk>
Fri, 22 Jan 2021 13:41:43 +0000 (14:41 +0100)
committerGeorge Joseph <gjoseph@digium.com>
Wed, 27 Jan 2021 17:03:31 +0000 (11:03 -0600)
if From number contain * or # asterisk will not add user=phone

Currently only number that uses AST_DIGIT_ANYNUM can have "user=phone" but the validation should use AST_DIGIT_ANY
this is a problem when you want to send call to ISUP
as they will disregard the From header and either replace From with anonymous or with p-asserted-identity

ASTERISK-29261
Reported by: Mark Petersen
Tested by: Mark Petersen

Change-Id: I3307bdbf757582740bfee4110e85f7b6c9291cc4

res/res_pjsip.c

index b82847a28a40fa1fb97b4e0ba05d94c7043cda06..2ea07fddb9dee5f62f00f0a35763456e74fcc024 100644 (file)
@@ -3549,7 +3549,7 @@ void ast_sip_add_usereqphone(const struct ast_sip_endpoint *endpoint, pj_pool_t
 
        /* Test URI user against allowed characters in AST_DIGIT_ANY */
        for (; i < pj_strlen(&sip_uri->user); i++) {
-               if (!strchr(AST_DIGIT_ANYNUM, pj_strbuf(&sip_uri->user)[i])) {
+               if (!strchr(AST_DIGIT_ANY, pj_strbuf(&sip_uri->user)[i])) {
                        break;
                }
        }