[Home]

Summary:ASTERISK-29644: pjsip: Can't register to sip if username has "@" in string
Reporter:George Kissandrakis (gkissand@gmail.com)Labels:
Date Opened:2021-09-14 03:17:16Date Closed:2021-09-29 12:00:01
Priority:MinorRegression?
Status:Closed/CompleteComponents:Resources/res_pjsip_outbound_registration
Versions:16.2.1 Frequency of
Occurrence
Related
Issues:
Environment:Ubuntu 20.04.2 LTSAttachments:
Description:My SIP provider uses usernames that include @
The full string (in chan_sip) is
register => +XXXXXXXXXX@sip.server.com:PASSWORD:+XXXXXXXXXX@sip.server.com@sip.server.com:5060
register => fromuser㊙️username@host
fromuser and username are +XXXXXXXXXX@sip.server.com
This works fine no problems here
When I try to migrate to res_pjsip it seems that it has a problem dealing with @ in username
I tried to backslash @ and tried to replace it with %40 (hex value) but again no luck
Provider told me that I send only the +XXXXXXXXXX part
I did not find any documetation neither a working example on this

Steps to reproduce
create a sip trunk with @ at username

PJSIP version
2.5.0

Context
Ubuntu 20.04
Asterisk 16.2.1 (shipped with Ubuntu)
pjsip version. Whatever is shipped with asterisk. No way to identify it. Should be 2.5.0
[mytrunk]
type=registration
retry_interval = 20
max_retries = 0
expiration = 120
transport = transport-udp
outbound_auth=mytrunk
server_uri=sip:sip.server.com:5060
client_uri=sip:+NNNNNNNN@sip.server.com@sip.server.com:506
[mytrunk]
type=auth
auth_type=userpass
username=+NNNNNNNN@sip.server.com
password=PASSWORD

Comments:By: Asterisk Team (asteriskteam) 2021-09-14 03:17:20.797-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. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

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].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: George Kissandrakis (gkissand@gmail.com) 2021-09-14 03:18:15.178-0500

Answer I got in
https://github.com/pjsip/pjproject/issues/2814
This is not a bug in pjproject. It may be a bug in Asterisk, but you should discuss on https://community.asterisk.org/ to confirm

chan_sip works fine

By: Joshua C. Colp (jcolp) 2021-09-14 04:41:12.660-0500

It appears the bug you have submitted is against a rather old version of a supported branch of Asterisk. There have been many issues fixed between the version you are using and the current version of your branch. Please test with the latest version in your Asterisk branch and report whether the issue persists.

Please see the Asterisk Versions [1] wiki page for info on which versions of Asterisk are supported.
[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions



By: George Kissandrakis (gkissand@gmail.com) 2021-09-14 08:57:12.018-0500

I will test latest asterisk until end of the week and let you know
thank you

By: Asterisk Team (asteriskteam) 2021-09-29 12:00:00.987-0500

Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines

By: Joseph Nadiv (yois) 2021-10-14 22:50:13.394-0500

This is probably related to https://gerrit.asterisk.org/c/asterisk/+/15896
Unless multidomain is disabled, an @ will not be placed before the domain, so your username with an @ will appear as

a@bc

instead of

a@b@c