summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2016-05-19 05:33:35 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2016-05-19 05:33:35 -0500
commit1b7ba9bb00484c0ea294125351a3404fad4a4847 (patch)
tree1d7ae42a0b39e90391ea1d6bea1ff5db9d840324
parent4a04a5a3ecfe2b8f79aec0ad79884ad7cc1998f4 (diff)
parent935e0496c4b10604c100005cb3ebff594380486b (diff)
Merge "udptl: Don't eat sequence numbers until OK is received" into 13
-rw-r--r--main/udptl.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/main/udptl.c b/main/udptl.c
index e8410cc8b..a568cd1ec 100644
--- a/main/udptl.c
+++ b/main/udptl.c
@@ -769,6 +769,18 @@ struct ast_frame *ast_udptl_read(struct ast_udptl *udptl)
return &ast_null_frame;
}
+ /*
+ * If early media isn't turned on for the channel driver, it's going to
+ * drop this frame. By that time though, udptl has already incremented
+ * the expected sequence number so if the CPE re-sends, the second frame
+ * will be dropped as a dup even though the first frame never went through.
+ * So we drop the frame here if the channel isn't up. 'tag' is set by the
+ * channel drivers on T38_ENABLED or T38_PEER_REINVITE.
+ */
+ if (udptl->tag == NULL) {
+ return &ast_null_frame;
+ }
+
if (udptl->nat) {
/* Send to whoever sent to us */
if (ast_sockaddr_cmp(&udptl->them, &addr)) {