summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgsmevent admin <admin@gsmevent.box>2018-12-26 03:58:25 +0100
committergsmevent admin <admin@gsmevent.box>2018-12-27 17:50:43 +0100
commitf4ff6844d21c59fd139fa92d916902d0cb653973 (patch)
tree168c375f1aa26b0a2dca68c344c6c4029dcba1a5
parent05a74f195304d2886ce651dcb4ab786f53f5c178 (diff)
parse RAN out of the mncc message
-rw-r--r--src/call.h2
-rw-r--r--src/mncc.c1
-rw-r--r--src/mncc_protocol.h1
-rw-r--r--src/sip.c13
4 files changed, 17 insertions, 0 deletions
diff --git a/src/call.h b/src/call.h
index 65d1111..1da3ec4 100644
--- a/src/call.h
+++ b/src/call.h
@@ -30,6 +30,8 @@ struct call {
const char *source;
const char *dest;
+
+ uint8_t ran;
};
enum {
diff --git a/src/mncc.c b/src/mncc.c
index dd3a84f..3c9d9b5 100644
--- a/src/mncc.c
+++ b/src/mncc.c
@@ -452,6 +452,7 @@ static void check_setup(struct mncc_connection *conn, const char *buf, int rc)
"MNCC leg(%u) failed to allocate call\n", data->callref);
return mncc_send(conn, MNCC_REJ_REQ, data->callref);
}
+ call->ran = data->ran;
leg = (struct mncc_call_leg *) call->initial;
leg->base.connect_call = mncc_call_leg_connect;
diff --git a/src/mncc_protocol.h b/src/mncc_protocol.h
index 4950a77..cfcedcd 100644
--- a/src/mncc_protocol.h
+++ b/src/mncc_protocol.h
@@ -155,6 +155,7 @@ struct gsm_mncc {
int notify; /* 0..127 */
int emergency;
char imsi[16];
+ uint8_t ran;
unsigned char lchan_type;
unsigned char lchan_mode;
diff --git a/src/sip.c b/src/sip.c
index adf20d8..ca3f5db 100644
--- a/src/sip.c
+++ b/src/sip.c
@@ -427,6 +427,19 @@ static int send_invite(struct sip_agent *agent, struct sip_call_leg *leg,
agent->app->sip.remote_port);
char *sdp = sdp_create_file(leg, other);
+ switch (leg->base.call->ran) {
+ case 1:
+ nua_set_params(leg->nua_handle, SIPTAG_HEADER_STR("P-Access-Network-Info: 3GPP-GERAN"));
+ break;
+ case 2:
+ nua_set_params(leg->nua_handle, SIPTAG_HEADER_STR("P-Access-Network-Info: 3GPP-UTRAN"));
+ break;
+ case 0:
+ default:
+ nua_set_params(leg->nua_handle, SIPTAG_HEADER_STR("P-Access-Network-Info: 3GPP-UNKNOWN"));
+ break;
+ }
+
leg->state = SIP_CC_INITIAL;
leg->dir = SIP_DIR_MT;
nua_invite(leg->nua_handle,