view include/out_routes.h @ 199:e6c7ced3c031

mgw: accept zero-length RTP payload as BFI Mainline OsmoBTS now has an option (rtp continuous-streaming) that causes it to emit an RTP packet every 20 ms without gaps, sending a BFI marker in the form of zero-length RTP payload when it has nothing else to send. These codec-independent BFI markers don't indicate TAF, but this provision is a good start. Accept this BFI packet format in themwi-mgw.
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 29 Mar 2023 20:23:43 -0800
parents 44dc809ffec0
children beb6aaecfe63
line wrap: on
line source

/*
 * In this header file we define all of our binary data structures
 * written into /var/gsm/out-routes.bin, which is the compiled binary form
 * of the call routing database for themwi-sip-out.
 *
 * Some related size limits are also defined here.
 */

#define	MAX_SIP_DEST_DOMAIN	31
#define	MAX_SIP_USER_PART	16
#define	MAX_E164_NUMBER		15
#define	MAX_INN_PREFIX		12
#define	MAX_SPECIAL_NUM		6

struct out_routes_header {
	uint32_t	num_dest;
	uint32_t	num_inn;
	uint32_t	num_special;
};

struct sip_out_dest {
	struct sockaddr_in sin;
	char		domain[MAX_SIP_DEST_DOMAIN+1];
};

struct inn_route {
	char		prefix[MAX_INN_PREFIX+1];
	uint8_t		sip_dest_id;
};

struct special_num_route {
	char		special_num[MAX_SPECIAL_NUM+1];
	uint8_t		sip_dest_id;
	char		sip_user[MAX_SIP_USER_PART+1];
	uint8_t		flags;
};