[Home]

Summary:ASTERISK-27387: Regression: pjsip 13.18.0 - from_user - "+" character isn't allowed any more
Reporter:Michael Maier (micha)Labels:pjsip
Date Opened:2017-10-31 16:35:10Date Closed:2017-11-03 08:12:46
Priority:MajorRegression?Yes
Status:Closed/CompleteComponents:Resources/res_pjsip
Versions:13.18.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:CentOS 6 64bitAttachments:
Description:Since Asterisk 13.18.0, I can't provide the "+" character any more with from_user (pjsip). Starting Asterisk with the old, working config creates this error log:

res_pjsip/pjsip_configuration.c: Error configuring endpoint 'endpointname' - 'from_user' field contains invalid character '+' and trunk is ignored.

I tested without "+" (+498...). It turned out, that it is needed
for authentication in the SIP trunk for outgoing calls. Without "+", I'm just getting 403 forbidden from provider instead of 407 Proxy authentication required.

Allowing "+" character in https://gerrit.asterisk.org/#/c/5974/ makes it working again.
Comments:By: Asterisk Team (asteriskteam) 2017-10-31 16:35:10.795-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Walter Doekes (wdoekes) 2017-11-01 10:41:43.333-0500

Looks like someone missed the user-unreserved?

https://gerrit.asterisk.org/#/c/5974/4/res/res_pjsip/pjsip_configuration.c
adds
{noformat}
char *valid_uri_marks = "-_.!~*`()";
{noformat}
But ABNF here http://www.tech-invite.com/fo-abnf/tinv-fo-abnf-sipuriui.html#idx says:
{noformat}
user   = 1*( unreserved   /   escaped   /   user-unreserved )
{noformat}
Where unreserved is indeed:
{noformat}
alnum / "-"   /   "_"   /   "."   /   "!"   /   "~"   /   "*"   /   "'"   /   "("   /   ")"
{noformat}
and user-unreserved is:
{noformat}
"&"   /   "="   /   "+"   /   "$"   /   ","   /   ";"   /   "?"   /   "/"
{noformat}
(And, also allowed are valid escapes.)

(Caused by: ASTERISK-27036 )

By: Friendly Automation (friendly-automation) 2017-11-03 08:12:47.479-0500

Change 6949 merged by Joshua Colp:
res_pjsip: Add to list of valid characters for from_user.

[https://gerrit.asterisk.org/6949|https://gerrit.asterisk.org/6949]

By: Friendly Automation (friendly-automation) 2017-11-03 08:35:43.630-0500

Change 6952 merged by Joshua Colp:
res_pjsip: Add to list of valid characters for from_user.

[https://gerrit.asterisk.org/6952|https://gerrit.asterisk.org/6952]

By: Friendly Automation (friendly-automation) 2017-11-03 08:42:51.107-0500

Change 6950 merged by Joshua Colp:
res_pjsip: Add to list of valid characters for from_user.

[https://gerrit.asterisk.org/6950|https://gerrit.asterisk.org/6950]

By: Friendly Automation (friendly-automation) 2017-11-03 09:07:34.971-0500

Change 6951 merged by Joshua Colp:
res_pjsip: Add to list of valid characters for from_user.

[https://gerrit.asterisk.org/6951|https://gerrit.asterisk.org/6951]

By: Friendly Automation (friendly-automation) 2017-11-06 13:46:46.091-0600

Change 7008 merged by Joshua Colp:
res_pjsip: Add to list of valid characters for from_user.

[https://gerrit.asterisk.org/7008|https://gerrit.asterisk.org/7008]

By: Friendly Automation (friendly-automation) 2017-11-09 13:52:10.899-0600

Change 7154 merged by Jenkins2:
res_pjsip: Add to list of valid characters for from_user.

[https://gerrit.asterisk.org/7154|https://gerrit.asterisk.org/7154]

By: Friendly Automation (friendly-automation) 2017-11-09 14:02:49.105-0600

Change 7155 merged by Jenkins2:
res_pjsip: Add to list of valid characters for from_user.

[https://gerrit.asterisk.org/7155|https://gerrit.asterisk.org/7155]

By: Friendly Automation (friendly-automation) 2017-11-09 14:40:01.073-0600

Change 7156 merged by Kevin Harwell:
res_pjsip: Add to list of valid characters for from_user.

[https://gerrit.asterisk.org/7156|https://gerrit.asterisk.org/7156]