aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authormnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b>2011-06-09 17:43:27 +0000
committermnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b>2011-06-09 17:43:27 +0000
commit91b9123a808b8d647b5b4259a244522d3dfc393f (patch)
treeda408ed2e7d5f234f5c022d3a2db3c858984242c /channels/chan_sip.c
parent017a892d868e1243953fd8f0db10aeae80f3241d (diff)
Merged revisions 322807 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r322807 | mnicholson | 2011-06-09 12:37:07 -0500 (Thu, 09 Jun 2011) | 5 lines don't drop any voice frames when checking for T.38 during early media (closes issue ASTERISK-17705) Review: https://reviewboard.asterisk.org/r/1186/ patch by oej reported by oej ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@322808 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index bcb4ea73a..30125bb2c 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -6344,7 +6344,11 @@ static int sip_write(struct ast_channel *ast, struct ast_frame *frame)
}
if (p) {
sip_pvt_lock(p);
- if (p->rtp) {
+ if (p->t38.state == T38_ENABLED) {
+ /* drop frame, can't sent VOICE frames while in T.38 mode */
+ sip_pvt_unlock(p);
+ break;
+ } else if (p->rtp) {
/* If channel is not up, activate early media session */
if ((ast->_state != AST_STATE_UP) &&
!ast_test_flag(&p->flags[0], SIP_PROGRESS_SENT) &&
@@ -6355,12 +6359,9 @@ static int sip_write(struct ast_channel *ast, struct ast_frame *frame)
transmit_provisional_response(p, "183 Session Progress", &p->initreq, TRUE);
ast_set_flag(&p->flags[0], SIP_PROGRESS_SENT);
}
- } else if (p->t38.state == T38_ENABLED) {
- /* drop frame, can't sent VOICE frames while in T.38 mode */
- } else {
- p->lastrtptx = time(NULL);
- res = ast_rtp_instance_write(p->rtp, frame);
}
+ p->lastrtptx = time(NULL);
+ res = ast_rtp_instance_write(p->rtp, frame);
}
sip_pvt_unlock(p);
}