[asterisk-commits] res pjsip sdp rtp: Set hangup cause for RTP timeouts (asterisk[13])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Mar 24 19:21:51 CDT 2017
Anonymous Coward #1000019 has submitted this change and it was merged. ( https://gerrit.asterisk.org/5316 )
Change subject: res_pjsip_sdp_rtp: Set hangup cause for RTP timeouts
......................................................................
res_pjsip_sdp_rtp: Set hangup cause for RTP timeouts
chan_sip sets the hangup cause code to AST_CAUSE_REQUESTED_CHAN_UNAVAIL
(44) when a channel is hung up due to an RTP timeout. So do the same
when it happens with PJSIP for parity.
Change-Id: I3546ebbde6460c22a27c9da1bf321711b5961ab8
---
M res/res_pjsip_sdp_rtp.c
1 file changed, 4 insertions(+), 0 deletions(-)
Approvals:
Mark Michelson: Looks good to me, but someone else must approve
Anonymous Coward #1000019: Verified
Joshua Colp: Looks good to me, approved
diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c
index d44171c..52ae65c 100644
--- a/res/res_pjsip_sdp_rtp.c
+++ b/res/res_pjsip_sdp_rtp.c
@@ -163,6 +163,10 @@
ast_log(LOG_NOTICE, "Disconnecting channel '%s' for lack of RTP activity in %d seconds\n",
ast_channel_name(chan), elapsed);
+ ast_channel_lock(chan);
+ ast_channel_hangupcause_set(chan, AST_CAUSE_REQUESTED_CHAN_UNAVAIL);
+ ast_channel_unlock(chan);
+
ast_softhangup(chan, AST_SOFTHANGUP_DEV);
ast_channel_unref(chan);
--
To view, visit https://gerrit.asterisk.org/5316
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I3546ebbde6460c22a27c9da1bf321711b5961ab8
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
More information about the asterisk-commits
mailing list