comparison mgw/mdcx.c @ 103:3b3f07b112f3

mgw: implement GSM to PSTN forwarding
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 26 Sep 2022 20:46:19 -0800
parents 1579ec0e9fb9
children f062c32a5116
comparison
equal deleted inserted replaced
102:d26d97974c8a 103:3b3f07b112f3
85 if (req->setup_mask & TMGW_CTRL_MASK_FWD_MODE) { 85 if (req->setup_mask & TMGW_CTRL_MASK_FWD_MODE) {
86 if (ep->ep_type != TMGW_EP_TYPE_GATEWAY || 86 if (ep->ep_type != TMGW_EP_TYPE_GATEWAY ||
87 ep->rtp_gsm.remote_addr.sin_family != AF_INET || 87 ep->rtp_gsm.remote_addr.sin_family != AF_INET ||
88 ep->rtp_pstn.remote_addr.sin_family != AF_INET) 88 ep->rtp_pstn.remote_addr.sin_family != AF_INET)
89 return TMGW_RESP_ERR_PROT; 89 return TMGW_RESP_ERR_PROT;
90 if ((req->fwd_mode & TMGW_FWD_ENABLE_GSM2PSTN) &&
91 !(ep->fwd_mode & TMGW_FWD_ENABLE_GSM2PSTN)) {
92 rc = gsm2pstn_init(ep);
93 if (rc != TMGW_RESP_OK)
94 return rc;
95 }
90 if ((req->fwd_mode & TMGW_FWD_ENABLE_PSTN2GSM) && 96 if ((req->fwd_mode & TMGW_FWD_ENABLE_PSTN2GSM) &&
91 !(ep->fwd_mode & TMGW_FWD_ENABLE_PSTN2GSM)) { 97 !(ep->fwd_mode & TMGW_FWD_ENABLE_PSTN2GSM)) {
92 rc = pstn2gsm_init(ep); 98 rc = pstn2gsm_init(ep);
93 if (rc != TMGW_RESP_OK) 99 if (rc != TMGW_RESP_OK)
94 return rc; 100 return rc;