[Home]

Summary:ASTERISK-25843: chan_sip: Registration passwords can not contain @
Reporter:Private Name (falves11)Labels:chan-sip-register-parsing
Date Opened:2016-03-13 23:01:35Date Closed:
Priority:MinorRegression?
Status:Open/NewComponents:Channels/chan_sip/Registration
Versions:11.21.2 13.18.4 Frequency of
Occurrence
Related
Issues:
is related toASTERISK-17787 SIP registration fails in parsing
is related toASTERISK-26315 chan_sip does not produce outbound registration - Negative time interval
Environment:Centos 7Attachments:
Description:Sometimes we need to register with register=> user:password@domain and the company has pre-created passwords that include a semicolon. In that case, Asterisk cannot do business, and the supplier allows for changing the sip password one by one, but, when you need to register 100s of accounts, this takes often days. It just happened to me. There is now workaround, I already asked in the mailing list. I request a fix where the "\" used before any character in the sip-password, escapes it.
Comments:By: Asterisk Team (asteriskteam) 2016-03-13 23:01:35.937-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: Joshua C. Colp (jcolp) 2016-03-17 10:38:08.495-0500

I set up a VoIP provider (Callcentric) with an extension that used a password containing ;

Using \ in front of the ; character in my register in sip.conf worked exactly as expected.

I can not reproduce this.

By: Private Name (falves11) 2016-03-22 18:22:52.186-0500

I made a mistake and I apologize. The issue is not with the colon, but the @ sign.
In fact, there is a service, a very popular one, which can be used from any softphone like Bria ot Xlite, but I cannot figure out how to use it from Asterisk, since the username in the register string includes a "@" sign.
I tried to use the "\"@ trick but in vain. The "\" is sent along to the provider and thus the line never registered.
For instance
XBXOp=secret
99912032=auth id
99912032=number

register => 10000000:XBXOp:99912032@sip10.ringcentral.com:5090/10000000 ;fails to register
register => 10000000:XBXOp:99912032\@sip.ringcentral.com\:5060@sip10.ringcentral.com:5090/10000000 ;fails to register

Asterisk's response is wrong:
Authorization: Digest username="99912032\@sip.ringcentral.com\:5060", realm="sip10.ringcentral.com", algorithm=MD5
it should be
Authorization: Digest username="99912032@sip.ringcentral.com:5060", realm="sip10.ringcentral.com", algorithm=MD5

register => 10000000:XBXOp:99912032@sip.ringcentral.com\:5060@sip10.ringcentral.com:5090/10000000
but if I omit the "\", the information is read wrong
I can send you my registration information via private message, which work from a softphone.
In general, I think that Asterisk reads the line with an escaping "\" but it forgets to remove the escaping "\"





By: Asterisk Team (asteriskteam) 2016-03-22 18:22:52.410-0500

This issue has been reopened as a result of your commenting on it as the reporter. It will be triaged once again as applicable.