[Asterisk-code-review] res_pjsip_rfc3326: Q.850 reason code for CANCEL is set to AST_CAUSE_N... (asterisk[18])

Mark Petersen asteriskteam at digium.com
Wed Nov 10 09:56:08 CST 2021


Attention is currently required from: George Joseph.
Mark Petersen has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/16344 )

Change subject: res_pjsip_rfc3326: Q.850 reason code for CANCEL is set to AST_CAUSE_NORMAL_CLEARING
......................................................................


Patch Set 7:

(3 comments)

Patchset:

PS5: 
> Just thought of something else... […]
hmm, well as we are only using dialplan code we have no knowledge about that part


File apps/app_dial.c:

https://gerrit.asterisk.org/c/asterisk/+/16344/comment/ed7dba86_5c98940b 
PS5, Line 3360: ast_channel_hangupcause(chan) == AST_CAUSE_ANSWERED_ELSEWHERE
              : 		|| ast_test_flag64(&opts, OPT_CANCEL_ELSEWHERE)
              : 		? AST_CAUSE_ANSWERED_ELSEWHERE : cancelcause
> I know it was like this before but i had a hard time deciphering what this was doing. […]
Done


File res/res_pjsip_rfc3326.c:

https://gerrit.asterisk.org/c/asterisk/+/16344/comment/a45b89af_d113c5ad 
PS5, Line 80: 	if (ast_channel_hangupcause(session->channel) == AST_CAUSE_NOTDEFINED &&
            : 		!pjsip_method_cmp(&rdata->msg_info.msg->line.req.method, &pjsip_cancel_method)) {
            : 			ast_debug(1, "Channel '%s', setting hangup cause: %d\n", ast_channel_name(session->channel), AST_CAUSE_NORMAL_CLEARING);
            : 			ast_channel_hangupcause_set(session->channel, AST_CAUSE_NORMAL_CLEARING);
            : 	}
            : 
> Is this even still needed with the logic in Dial?
it is mainly a safeguard that we only send out Q.850 if we have a legal cause code
just in case something else than Dial has handled the call (ARI)



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/16344
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 18
Gerrit-Change-Id: Ib653aec2282f55b59d87484391cc07c8e6612b89
Gerrit-Change-Number: 16344
Gerrit-PatchSet: 7
Gerrit-Owner: Mark Petersen <bugs.digium.com at zombie.dk>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: George Joseph <gjoseph at digium.com>
Gerrit-Comment-Date: Wed, 10 Nov 2021 15:56:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20211110/83b4fd69/attachment.html>


More information about the asterisk-code-review mailing list