From: Matthew Nicholson Date: Thu, 9 Jun 2011 15:22:50 +0000 (+0000) Subject: Merged revisions 322646 via svnmerge from X-Git-Tag: 1.6.2.19-rc1~3^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52c395fb1f84bf8d8c7207a06db3f8e8042ba3dd;p=thirdparty%2Fasterisk.git Merged revisions 322646 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r322646 | mnicholson | 2011-06-09 10:10:30 -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: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@322668 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 1865c94a08..8a64834c14 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -6509,7 +6509,10 @@ 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 && !p->t38.direct) { + /* drop frame, can't sent VOICE frames while in T.38 mode */ + 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) && @@ -6520,12 +6523,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_write(p->rtp, frame); } + p->lastrtptx = time(NULL); + res = ast_rtp_write(p->rtp, frame); } sip_pvt_unlock(p); }