aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2009-03-13 17:28:14 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2009-03-13 17:28:14 +0000
commit86812735d314f9e9ad4685b99a72ed20d77d5e29 (patch)
tree5d908d878a6defcb032c9cca573be2e6322dcc7e /channels/chan_sip.c
parentd1a4fb669f1c2a70f451dbe90aafbb41c826229b (diff)
Merged revisions 182022 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r182022 | file | 2009-03-13 14:25:09 -0300 (Fri, 13 Mar 2009) | 7 lines Fix an issue with requesting a T38 reinvite before the call is answered. The code responsible for sending the T38 reinvite did not check if an INVITE was already being handled. This caused things to get confused and the call to fail. The code now defers sending the T38 reinvite until the current INVITE is done being handled. (issue AST-191) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@182036 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index ae5b17271..221541268 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -5384,7 +5384,11 @@ static int sip_indicate(struct ast_channel *ast, int condition, const void *data
case AST_T38_REQUEST_NEGOTIATE: /* Request T38 */
if (p->t38.state != T38_ENABLED) {
change_t38_state(p, T38_LOCAL_REINVITE);
- transmit_reinvite_with_sdp(p, TRUE, FALSE);
+ if (!p->pendinginvite) {
+ transmit_reinvite_with_sdp(p, TRUE, FALSE);
+ } else if (!ast_test_flag(&p->flags[0], SIP_PENDINGBYE)) {
+ ast_set_flag(&p->flags[0], SIP_NEEDREINVITE);
+ }
}
break;
case AST_T38_TERMINATED:
@@ -14935,7 +14939,7 @@ static void check_pendings(struct sip_pvt *p)
} else {
ast_debug(2, "Sending pending reinvite on '%s'\n", p->callid);
/* Didn't get to reinvite yet, so do it now */
- transmit_reinvite_with_sdp(p, FALSE, FALSE);
+ transmit_reinvite_with_sdp(p, (p->t38.state == T38_LOCAL_REINVITE ? TRUE : FALSE), FALSE);
ast_clear_flag(&p->flags[0], SIP_NEEDREINVITE);
}
}