annotate include/out_routes.h @ 160:4b35a5a400f1

mgw/dtmf_defs.h: reduce DTMF_MIN_FRAMES to 5 (100 ms)
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 12 Oct 2022 13:05:26 -0800
parents 44dc809ffec0
children beb6aaecfe63
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
130
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * In this header file we define all of our binary data structures
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 * written into /var/gsm/out-routes.bin, which is the compiled binary form
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 * of the call routing database for themwi-sip-out.
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 *
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 * Some related size limits are also defined here.
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 */
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 #define MAX_SIP_DEST_DOMAIN 31
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 #define MAX_SIP_USER_PART 16
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 #define MAX_E164_NUMBER 15
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 #define MAX_INN_PREFIX 12
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 #define MAX_SPECIAL_NUM 6
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 struct out_routes_header {
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 uint32_t num_dest;
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 uint32_t num_inn;
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 uint32_t num_special;
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 };
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 struct sip_out_dest {
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 struct sockaddr_in sin;
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 char domain[MAX_SIP_DEST_DOMAIN+1];
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 };
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 struct inn_route {
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 char prefix[MAX_INN_PREFIX+1];
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 uint8_t sip_dest_id;
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 };
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 struct special_num_route {
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 char special_num[MAX_SPECIAL_NUM+1];
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 uint8_t sip_dest_id;
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 char sip_user[MAX_SIP_USER_PART+1];
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 uint8_t flags;
44dc809ffec0 themwi-update-out-routes utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 };