Change in osmo-sip-connector[master]: Support International Caller ID

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu Feb 14 22:12:42 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/12706 )

Change subject: Support International Caller ID
......................................................................

Support International Caller ID

When the SIP call source contains + as first character,
set the TON to International so that the MS displays
caller ID correctly

Change-Id: Idcfa31aff90e04dd0aa3583957f288889b1bbefe
---
M src/mncc.c
1 file changed, 8 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/src/mncc.c b/src/mncc.c
index ea6a9fc..5d220ba 100644
--- a/src/mncc.c
+++ b/src/mncc.c
@@ -775,8 +775,14 @@
 
 	mncc.fields |= MNCC_F_CALLING;
 	mncc.calling.plan = GSM48_NPI_ISDN_E164;
-	mncc.calling.type = GSM48_TON_UNKNOWN;
-	osmo_strlcpy(mncc.calling.number, call->source, sizeof(mncc.calling.number));
+
+	if (call->source && call->source[0] == '+') {
+		mncc.calling.type = GSM48_TON_INTERNATIONAL;
+		OSMO_STRLCPY_ARRAY(mncc.calling.number, call->source + 1);
+	} else {
+		mncc.calling.type = GSM48_TON_UNKNOWN;
+		OSMO_STRLCPY_ARRAY(mncc.calling.number, call->source);
+	}
 
 	if (conn->app->use_imsi_as_id) {
 		snprintf(mncc.imsi, 15, "%s", call->dest);

-- 
To view, visit https://gerrit.osmocom.org/12706
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Idcfa31aff90e04dd0aa3583957f288889b1bbefe
Gerrit-Change-Number: 12706
Gerrit-PatchSet: 6
Gerrit-Owner: Keith Whyte <keith at rhizomatica.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Keith Whyte <keith at rhizomatica.org>
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190214/968272ee/attachment.htm>


More information about the gerrit-log mailing list