summaryrefslogtreecommitdiff
path: root/channels/chan_pjsip.c
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2014-06-04 14:13:07 +0000
committerMatthew Jordan <mjordan@digium.com>2014-06-04 14:13:07 +0000
commit6b423e311b694433a474e724baa73c32f5258274 (patch)
tree1ebb1c0351a07b1ef8d6414d56a71eaebac72a86 /channels/chan_pjsip.c
parent4f603c5da39d75528f6dee540791a7a9de80b175 (diff)
chan_pjsip: Add debug in RTP Engine glue callback
This patch adds some debug statements that aid with determining why a direct media request may or may not be initiated. ........ Merged revisions 415117 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@415118 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_pjsip.c')
-rw-r--r--channels/chan_pjsip.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c
index 4876f02a4..26dda4ae2 100644
--- a/channels/chan_pjsip.c
+++ b/channels/chan_pjsip.c
@@ -303,10 +303,12 @@ static int chan_pjsip_set_rtp_peer(struct ast_channel *chan,
/* Don't try to do any direct media shenanigans on early bridges */
if ((rtp || vrtp || tpeer) && !ast_channel_is_bridged(chan)) {
+ ast_debug(4, "Disregarding setting RTP on %s: channel is not bridged\n", ast_channel_name(chan));
return 0;
}
if (nat_active && session->endpoint->media.direct_media.disable_on_nat) {
+ ast_debug(4, "Disregarding setting RTP on %s: NAT is active\n", ast_channel_name(chan));
return 0;
}
@@ -318,6 +320,7 @@ static int chan_pjsip_set_rtp_peer(struct ast_channel *chan,
}
if (direct_media_mitigate_glare(session)) {
+ ast_debug(4, "Disregarding setting RTP on %s: mitigating re-INVITE glare\n", ast_channel_name(chan));
return 0;
}
@@ -329,7 +332,7 @@ static int chan_pjsip_set_rtp_peer(struct ast_channel *chan,
if (changed) {
ao2_ref(session, +1);
-
+ ast_debug(4, "RTP changed on %s; initiating direct media update\n", ast_channel_name(chan));
if (ast_sip_push_task(session->serializer, send_direct_media_request, session)) {
ao2_cleanup(session);
}