[Asterisk-code-review] res_pjsip_diversion: handle 181 (asterisk[18])
Friendly Automation
asteriskteam at digium.com
Wed Aug 26 13:14:40 CDT 2020
Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/14758 )
Change subject: res_pjsip_diversion: handle 181
......................................................................
res_pjsip_diversion: handle 181
Adapt the response handler so it also called when 181 is received.
In the case 181 is received, also generate the 181 response.
ASTERISK-29001 #close
Change-Id: I73cfee46a8ca85371280ebdb38674f8fde7510df
---
M res/res_pjsip_diversion.c
1 file changed, 5 insertions(+), 1 deletion(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Friendly Automation: Approved for Submit
diff --git a/res/res_pjsip_diversion.c b/res/res_pjsip_diversion.c
index 96a9069..3f74871 100644
--- a/res/res_pjsip_diversion.c
+++ b/res/res_pjsip_diversion.c
@@ -259,6 +259,10 @@
++data.count;
ast_channel_set_redirecting(session->channel, &data, &update);
+ /* Only queue an indication if it was due to a response */
+ if (session->inv_session->role == PJSIP_ROLE_UAC) {
+ ast_channel_queue_redirecting_update(session->channel, &data, &update);
+ }
ast_party_redirecting_free(&data);
}
@@ -406,7 +410,7 @@
.incoming_response = diversion_incoming_response,
.outgoing_request = diversion_outgoing_request,
.outgoing_response = diversion_outgoing_response,
- .response_priority = AST_SIP_SESSION_BEFORE_REDIRECTING,
+ .response_priority = AST_SIP_SESSION_BEFORE_REDIRECTING|AST_SIP_SESSION_BEFORE_MEDIA,
};
static int load_module(void)
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14758
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 18
Gerrit-Change-Id: I73cfee46a8ca85371280ebdb38674f8fde7510df
Gerrit-Change-Number: 14758
Gerrit-PatchSet: 4
Gerrit-Owner: Torrey Searle <tsearle at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200826/7beea044/attachment.html>
More information about the asterisk-code-review
mailing list