view include/tmgw_ctrl.h @ 152:7176dc850d7a

sip-in hold/retr error handling: simply send BYE Because we know that the SIP state is CONNECTED at the time of any such error event, we can call initiate_bye() instead of disconnect_sip(), and thereby get rid of struct gsm_mncc_cause which will never be used in this scenario anyway.
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 11 Oct 2022 16:11:21 -0800
parents f062c32a5116
children
line wrap: on
line source

/*
 * This header file defines the ad hoc control interface
 * to themwi-mgw over a dedicated local socket.
 */

struct tmgw_ctrl_req {
	uint32_t	opcode;
	uint32_t	transact_ref;
	uint32_t	ep_id;
	uint32_t	setup_mask;
	struct sockaddr_storage gsm_addr;
	uint32_t	gsm_payload_type;
	uint32_t	gsm_payload_msg_type;
	struct sockaddr_storage pstn_addr;
	uint32_t	pstn_payload_type;
	uint32_t	fwd_mode;
};

#define	TMGW_CTRL_OP_CRCX		1
#define	TMGW_CTRL_OP_MDCX		2
#define	TMGW_CTRL_OP_DLCX		3
#define	TMGW_CTRL_OP_DTMF_START		4
#define	TMGW_CTRL_OP_DTMF_STOP		5

#define	TMGW_CTRL_MASK_GSM_CONN		0x0001
#define	TMGW_CTRL_MASK_PSTN_CONN	0x0002
#define	TMGW_CTRL_MASK_FWD_MODE		0x0004

struct tmgw_ctrl_resp {
	uint32_t	transact_ref;
	uint32_t	res;
	uint32_t	ep_id;
	struct sockaddr_storage gsm_addr;
	struct sockaddr_storage pstn_addr;
};

#define	TMGW_RESP_OK		0
#define	TMGW_RESP_ERR_PROT	1
#define	TMGW_RESP_ERR_RSRC	2
#define	TMGW_RESP_ERR_OPCODE	3
#define	TMGW_RESP_ERR_PARAM	4
#define	TMGW_RESP_ERR_NOTSUP	5
#define	TMGW_RESP_ERR_BUSY	6
#define	TMGW_RESP_ERR_NOTRDY	7