summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2014-06-16 02:40:44 +0000
committerMatthew Jordan <mjordan@digium.com>2014-06-16 02:40:44 +0000
commit8313964d726d2f6f3397aff12c573588a11aaea0 (patch)
tree1110dab92c93c1f43116a51a8b51ab43bf115492 /channels
parent072b61bbede22e2cb4424a29c9c60c707671fc54 (diff)
channels/chan_sip: Forbid remote bridging if T.38 is negotiated
When a framehook is removed - such as the fax gateway framehook - the bridge framework will re-evaluate the bridge mixing technologies to see if it can improve the bridging. When this occurs, get_rtp_info will be called to determine if local or remote bridging can be used. Using remote bridging will cause a fax to fail, as direct media negotiation will cause some small number of packets to not arrive at the remote endpoint. This patch forces local native bridging if T.38 negotiation is in progress or has been established. ........ Merged revisions 416318 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@416319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 482e6a3e7..0d898556b 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -32441,6 +32441,19 @@ static enum ast_rtp_glue_result sip_get_rtp_peer(struct ast_channel *chan, struc
res = AST_RTP_GLUE_RESULT_FORBID;
}
+ if (ast_test_flag(&p->flags[1], SIP_PAGE2_T38SUPPORT)) {
+ switch (p->t38.state) {
+ case T38_LOCAL_REINVITE:
+ case T38_PEER_REINVITE:
+ case T38_ENABLED:
+ res = AST_RTP_GLUE_RESULT_LOCAL;
+ break;
+ case T38_REJECTED:
+ default:
+ break;
+ }
+ }
+
if (p->srtp) {
res = AST_RTP_GLUE_RESULT_FORBID;
}