[Asterisk-code-review] res/res_pjsip.c: allow user=phone when number contain *# (asterisk[16])
George Joseph
asteriskteam at digium.com
Wed Jan 27 11:03:33 CST 2021
George Joseph has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/15337 )
Change subject: res/res_pjsip.c: allow user=phone when number contain *#
......................................................................
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
---
M res/res_pjsip.c
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Ivan Poddubny: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved; Approved for Submit
diff --git a/res/res_pjsip.c b/res/res_pjsip.c
index b82847a..2ea07fd 100644
--- a/res/res_pjsip.c
+++ b/res/res_pjsip.c
@@ -3549,7 +3549,7 @@
/* 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;
}
}
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15337
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I3307bdbf757582740bfee4110e85f7b6c9291cc4
Gerrit-Change-Number: 15337
Gerrit-PatchSet: 2
Gerrit-Owner: Mark Petersen <bugs.digium.com at zombie.dk>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Ivan Poddubny <ivan.poddubny at gmail.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-CC: Sean Bright <sean.bright at gmail.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210127/090dc03d/attachment-0001.html>
More information about the asterisk-code-review
mailing list