[Home]

Summary:ASTERISK-25413: res_pjsip: does not have IP only endpoint identification per-endpoint - indentify_by work-around
Reporter:Jacek Konieczny (jkonieczny)Labels:
Date Opened:2015-09-22 08:47:09Date Closed:2015-09-30 13:43:09
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_pjsip
Versions:13.5.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Attachments:( 0) ugly-hack-for-identify_by-no-username.patch
Description:According to https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Configuration_res_pjsip :
{quote}
identify_by

An endpoint can be identified in multiple ways. Currently, the only supported option is username, which matches the endpoint based on the username in the From header.

Endpoints can also be identified by IP address; however, that method of identification is not handled by this configuration option. See the documentation for the identify configuration section for more details on that method of endpoint identification. If this option is set to username and an identify configuration section exists for the endpoint, then the endpoint can be identified in multiple ways.
{quote}

Indeed, 'username' is the only allowed value here. It is also the default. That becomes a problem when one wants a SIP trunk identified and authenticated by IP-address only – unauthenticated requests from any other IP would also be accepted when the username matches.

I think there should be a way to disable the username-based endpoint identification. I patched Asterisk to make it possible to disable {{identify_by=username}}, but the patch is only a hack/workaround, as the code behind the {{identify_by}} seems to be designed for some other user.
Comments:By: Asterisk Team (asteriskteam) 2015-09-22 08:47:10.401-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: Jacek Konieczny (jkonieczny) 2015-09-22 08:50:55.563-0500

This patch allows to use:
{noformat}
identify_by=no-username
{noformat}

In the {{pjsip.conf}} {{type=endpoint}} section.

By: Rusty Newton (rnewton) 2015-09-30 13:43:09.305-0500

We don't track workarounds on the issue tracker but your patch will be available here for others that need it despite the issue being closed.

This issue will be considered a feature request without a patch for a long-term solution. I personally, and others no doubt, would like to see the functionality that you desire in pjsip. When someone submits a patch working towards long-term supportable functionality then we can re-open the issue.

Thanks for posting a work-around here. I'm sure others will find it helpful in the meantime until someone works on a solution.