Change in osmo-sip-connector[master]: Add Cause to DISCONNECT and RELEASE Requests

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
Mon May 28 16:20:42 UTC 2018


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

Change subject: Add Cause to DISCONNECT and RELEASE Requests
......................................................................

Add Cause to DISCONNECT and RELEASE Requests

GSM 04.08 10.5.4.11 (Table 10.85) states:

Coding standards other than the standard defined for the
GSM PLMNS shall not be used if the cause can be represented
with the GSM standardized coding.

This patch adds cause coding GSM PLMS (3) and sets cause
location to  "public network serving the local user" (2)
This prevents UE that pay attention to this from treating
all call termination as an error and paves the way to
adding correct cause mapping from Table 10.86

Also replaces use of magic numbers with enum constants.

Change-Id: I5d3fe3f0c9e8de26dd0c73b10b7e4fc63dff3952
---
M src/mncc.c
1 file changed, 12 insertions(+), 7 deletions(-)

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



diff --git a/src/mncc.c b/src/mncc.c
index 3b9f0f4..b2c4abb 100644
--- a/src/mncc.c
+++ b/src/mncc.c
@@ -107,6 +107,11 @@
 {
 	mncc->msg_type = msg_type;
 	mncc->callref = callref;
+	if (MNCC_DISC_REQ == msg_type || MNCC_REL_REQ == msg_type) {
+		mncc->fields |= MNCC_F_CAUSE;
+		mncc->cause.coding = GSM48_CAUSE_CODING_GSM;
+		mncc->cause.location = GSM48_CAUSE_LOC_PUN_S_LU;
+	}
 }
 
 static void mncc_write(struct mncc_connection *conn, struct gsm_mncc *mncc, uint32_t callref)
@@ -208,9 +213,9 @@
 	mncc_fill_header(&out_mncc, MNCC_ALERT_REQ, leg->callref);
 	/* GSM 04.08 10.5.4.21 */
 	out_mncc.fields |= MNCC_F_PROGRESS;
-	out_mncc.progress.coding = 3; /* Standard defined for the GSMßPLMNS */
-	out_mncc.progress.location = 1; /* Private network serving the local user */
-	out_mncc.progress.descr = 8; /* In-band information or appropriate pattern now available */
+	out_mncc.progress.coding = GSM48_CAUSE_CODING_GSM; /* Standard defined for the GSMßPLMNS */
+	out_mncc.progress.location = GSM48_CAUSE_LOC_PRN_S_LU; /* Private network serving the local user */
+	out_mncc.progress.descr = GSM48_PROGR_IN_BAND_AVAIL; /* In-band information or appropriate pattern now available */
 
 	mncc_write(leg->conn, &out_mncc, leg->callref);
 
@@ -749,16 +754,16 @@
 	mncc.callref = leg->callref;
 
 	mncc.fields |= MNCC_F_CALLING;
-	mncc.calling.plan = 1;
-	mncc.calling.type = 0x0;
+	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 (conn->app->use_imsi_as_id) {
 		snprintf(mncc.imsi, 15, "%s", call->dest);
 	} else {
 		mncc.fields |= MNCC_F_CALLED;
-		mncc.called.plan = 1;
-		mncc.called.type = 0x0;
+		mncc.called.plan = GSM48_NPI_ISDN_E164;
+		mncc.called.type = GSM48_TON_UNKNOWN;
 		osmo_strlcpy(mncc.called.number, call->dest, sizeof(mncc.called.number));
 	}
 

-- 
To view, visit https://gerrit.osmocom.org/9270
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: I5d3fe3f0c9e8de26dd0c73b10b7e4fc63dff3952
Gerrit-Change-Number: 9270
Gerrit-PatchSet: 3
Gerrit-Owner: Keith Whyte <keith at rhizomatica.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Keith Whyte <keith at rhizomatica.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180528/9929fbc2/attachment.htm>


More information about the gerrit-log mailing list