aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmsc/smpp_openbsc.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@gnumonks.org>2017-08-07 14:01:40 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2017-08-27 17:40:55 +0200
commit30743ab1979cdeb2d18129196454b3be8975b916 (patch)
tree4faf6205aad32873fd222fca2d1eb3025dc57271 /src/libmsc/smpp_openbsc.c
parent20366613c4e8bc3b655437f00905d3a692e1a1bc (diff)
libmsc: handle delivery ack via SMPP SUBMIT SM / send GSM 03.40 status report
This patch adds gsm340_sms_send_status_report_tpdu() to build a status-report. Moreover, set sms->report field if we see a SMPP SUBMIT_SM with Delivery Acknowledgment esm_class, so this identifies that this is a delivery report. MS GSM 03.40 SMSC SMPP 3.4 ESME | | | | | SUBMIT-SM | | | esm_class = Delivery Ack | | |<-------------------------------| | | SUBMIT-SM-RESP | | |------------------------------->| | | | | SMS-STATUS-REPORT | | |<----------------------------| | | GSM 04.11 RP-ACK | | |---------------------------->| | | | | There is a FIXME message in this patch, that I just copied from gsm340_gen_sms_deliver_tpdu() since TP-MMS is not supported by OpenBSC. Change-Id: Ib70e534840308ed315f7add440351e649de3f907
Diffstat (limited to 'src/libmsc/smpp_openbsc.c')
-rw-r--r--src/libmsc/smpp_openbsc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libmsc/smpp_openbsc.c b/src/libmsc/smpp_openbsc.c
index 03482be33..09012d013 100644
--- a/src/libmsc/smpp_openbsc.c
+++ b/src/libmsc/smpp_openbsc.c
@@ -144,6 +144,10 @@ static int submit_to_sms(struct gsm_sms **psms, struct gsm_network *net,
osmo_strlcpy(sms->src.addr, (char *)submit->source_addr,
sizeof(sms->src.addr));
+ /* This is a Delivery Acknowledgment. */
+ if (submit->esm_class == 0x08)
+ sms->is_report = true;
+
if (submit->esm_class & 0x40)
sms->ud_hdr_ind = 1;