aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
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 5d80ef321..901fc5d9a 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -6081,7 +6081,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:
@@ -16491,7 +16495,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);
}
}