summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_pjsip.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c
index c98be3565..32291e54c 100644
--- a/channels/chan_pjsip.c
+++ b/channels/chan_pjsip.c
@@ -162,11 +162,18 @@ static enum ast_rtp_glue_result chan_pjsip_get_rtp_peer(struct ast_channel *chan
struct ast_sip_channel_pvt *channel = ast_channel_tech_pvt(chan);
struct chan_pjsip_pvt *pvt;
struct ast_sip_endpoint *endpoint;
+ struct ast_datastore *datastore;
if (!channel || !channel->session || !(pvt = channel->pvt) || !pvt->media[SIP_MEDIA_AUDIO]->rtp) {
return AST_RTP_GLUE_RESULT_FORBID;
}
+ datastore = ast_sip_session_get_datastore(channel->session, "t38");
+ if (datastore) {
+ ao2_ref(datastore, -1);
+ return AST_RTP_GLUE_RESULT_FORBID;
+ }
+
endpoint = channel->session->endpoint;
*instance = pvt->media[SIP_MEDIA_AUDIO]->rtp;