This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Neels Hofmeyr gerrit-no-reply at lists.osmocom.orgNeels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/12459
Change subject: add SIP P-Access-Network-Info in MO/invites: RAT types
......................................................................
add SIP P-Access-Network-Info in MO/invites: RAT types
Indicate GERAN or UTRAN in SIP headers.
Patch-by: lynxis
Tweaked-by: neels
Change-Id: I186c315d22816b2552b16ec0788718e05de28c3d
---
M src/call.h
M src/mncc.c
M src/sip.c
3 files changed, 20 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-sip-connector refs/changes/59/12459/1
diff --git a/src/call.h b/src/call.h
index 65d1111..8c7a92f 100644
--- a/src/call.h
+++ b/src/call.h
@@ -5,6 +5,7 @@
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/timer.h>
#include <osmocom/core/utils.h>
+#include <osmocom/core/gsm_utils.h>
#include <stdbool.h>
@@ -30,6 +31,8 @@
const char *source;
const char *dest;
+
+ enum osmo_rat_type ran;
};
enum {
diff --git a/src/mncc.c b/src/mncc.c
index ea6a9fc..f16bb5f 100644
--- a/src/mncc.c
+++ b/src/mncc.c
@@ -452,6 +452,7 @@
"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/sip.c b/src/sip.c
index adf20d8..f33f90d 100644
--- a/src/sip.c
+++ b/src/sip.c
@@ -25,6 +25,7 @@
#include "sdp.h"
#include <osmocom/core/utils.h>
+#include <osmocom/core/gsm_utils.h>
#include <sofia-sip/sip_status.h>
#include <sofia-sip/su_log.h>
@@ -416,6 +417,7 @@
const char *calling_num, const char *called_num)
{
struct call_leg *other = leg->base.call->initial;
+ char *paccess_rat_hdr;
char *from = talloc_asprintf(leg, "sip:%s@%s:%d",
calling_num,
@@ -427,11 +429,25 @@
agent->app->sip.remote_port);
char *sdp = sdp_create_file(leg, other);
+ switch (leg->base.call->ran) {
+ case OSMO_RAT_GERAN_A:
+ paccess_rat_hdr = "P-Access-Network-Info: 3GPP-GERAN";
+ break;
+ case OSMO_RAT_UTRAN_IU:
+ paccess_rat_hdr = "P-Access-Network-Info: 3GPP-UTRAN";
+ break;
+ case OSMO_RAT_UNKNOWN:
+ default:
+ paccess_rat_hdr = "P-Access-Network-Info: 3GPP-UNKNOWN";
+ break;
+ }
+
leg->state = SIP_CC_INITIAL;
leg->dir = SIP_DIR_MT;
nua_invite(leg->nua_handle,
SIPTAG_FROM_STR(from),
SIPTAG_TO_STR(to),
+ SIPTAG_HEADER_STR(paccess_rat_hdr),
NUTAG_MEDIA_ENABLE(0),
SIPTAG_CONTENT_TYPE_STR("application/sdp"),
SIPTAG_PAYLOAD_STR(sdp),
--
To view, visit https://gerrit.osmocom.org/12459
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I186c315d22816b2552b16ec0788718e05de28c3d
Gerrit-Change-Number: 12459
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190103/7a6a1fce/attachment.htm>