FreeCalypso > hg > themwi-system-sw
annotate sip-out/mncc_sig_out.c @ 243:59a166c50d0e
themwi-mncc: convert to libnumdb2
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 14 Aug 2023 19:13:26 -0800 |
parents | e54b0a9e322f |
children |
rev | line source |
---|---|
63
e5aee661e3b2
sip-in: beginning to handle incoming MNCC messages from themwi-mncc
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
154
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
2 * In this module we implement functions that send MNCC messages |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
3 * to OsmoMSC via themwi-mncc, to be called by SIP and TMGW events. |
63
e5aee661e3b2
sip-in: beginning to handle incoming MNCC messages from themwi-mncc
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 */ |
e5aee661e3b2
sip-in: beginning to handle incoming MNCC messages from themwi-mncc
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 |
e5aee661e3b2
sip-in: beginning to handle incoming MNCC messages from themwi-mncc
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 #include <sys/types.h> |
e5aee661e3b2
sip-in: beginning to handle incoming MNCC messages from themwi-mncc
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 #include <sys/socket.h> |
109
9b87894704eb
sip-in: first step toward final call clearing
Mychaela Falconia <falcon@freecalypso.org>
parents:
98
diff
changeset
|
8 #include <sys/time.h> |
63
e5aee661e3b2
sip-in: beginning to handle incoming MNCC messages from themwi-mncc
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 #include <netinet/in.h> |
e5aee661e3b2
sip-in: beginning to handle incoming MNCC messages from themwi-mncc
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 #include <stdio.h> |
e5aee661e3b2
sip-in: beginning to handle incoming MNCC messages from themwi-mncc
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 #include <stdint.h> |
e5aee661e3b2
sip-in: beginning to handle incoming MNCC messages from themwi-mncc
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 #include <stdlib.h> |
e5aee661e3b2
sip-in: beginning to handle incoming MNCC messages from themwi-mncc
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 #include <string.h> |
e5aee661e3b2
sip-in: beginning to handle incoming MNCC messages from themwi-mncc
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 #include <strings.h> |
e5aee661e3b2
sip-in: beginning to handle incoming MNCC messages from themwi-mncc
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 #include <syslog.h> |
e5aee661e3b2
sip-in: beginning to handle incoming MNCC messages from themwi-mncc
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 #include "../include/mncc.h" |
e5aee661e3b2
sip-in: beginning to handle incoming MNCC messages from themwi-mncc
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 #include "../include/gsm48_const.h" |
154
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
18 #include "../include/out_routes.h" |
63
e5aee661e3b2
sip-in: beginning to handle incoming MNCC messages from themwi-mncc
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 #include "call.h" |
e5aee661e3b2
sip-in: beginning to handle incoming MNCC messages from themwi-mncc
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 |
154
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
21 void |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
22 mncc_signal_alerting(call) |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
23 struct call *call; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
24 { |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
25 struct gsm_mncc msg; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
26 |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
27 if (call->mncc_state == MNCC_STATE_ALERTING) |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
28 return; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
29 bzero(&msg, sizeof(struct gsm_mncc)); |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
30 msg.msg_type = MNCC_ALERT_REQ; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
31 msg.callref = call->mncc_callref; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
32 send_mncc_to_sock(call->mncc, &msg, sizeof(struct gsm_mncc)); |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
33 call->mncc_state = MNCC_STATE_ALERTING; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
34 } |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
35 |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
36 void |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
37 mncc_signal_ibt_ring(call) |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
38 struct call *call; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
39 { |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
40 struct gsm_mncc msg; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
41 |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
42 bzero(&msg, sizeof(struct gsm_mncc)); |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
43 if (call->overall_state == OVERALL_STATE_RINGING && |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
44 call->mncc_state != MNCC_STATE_ALERTING) { |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
45 msg.msg_type = MNCC_ALERT_REQ; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
46 call->mncc_state = MNCC_STATE_ALERTING; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
47 } else |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
48 msg.msg_type = MNCC_PROGRESS_REQ; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
49 msg.callref = call->mncc_callref; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
50 msg.fields |= MNCC_F_PROGRESS; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
51 msg.progress.coding = GSM48_CAUSE_CODING_GSM; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
52 msg.progress.location = GSM48_CAUSE_LOC_NET_BEYOND; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
53 msg.progress.descr = GSM48_PROGR_IN_BAND_AVAIL; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
54 send_mncc_to_sock(call->mncc, &msg, sizeof(struct gsm_mncc)); |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
55 } |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
56 |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
57 void |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
58 mncc_signal_answer_sup(call) |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
59 struct call *call; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
60 { |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
61 struct gsm_mncc msg; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
62 |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
63 bzero(&msg, sizeof(struct gsm_mncc)); |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
64 msg.msg_type = MNCC_SETUP_RSP; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
65 msg.callref = call->mncc_callref; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
66 send_mncc_to_sock(call->mncc, &msg, sizeof(struct gsm_mncc)); |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
67 call->mncc_state = MNCC_STATE_CONNECTED; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
68 } |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
69 |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
70 void |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
71 mncc_dtmf_start_ok(call) |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
72 struct call *call; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
73 { |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
74 struct gsm_mncc msg; |
63
e5aee661e3b2
sip-in: beginning to handle incoming MNCC messages from themwi-mncc
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 |
154
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
76 bzero(&msg, sizeof(struct gsm_mncc)); |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
77 msg.msg_type = MNCC_START_DTMF_RSP; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
78 msg.callref = call->mncc_callref; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
79 msg.fields |= MNCC_F_KEYPAD; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
80 msg.keypad = call->dtmf_digit; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
81 send_mncc_to_sock(call->mncc, &msg, sizeof(struct gsm_mncc)); |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
82 } |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
83 |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
84 void |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
85 mncc_dtmf_start_err(call) |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
86 struct call *call; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
87 { |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
88 struct gsm_mncc msg; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
89 |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
90 bzero(&msg, sizeof(struct gsm_mncc)); |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
91 msg.msg_type = MNCC_START_DTMF_REJ; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
92 msg.callref = call->mncc_callref; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
93 mncc_set_cause(&msg, GSM48_CAUSE_LOC_PRN_S_LU, |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
94 GSM48_CC_CAUSE_PROTO_ERR); |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
95 send_mncc_to_sock(call->mncc, &msg, sizeof(struct gsm_mncc)); |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
96 } |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
97 |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
98 void |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
99 mncc_dtmf_stop_ok(call) |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
100 struct call *call; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
101 { |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
102 struct gsm_mncc msg; |
83
3e3fbf44f9d7
sip-in: disconnect and call clearing implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
66
diff
changeset
|
103 |
154
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
104 bzero(&msg, sizeof(struct gsm_mncc)); |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
105 msg.msg_type = MNCC_STOP_DTMF_RSP; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
106 msg.callref = call->mncc_callref; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
107 send_mncc_to_sock(call->mncc, &msg, sizeof(struct gsm_mncc)); |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
108 } |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
109 |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
110 void |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
111 mncc_send_hold_ack(call) |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
112 struct call *call; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
113 { |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
114 struct gsm_mncc msg; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
115 |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
116 bzero(&msg, sizeof(struct gsm_mncc)); |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
117 msg.msg_type = MNCC_HOLD_CNF; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
118 msg.callref = call->mncc_callref; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
119 send_mncc_to_sock(call->mncc, &msg, sizeof(struct gsm_mncc)); |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
120 } |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
121 |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
122 void |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
123 mncc_send_retrieve_ack(call) |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
124 struct call *call; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
125 { |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
126 struct gsm_mncc msg; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
127 |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
128 bzero(&msg, sizeof(struct gsm_mncc)); |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
129 msg.msg_type = MNCC_RETRIEVE_CNF; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
130 msg.callref = call->mncc_callref; |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
131 send_mncc_to_sock(call->mncc, &msg, sizeof(struct gsm_mncc)); |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
132 } |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
133 |
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
134 void |
140
01fe81914bd6
sip-in: move MNCC_RTP_CONNECT sending to answer time
Mychaela Falconia <falcon@freecalypso.org>
parents:
128
diff
changeset
|
135 send_rtp_connect(call) |
01fe81914bd6
sip-in: move MNCC_RTP_CONNECT sending to answer time
Mychaela Falconia <falcon@freecalypso.org>
parents:
128
diff
changeset
|
136 struct call *call; |
01fe81914bd6
sip-in: move MNCC_RTP_CONNECT sending to answer time
Mychaela Falconia <falcon@freecalypso.org>
parents:
128
diff
changeset
|
137 { |
01fe81914bd6
sip-in: move MNCC_RTP_CONNECT sending to answer time
Mychaela Falconia <falcon@freecalypso.org>
parents:
128
diff
changeset
|
138 struct gsm_mncc_rtp rtp; |
01fe81914bd6
sip-in: move MNCC_RTP_CONNECT sending to answer time
Mychaela Falconia <falcon@freecalypso.org>
parents:
128
diff
changeset
|
139 |
01fe81914bd6
sip-in: move MNCC_RTP_CONNECT sending to answer time
Mychaela Falconia <falcon@freecalypso.org>
parents:
128
diff
changeset
|
140 bzero(&rtp, sizeof(struct gsm_mncc_rtp)); |
01fe81914bd6
sip-in: move MNCC_RTP_CONNECT sending to answer time
Mychaela Falconia <falcon@freecalypso.org>
parents:
128
diff
changeset
|
141 rtp.msg_type = MNCC_RTP_CONNECT; |
01fe81914bd6
sip-in: move MNCC_RTP_CONNECT sending to answer time
Mychaela Falconia <falcon@freecalypso.org>
parents:
128
diff
changeset
|
142 rtp.callref = call->mncc_callref; |
01fe81914bd6
sip-in: move MNCC_RTP_CONNECT sending to answer time
Mychaela Falconia <falcon@freecalypso.org>
parents:
128
diff
changeset
|
143 bcopy(&call->gsm_rtp_tmgw, &rtp.addr, sizeof(struct sockaddr_storage)); |
154
e54b0a9e322f
beginning of themwi-sip-out
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
144 send_mncc_to_sock(call->mncc, &rtp, sizeof(struct gsm_mncc_rtp)); |
141
e499e8db8b82
sip-in: handle call hold and retrieve
Mychaela Falconia <falcon@freecalypso.org>
parents:
140
diff
changeset
|
145 } |