summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2021-02-27 12:07:57 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2021-03-14 11:20:55 +0100
commitb130c947f7ba19e2ff0c27671dfaf98938d4e027 (patch)
tree67ed86bf4c3513673a9d109d22f880df4674e783 /src
parentd5face6404c604e0baff7aed9a1ba5db18431f51 (diff)
Add selection of network information element
Diffstat (limited to 'src')
-rw-r--r--src/router/routing.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/router/routing.c b/src/router/routing.c
index 118ef78..b49f6d4 100644
--- a/src/router/routing.c
+++ b/src/router/routing.c
@@ -86,7 +86,8 @@ void routing_env_msg(routing_t *routing, osmo_cc_msg_t *msg)
{
uint8_t coding, capability, mode;
uint8_t type, plan, present, screen, reason;
- char number[256];
+ uint8_t network_type;
+ char number[256], network_id[256];
int rc, i;
for (i = 0; environ[i]; i++) {
@@ -113,7 +114,7 @@ void routing_env_msg(routing_t *routing, osmo_cc_msg_t *msg)
routing->envp[routing->envc++] = env_string("CALLING_INTERFACE", number);
}
- rc = osmo_cc_get_ie_calling(msg, 2, &type, &plan, &present, &screen, number, sizeof(number));
+ rc = osmo_cc_get_ie_calling(msg, 1, &type, &plan, &present, &screen, number, sizeof(number));
if (rc >= 0) {
routing->envp[routing->envc++] = env_int("CALLING2_TYPE", type);
routing->envp[routing->envc++] = env_int("CALLING2_PLAN", plan);
@@ -121,7 +122,11 @@ void routing_env_msg(routing_t *routing, osmo_cc_msg_t *msg)
routing->envp[routing->envc++] = env_int("CALLING2_SCREEN", screen);
routing->envp[routing->envc++] = env_string("CALLING2", number);
}
-
+ rc = osmo_cc_get_ie_calling_network(msg, 0, &network_type, network_id, sizeof(network_id));
+ if (rc >= 0) {
+ routing->envp[routing->envc++] = env_string("NETWORK_TYPE", osmo_cc_network_type_name(network_type));
+ routing->envp[routing->envc++] = env_string("NETWORK_ID", network_id);
+ }
rc = osmo_cc_get_ie_redir(msg, 0, &type, &plan, &present, &screen, &reason, number, sizeof(number));
if (rc >= 0) {
routing->envp[routing->envc++] = env_int("REDIRECTING_TYPE", type);