[Home]

Summary:ASTERISK-28090: chan_sip: MessageSend() doesn't use configured SIP peers
Reporter:Brian J. Murrell (brian_j_murrell)Labels:
Date Opened:2018-10-03 15:32:54Date Closed:2019-02-20 07:15:02.000-0600
Priority:MinorRegression?
Status:Closed/CompleteComponents:Channels/chan_sip/Messaging
Versions:13.11.1 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Attachments:
Description:I am trying to use {{MessageSend()}} to send a SIP {{MESSAGE}} to a peer I have configured in my {{sip.conf}} file.

When I have a dialplan created that will call {{MessageSend("a message", SIP/extension@sip-peer)}} I get an error message:

{noformat}
[Oct  1 09:48:40] WARNING[3286][C-000013ab]: message.c:1232 msg_send_exec: No message technology 'SIP/extension@sip-peer' found.
{noformat}

Using {{MessageSend()}} with raw URLs such as {{sip:extension@sip-provider.example.com}} is accepted but it provides no authentication to the {{MESSAGE}} command sent to _sip-provider.example.com_ so is rejected.
Comments:By: Asterisk Team (asteriskteam) 2018-10-03 15:32:56.193-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) 2018-10-03 15:44:15.570-0500

I haven't looked into this but just a heads up that chan_sip is community supported, so if this issue is accepted then there is no timeframe on when it would get looked into and is not something we (Digium / Sangoma) would look into.

By: Joshua C. Colp (jcolp) 2018-10-05 12:42:03.366-0500

Did you also attempt to use sip:extension@sip-peer? Looking at the code it should be possible to specify a peer there.

By: Brian J. Murrell (brian_j_murrell) 2018-10-05 13:05:38.108-0500

Almost works.  Well, kinda.  _sip-peer_ reference works but authentication does not:

{noformat}
[Oct  5 13:55:07] NOTICE[4161]: chan_sip.c:24504 do_message_auth: Failed to authenticate MESSAGE with host 'x.x.x.x:5060'
{noformat}

Where the IP address is the address for the peer I specified in the {{sip:extension@sip-peer}}.

By: Matt Jordan (mjordan) 2018-10-05 13:47:36.041-0500

Is {{auth_message_requests = yes}} in {{sip.conf}}?

By: Brian J. Murrell (brian_j_murrell) 2018-10-05 14:09:33.457-0500

Yup:

{noformat}
auth_message_requests = yes
{noformat}

By: Brian J. Murrell (brian_j_murrell) 2018-10-07 09:13:38.828-0500

Looking at the SIP conversation, I have noticed that MESSAGE packets are using the {{Proxy-Authorization}} header instead of {{Authorization}}.

Looking at SIP MESSAGE packets from Zoiper (Android) to Asterisk, it is using {{Authorization}} and Zoiper works with my SIP provider so I can only assume that it's supposed to be the {{Authorization}} header that should be used with SIP MESSAGE packets and not {{Proxy-Authorization}}.

Is this a bug?

By: Joshua C. Colp (jcolp) 2018-10-09 05:29:47.373-0500

I think it should be and thus would be a bug, but as previously mentioned chan_sip is community supported so there is no time frame on if or when anyone will look into this.

By: Brian J. Murrell (brian_j_murrell) 2018-10-09 05:58:43.974-0500

Is there a non-community supported solution for SIP SIMPLE then?

By: Joshua C. Colp (jcolp) 2018-10-09 06:08:52.640-0500

Please don't change the severity. It is in regards to the severity to the project itself.

The chan_pjsip module and other associated modules are core supported.

By: Brian J. Murrell (brian_j_murrell) 2018-10-09 06:29:06.781-0500

It seems pretty _major_ that a distinct function of the driver just completely doesn't work as it should, rendering use of that function completely unusable.

Does the chan_pjsip module support SIP SIMPLE with authentication?

By: Joshua C. Colp (jcolp) 2018-10-09 06:35:21.398-0500

It's unusable for your particular scenario and use case. The usage of outgoing MESSAGE for communication with an ITSP and thus requiring authentication like this is uncommon usage. In fact, you're the first person I know of who is actually doing that which is probably why you're running into this problem.

Yes, the chan_pjsip module supports SIMPLE with authentication.

By: Brian J. Murrell (brian_j_murrell) 2019-02-20 07:15:02.388-0600

pjsip seems to be the way to go for this.