comparison mgw/dlcx.c @ 127:f062c32a5116

mgw: implement DTMF
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 01 Oct 2022 20:31:15 -0800
parents f280328e7e2e
children 8c28426abef0
comparison
equal deleted inserted replaced
126:815e4c59162e 127:f062c32a5116
2 * In this module we implement our DLCX operation. 2 * In this module we implement our DLCX operation.
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>
77 { 78 {
78 struct endpoint *ep, *np; 79 struct endpoint *ep, *np;
79 80
80 for (ep = delq; ep; ep = np) { 81 for (ep = delq; ep; ep = np) {
81 np = ep->next; 82 np = ep->next;
83 if (ep->dtmf_pp)
84 dtmf_stop_immediate(ep);
82 if (ep->ep_type & TMGW_EP_HAS_GSM_SOCK) 85 if (ep->ep_type & TMGW_EP_HAS_GSM_SOCK)
83 free_rtp_end(&ep->rtp_gsm); 86 free_rtp_end(&ep->rtp_gsm);
84 if (ep->ep_type & TMGW_EP_HAS_PSTN_SOCK) 87 if (ep->ep_type & TMGW_EP_HAS_PSTN_SOCK)
85 free_rtp_end(&ep->rtp_pstn); 88 free_rtp_end(&ep->rtp_pstn);
86 if (ep->gsm_encoder_state) 89 if (ep->gsm_encoder_state)