[Home]

Summary:ASTERISK-27775: res_pjsip_notify: Multiple Event headers can be present instead of just one
Reporter:AvayaXAsterisk (avayax)Labels:pjsip
Date Opened:2018-03-26 16:48:19Date Closed:2020-01-15 06:42:07.000-0600
Priority:MinorRegression?
Status:Closed/CompleteComponents:Resources/res_pjsip_notify
Versions:13.18.3 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:This issue was discovered on FreePBX distro, but the developers asked me to report it here as a pjsip problem.
When using Includes in pjsip_notify.conf, like FreePBX does with
#include sip_notify_custom.conf and #include sip_notify_additional.conf in it, and having different event headers in each file, the SIP notify will then contain both event headers, conflicting each other.

This is not happening on chansip.

There is no need for Asterisk to include two event headers in pjsip, the first one is sufficient.
NOTIFY sip:5314@10.124.193.26:5160 SIP/2.0
Via: SIP/2.0/UDP 10.1.1.176:5160;rport;branch=z9hG4bKPj962499e6-e385-4034-b112-f65804ebe63d
From: <sip:5314@10.1.1.176>;tag=0d0a4a08-e929-401f-9d23-61d142d446b4
To: <sip:5314@10.124.193.26>
Contact: <sip:5314@10.1.1.176:5160>
Call-ID: 44665192-e993-4979-81fe-02c17fa959ad
CSeq: 25027 NOTIFY
Subscription-State: terminated
Event: check-sync\
Event: check-sync;reboot=true
Max-Forwards: 70
User-Agent: FPBX-13.0.194.2(13.18.3)
Content-Length: 0
Comments:By: Asterisk Team (asteriskteam) 2018-03-26 16:48:20.309-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-03-26 17:01:32.269-0500

Can you provide actual configuration files which can be used to reproduce this?

By: AvayaXAsterisk (avayax) 2018-03-26 17:12:26.602-0500

pjsip_notify.conf contains this:
#include sip_notify_custom.conf
#include sip_notify_additional.conf

sip_notify_additional.conf contains this (among other sections for different phones)
[reboot-yealink]
Event=>check-sync\;reboot=true

sip_notify_custom.conf contains this:
[reboot-yealink]
Event=>check-sync\

A sip notify will then contain both headers instead of one, leading to a conflict:
Event: check-sync\
Event: check-sync;reboot=true

Do you need any other configuration files as well?

By: Joshua C. Colp (jcolp) 2018-03-26 17:24:50.799-0500

That should be fine.

By: Friendly Automation (friendly-automation) 2020-01-15 06:42:08.841-0600

Change 13618 merged by Friendly Automation:
res_pjsip_notify: Only allow a single Event header to be added to a NOTIFY

[https://gerrit.asterisk.org/c/asterisk/+/13618|https://gerrit.asterisk.org/c/asterisk/+/13618]

By: Friendly Automation (friendly-automation) 2020-01-15 06:43:50.508-0600

Change 13617 merged by Friendly Automation:
res_pjsip_notify: Only allow a single Event header to be added to a NOTIFY

[https://gerrit.asterisk.org/c/asterisk/+/13617|https://gerrit.asterisk.org/c/asterisk/+/13617]

By: Friendly Automation (friendly-automation) 2020-01-15 06:45:20.507-0600

Change 13588 merged by Joshua Colp:
res_pjsip_notify: Only allow a single Event header to be added to a NOTIFY

[https://gerrit.asterisk.org/c/asterisk/+/13588|https://gerrit.asterisk.org/c/asterisk/+/13588]

By: Friendly Automation (friendly-automation) 2020-01-15 06:45:37.809-0600

Change 13619 merged by Joshua Colp:
res_pjsip_notify: Only allow a single Event header to be added to a NOTIFY

[https://gerrit.asterisk.org/c/asterisk/+/13619|https://gerrit.asterisk.org/c/asterisk/+/13619]