From: roadkill Date: Fri, 22 Jan 2021 13:38:01 +0000 (+0100) Subject: res/res_pjsip.c: allow user=phone when number contain *# X-Git-Tag: 18.3.0-rc1~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=176274caa4c4c85b6c7d8022b01e48bc59fe2843;p=thirdparty%2Fasterisk.git res/res_pjsip.c: allow user=phone when number contain *# 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 --- diff --git a/res/res_pjsip.c b/res/res_pjsip.c index f99135a527..1b44aa62e0 100644 --- a/res/res_pjsip.c +++ b/res/res_pjsip.c @@ -3898,7 +3898,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; } }