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/.
lynxis lazus gerrit-no-reply at lists.osmocom.org
Review at https://gerrit.osmocom.org/551
sms: change rp err cause of smpp_try_deliver errors
smpp_try_deliver could fail with rc < 0. In such cases don't
sent the MS the rp error sms rejected (cause 21). A rejected message should not
sent again. The spec 04 11 recommends sending cause 41 Temporary failure
in unknown cases.
Add also a log message and rate counter for such cases.
Change-Id: Ia03e50ce2bd9a7d1054cc5a6000fd73bd3497c03
---
M openbsc/include/openbsc/gsm_data.h
M openbsc/src/libmsc/gsm_04_11.c
2 files changed, 9 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/51/551/1
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h
index b16863e..92e4f96 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -174,6 +174,7 @@
MSC_CTR_SMS_DELIVERED,
MSC_CTR_SMS_RP_ERR_MEM,
MSC_CTR_SMS_RP_ERR_OTHER,
+ MSC_CTR_SMS_DELIVER_UNKNOWN_ERROR,
MSC_CTR_CALL_MO_SETUP,
MSC_CTR_CALL_MO_CONNECT_ACK,
MSC_CTR_CALL_MT_SETUP,
@@ -208,6 +209,7 @@
/* FIXME: count also sms delivered */
{"sms.rp_err_mem", "CAUSE_MT_MEM_EXCEEDED errors of MS responses on a sms deliver attempt."},
{"sms.rp_err_other", "Other error of MS responses on a sms delive attempt."},
+ {"sms.deliver_unknown_error", "While trying to deliver an unknown error attempted."},
{"call.mo_setup", "Received setup requests from a MS to init a MO call."},
{"call.mo_connect_ack", "Received a connect ack from MS of a MO call. Call is now succesful connected up."},
{"call.mt_setup", "Sent setup requests to the MS (MT)."},
diff --git a/openbsc/src/libmsc/gsm_04_11.c b/openbsc/src/libmsc/gsm_04_11.c
index 840d4d4..619ff42 100644
--- a/openbsc/src/libmsc/gsm_04_11.c
+++ b/openbsc/src/libmsc/gsm_04_11.c
@@ -40,6 +40,7 @@
#include <osmocom/gsm/gsm_utils.h>
#include <osmocom/gsm/gsm0411_utils.h>
+#include <osmocom/gsm/protocol/gsm_04_11.h>
#include <openbsc/debug.h>
#include <openbsc/gsm_data.h>
@@ -294,8 +295,9 @@
if (rc == 1)
goto try_local;
if (rc < 0) {
- rc = 21; /* cause 21: short message transfer rejected */
- /* FIXME: handle the error somehow? */
+ LOGP(DLSMS, LOGL_ERROR, "While trying to deliver a SMS the error code %d received. Sending rp err cause 41 to ms\n", rc);
+ rc = GSM411_RP_CAUSE_MO_TEMP_FAIL; /* cause 41: Temporary failure */
+ rate_ctr_inc(&conn->bts->network->ratectrs->ctr[MSC_CTR_SMS_DELIVER_UNKNOWN_ERROR]);
}
return rc;
}
@@ -319,8 +321,9 @@
rc = 1; /* cause 1: unknown subscriber */
rate_ctr_inc(&conn->bts->network->ratectrs->ctr[MSC_CTR_SMS_NO_RECEIVER]);
} else if (rc < 0) {
- rc = 21; /* cause 21: short message transfer rejected */
- /* FIXME: handle the error somehow? */
+ LOGP(DLSMS, LOGL_ERROR, "While trying to deliver a SMS the error code %d received. Sending rp err cause 41 to ms\n", rc);
+ rc = GSM411_RP_CAUSE_MO_TEMP_FAIL; /* cause 41: Temporary failure */
+ rate_ctr_inc(&conn->bts->network->ratectrs->ctr[MSC_CTR_SMS_DELIVER_UNKNOWN_ERROR]);
}
#else
rc = 1; /* cause 1: unknown subscriber */
--
To view, visit https://gerrit.osmocom.org/551
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia03e50ce2bd9a7d1054cc5a6000fd73bd3497c03
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>