comparison sip-in/call.h @ 60:02761f1ae5e5

sip-in INVITE processing: got as far as CRCX completion
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 11 Sep 2022 15:42:54 -0800
parents
children 75b7a7b61824
comparison
equal deleted inserted replaced
59:bea761629c5b 60:02761f1ae5e5
1 /*
2 * struct call defined in this header file is the big daddy:
3 * it is the main call state structure for themwi-sip-in.
4 */
5
6 struct call {
7 /* call list management */
8 char *sip_call_id;
9 struct call *next;
10 /* filled from initial INVITE */
11 struct sockaddr_in udp_sin;
12 char *invite_from;
13 char *invite_to;
14 char *invite_via;
15 unsigned invite_cseq;
16 char called_nanp[11];
17 char *from_uri;
18 unsigned from_uri_len;
19 char *from_user;
20 unsigned from_user_len;
21 int use_100rel;
22 /* PSTN side RTP info */
23 struct sockaddr_in pstn_rtp_local;
24 struct sockaddr_in pstn_rtp_remote;
25 int use_pcma;
26 /* GSM side RTP info */
27 struct sockaddr_storage gsm_rtp_osmo;
28 struct sockaddr_storage gsm_rtp_tmgw;
29 uint32_t gsm_payload_type;
30 uint32_t gsm_payload_msg_type;
31 /* state machines */
32 uint32_t overall_state;
33 uint32_t sip_state;
34 uint32_t mgw_state;
35 uint32_t mgw_ep_id;
36 uint32_t mgw_xact;
37 uint32_t mgw_xact_id;
38 uint32_t sdp_addend;
39 char invite_fail[80];
40 unsigned sip_tx_count;
41 };
42
43 #define OVERALL_STATE_CRCX 1
44 #define OVERALL_STATE_CALL_GSM 2
45 #define OVERALL_STATE_ALERTING 3
46 #define OVERALL_STATE_ANSWERED 4
47 #define OVERALL_STATE_CONNECTED 5
48 #define OVERALL_STATE_TEARDOWN 6
49 #define OVERALL_STATE_DEAD_SIP 7
50
51 #define SIP_STATE_INVITE_PROC 1
52 #define SIP_STATE_RINGING 2
53 #define SIP_STATE_RINGING_PRACK 3
54 #define SIP_STATE_INVITE_200 4
55 #define SIP_STATE_CONNECTED 5
56 #define SIP_STATE_BYE_SENT 6
57 #define SIP_STATE_INVITE_ERR 7
58 #define SIP_STATE_ENDED 8
59 #define SIP_STATE_MSG_SIZE_ERR 9
60
61 #define MGW_STATE_NO_EXIST 0
62 #define MGW_STATE_ALLOCATED 1
63 #define MGW_STATE_CONNECTING 2
64 #define MGW_STATE_COMPLETE 3
65 #define MGW_STATE_DELETING 4