comparison mgw/ctrl_prot.c @ 127:f062c32a5116

mgw: implement DTMF
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 01 Oct 2022 20:31:15 -0800
parents 020ba624bdd8
children
comparison
equal deleted inserted replaced
126:815e4c59162e 127:f062c32a5116
2 * In this module we implement our control socket protocol. 2 * In this module we implement our control socket protocol.
3 */ 3 */
4 4
5 #include <sys/types.h> 5 #include <sys/types.h>
6 #include <sys/socket.h> 6 #include <sys/socket.h>
7 #include <sys/time.h>
7 #include <netinet/in.h> 8 #include <netinet/in.h>
8 #include <stdio.h> 9 #include <stdio.h>
9 #include <stdint.h> 10 #include <stdint.h>
10 #include <stdlib.h> 11 #include <stdlib.h>
11 #include <string.h> 12 #include <string.h>
57 process_mdcx(conn, &req, &resp); 58 process_mdcx(conn, &req, &resp);
58 break; 59 break;
59 case TMGW_CTRL_OP_DLCX: 60 case TMGW_CTRL_OP_DLCX:
60 process_dlcx(conn, &req, &resp); 61 process_dlcx(conn, &req, &resp);
61 break; 62 break;
63 case TMGW_CTRL_OP_DTMF_START:
64 process_dtmf_start(conn, &req, &resp);
65 break;
66 case TMGW_CTRL_OP_DTMF_STOP:
67 process_dtmf_stop(conn, &req, &resp);
68 break;
62 default: 69 default:
63 resp.res = TMGW_RESP_ERR_OPCODE; 70 resp.res = TMGW_RESP_ERR_OPCODE;
64 } 71 }
65 send(fd, &resp, sizeof resp, 0); 72 send(fd, &resp, sizeof resp, 0);
66 } 73 }