Summary: | ASTERISK-30397: SIP Reason: "Call completed elsewhere" no longer propagating | ||||
Reporter: | Ross Beer (rossbeer) | Labels: | |||
Date Opened: | 2023-01-17 10:05:09.000-0600 | Date Closed: | |||
Priority: | Minor | Regression? | Yes | ||
Status: | Open/New | Components: | Resources/res_pjsip_rfc3326 | ||
Versions: | GIT | Frequency of Occurrence | Constant | ||
Related Issues: |
| ||||
Environment: | CentOS | Attachments: | ( 0) Asterisk.zip ( 1) sngrep.png | ||
Description: | Since Gerrit commit 19570 the 'Call completed elsewhere' reason is not passed on to endpoints.
The setup is as follows: {quote} Endpoint -> Asterisk 1 (via Call Group) -> Asterisk 2 -> Endpoint {quote} To test make a call from one Endpoint on Asterisk 1 which contains a group with two endpoints on Asterisk 2. Answer the call on one of the endpoints in the group. Asterisk 1 sends headers: {quote} CSeq: 29930 CANCEL Reason: SIP;cause=200;text="Call completed elsewhere" Reason: Q.850;cause=26 Max-Forwards: 70 User-Agent: VoiceHost V6 Content-Length: 0 {quote} Asterisk 2 does not send on the 'Reason' headers. Asterisk 1 does not contain the patch and passes on the Headers correctly. | ||||
Comments: | By: Asterisk Team (asteriskteam) 2023-01-17 10:05:10.697-0600 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: Joshua C. Colp (jcolp) 2023-01-17 10:14:41.708-0600 [~igorg] It appears as though your change has introduced a regression with Call completed elsewhere support. Can you take a look at it? By: Igor Goncharovsky (igorg) 2023-01-17 10:24:35.740-0600 Yes, sure. By: Igor Goncharovsky (igorg) 2023-01-17 10:28:39.635-0600 Endpoint -> Asterisk 1 (via Call Group) -> call1 -> Asterisk 2 -> Endpoint1 call2 -> Asterisk 2 -> Endpoint2 Asterisk1 dialplan: Dial(PJSIP/Endpoint1@Asterisk2&PJSIP/Endpoint2@Asterisk2,,c) So Endpoint1 answers the call, then Asterisk1 send cancel to Endpoint2 via Asterisk2. In case Asterisk2 have version prior to commit 19570 Reason sent to Endpoint2, after commit 19570 - does not send. Am I right? By: Ross Beer (rossbeer) 2023-01-17 10:38:49.440-0600 It looks like Asterisk 2 is not picking up the Reason header from Asterisk 1. If the call originated on Asterisk 2 and the called endpoints are on Asterisk 2 the Reason headers are sent correctly. By: Igor Goncharovsky (igorg) 2023-01-23 12:41:32.295-0600 I have build such installtion and it sucessfully pass Reason from first leg to the other in CANCEL. Sngrep screenshot from 'Asterisk2' attached. Asterisk1 version: asterisk GIT-16-c5b1fafM () Asterisk2 version: asterisk-18.16.0 By: Igor Goncharovsky (igorg) 2023-01-23 12:44:07.460-0600 Could you share exact configs of Asterisk1 and Asterisk2? By: Ross Beer (rossbeer) 2023-01-24 06:39:03.363-0600 Testing from the basic pbx setup on a fresh install of Asterisk 18 from the GIT repository you can see in the PCAP Asterisk2.pcap that the cancel sent from Asterisk1 (192.168.1.232) contains the following header: {quote} Reason: SIP;cause=200;text="Call completed elsewhere" {quote} However, the packet sent from Asterisk2 (192.168.1.237) to the endpoint 1107 (192.168.1.213) does not, instead it has a reason as follows: {quote}Reason: Q.850;cause=16{quote} The 'Asterisk.zip' contains the basic pjsip.conf and extensions.conf for each server. If you are testing you will need to replace the IPs in pjsip.conf to those of your test server. From Asterisk1 you can dial 100 which calls both extensions on Asterisk2. By: Igor Goncharovsky (igorg) 2023-01-24 06:50:17.347-0600 Thanks, Ross. I'll review this. By: Ross Beer (rossbeer) 2023-03-23 10:14:13.049-0500 Have there been any further investigations to resolve the issue? By: Ross Beer (rossbeer) 2023-03-23 10:19:22.550-0500 I think it could be caused by: {noformat} if ((cause_q850 || cause_sip) && (cause = strstr(cause, "cause="))) { /* If text is present get rid of it */ if ((text = strchr(cause, ';'))) { *text = '\0'; } {noformat} If I am reading this correctly this would remove the `text="Call completed elsewhere" ` which is what phones use to not store call records etc. |