Skip to content

Commit fd40752

Browse files
InterLinked1jcolp
authored andcommitted
chan_sip: Expand hook flash recognition.
Some ATAs send hook flash events as application/hook-flash, rather than a DTMF event. Now, we also recognize hook-flash as a flash event. ASTERISK-29370 Change-Id: I1c3b82a040dff3affcd94bad8ce33edc90c04725
1 parent 49c2e7e commit fd40752

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎channels/chan_sip.c‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22627,6 +22627,18 @@ static void handle_request_info(struct sip_pvt *p, struct sip_request *req)
2262722627
const char *c = sip_get_header(req, "Content-Type");
2262822628

2262922629
/* Need to check the media/type */
22630+
22631+
if (!strcasecmp(c, "application/hook-flash")) {
22632+
/* send a FLASH event, for ATAs that send flash as hook-flash not dtmf */
22633+
struct ast_frame f = { AST_FRAME_CONTROL, { AST_CONTROL_FLASH, } };
22634+
ast_queue_frame(p->owner, &f);
22635+
if (sipdebug) {
22636+
ast_verbose("* DTMF-relay event received: FLASH\n");
22637+
}
22638+
transmit_response(p, "200 OK", req);
22639+
return;
22640+
}
22641+
2263022642
if (!strcasecmp(c, "application/dtmf-relay") ||
2263122643
!strcasecmp(c, "application/vnd.nortelnetworks.digits") ||
2263222644
!strcasecmp(c, "application/dtmf")) {

0 commit comments

Comments
 (0)