FreeCalypso > hg > themwi-system-sw
diff sip-in/mncc_handle.c @ 86:f332ccc240f1
sip-in: preparations toward TMGW connect-through
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 20 Sep 2022 23:14:50 -0800 |
parents | 70c3c8ebee33 |
children | 9e9034ef476c |
line wrap: on
line diff
--- a/sip-in/mncc_handle.c Tue Sep 20 22:47:53 2022 -0800 +++ b/sip-in/mncc_handle.c Tue Sep 20 23:14:50 2022 -0800 @@ -52,6 +52,17 @@ } call->mncc_state = MNCC_STATE_ANSWERED; call->overall_state = OVERALL_STATE_ANSWERED; + /* right now we require MNCC_RTP_CREATE to have come first */ + if (!call->gsm_payload_msg_type) { + call->overall_state = OVERALL_STATE_TEARDOWN; + disconnect_mncc(call, GSM48_CAUSE_LOC_PRN_S_LU, + GSM48_CC_CAUSE_PROTO_ERR); + disconnect_tmgw(call); + strcpy(call->invite_fail, "502 Internal protocol error"); + signal_invite_error(call); + return; + } + /* TODO: send MDCX to themwi-mgw */ signal_invite_200(call); }