aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/channel.c3
-rw-r--r--main/frame.c19
-rw-r--r--main/rtp.c6
3 files changed, 26 insertions, 2 deletions
diff --git a/main/channel.c b/main/channel.c
index 4e0be1000..f0f4ef0e2 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -3046,6 +3046,7 @@ static int attribute_const is_visible_indication(enum ast_control_frame_type con
case AST_CONTROL_ANSWER:
case AST_CONTROL_HANGUP:
case AST_CONTROL_T38:
+ case AST_CONTROL_T38_PARAMETERS:
return 0;
case AST_CONTROL_CONGESTION:
@@ -3142,6 +3143,7 @@ int ast_indicate_data(struct ast_channel *chan, int _condition,
case AST_CONTROL_HOLD:
case AST_CONTROL_UNHOLD:
case AST_CONTROL_T38:
+ case AST_CONTROL_T38_PARAMETERS:
/* Nothing left to do for these. */
res = 0;
break;
@@ -4752,6 +4754,7 @@ static enum ast_bridge_result ast_generic_bridge(struct ast_channel *c0, struct
case AST_CONTROL_VIDUPDATE:
case AST_CONTROL_SRCUPDATE:
case AST_CONTROL_T38:
+ case AST_CONTROL_T38_PARAMETERS:
ast_indicate_data(other, f->subclass, f->data, f->datalen);
if (jb_in_use) {
ast_jb_empty_and_reset(c0, c1);
diff --git a/main/frame.c b/main/frame.c
index c394718db..708a7b041 100644
--- a/main/frame.c
+++ b/main/frame.c
@@ -851,6 +851,25 @@ void ast_frame_dump(const char *name, struct ast_frame *f, char *prefix)
}
snprintf(subclass, sizeof(subclass), "T38/%s", message);
break;
+ case AST_CONTROL_T38_PARAMETERS:
+ if (f->datalen != sizeof(struct ast_control_t38_parameters *)) {
+ message = "Invalid";
+ } else {
+ struct ast_control_t38_parameters *parameters = f->data;
+ enum ast_control_t38 state = parameters->request_response;
+ if (state == AST_T38_REQUEST_NEGOTIATE)
+ message = "Negotiation Requested";
+ else if (state == AST_T38_REQUEST_TERMINATE)
+ message = "Negotiation Request Terminated";
+ else if (state == AST_T38_NEGOTIATED)
+ message = "Negotiated";
+ else if (state == AST_T38_TERMINATED)
+ message = "Terminated";
+ else if (state == AST_T38_REFUSED)
+ message = "Refused";
+ }
+ snprintf(subclass, sizeof(subclass), "T38_Parameters/%s", message);
+ break;
case -1:
strcpy(subclass, "Stop generators");
break;
diff --git a/main/rtp.c b/main/rtp.c
index 5b46090a4..240c5b17b 100644
--- a/main/rtp.c
+++ b/main/rtp.c
@@ -3494,7 +3494,8 @@ static enum ast_bridge_result bridge_native_loop(struct ast_channel *c0, struct
(fr->subclass == AST_CONTROL_UNHOLD) ||
(fr->subclass == AST_CONTROL_VIDUPDATE) ||
(fr->subclass == AST_CONTROL_T38) ||
- (fr->subclass == AST_CONTROL_SRCUPDATE)) {
+ (fr->subclass == AST_CONTROL_SRCUPDATE) ||
+ (fr->subclass == AST_CONTROL_T38_PARAMETERS)) {
if (fr->subclass == AST_CONTROL_HOLD) {
/* If we someone went on hold we want the other side to reinvite back to us */
if (who == c0)
@@ -3734,7 +3735,8 @@ static enum ast_bridge_result bridge_p2p_loop(struct ast_channel *c0, struct ast
(fr->subclass == AST_CONTROL_UNHOLD) ||
(fr->subclass == AST_CONTROL_VIDUPDATE) ||
(fr->subclass == AST_CONTROL_T38) ||
- (fr->subclass == AST_CONTROL_SRCUPDATE)) {
+ (fr->subclass == AST_CONTROL_SRCUPDATE) ||
+ (fr->subclass == AST_CONTROL_T38_PARAMETERS)) {
/* If we are going on hold, then break callback mode and P2P bridging */
if (fr->subclass == AST_CONTROL_HOLD) {
if (p0_callback)