summaryrefslogtreecommitdiff
path: root/res/res_pjsip_sdp_rtp.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2017-03-25 05:20:03 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2017-03-25 05:20:03 -0500
commit3bdf876b045653c427df0a7a771e90dd15fa1527 (patch)
tree07cc9364c32d99b4012f575b0779f761fec7a7df /res/res_pjsip_sdp_rtp.c
parent772afa59dcc233b3d3adbaed93b8fdffbe91e60a (diff)
parentd08c69a9e28d98d386971bd8527dec3926f0502b (diff)
Merge "res_pjsip_sdp_rtp: Set hangup cause for RTP timeouts"
Diffstat (limited to 'res/res_pjsip_sdp_rtp.c')
-rw-r--r--res/res_pjsip_sdp_rtp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c
index a82475774..b66c1aeb8 100644
--- a/res/res_pjsip_sdp_rtp.c
+++ b/res/res_pjsip_sdp_rtp.c
@@ -163,6 +163,10 @@ static int rtp_check_timeout(const void *data)
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);