External SMS applications using SMPP · 2018. 10. 19. · Abis/IP OsmoNITB VTY CTRL Includes...

14
19 Oct 2018 (c) 2018 by sysmocom - s.f.m.c. GmbH 1 External SMS applications using SMPP Harald Welte <[email protected]>

Transcript of External SMS applications using SMPP · 2018. 10. 19. · Abis/IP OsmoNITB VTY CTRL Includes...

Page 1: External SMS applications using SMPP · 2018. 10. 19. · Abis/IP OsmoNITB VTY CTRL Includes functionality of * BSC * MSC/VLR * HLR/AUC * SMSC Linux Call Router SoftSwitch / PBX SIP

19 Oct 2018 (c) 2018 by sysmocom - s.f.m.c. GmbH 1

External SMS applications using SMPPHarald Welte <[email protected]>

Page 2: External SMS applications using SMPP · 2018. 10. 19. · Abis/IP OsmoNITB VTY CTRL Includes functionality of * BSC * MSC/VLR * HLR/AUC * SMSC Linux Call Router SoftSwitch / PBX SIP

19 Oct 2018 (c) 2018 by sysmocom - s.f.m.c. GmbH 2

History: OsmoNITB➔ “Everything needed beyond the BTS”➔ This means, minimal sub-set of

– BSC– MSC– SMSC– HLR

➔ MNCC as interface for external call handling➔ SMPP v3.4 as interface for external SMS handling

Discontinued in 2017

SDR Hardware

OsmoTRX Transceiver

VTY

OsmoBTS

osmo-bts-trx osmo-bts-sysmo

CTRL

sysmoBTS PHY sysmoBTS Hardware

Abis/IP

OsmoNITBVTY CTRL

Includes functionality of * BSC * MSC/VLR * HLR/AUC * SMSC

Linux Call RouterSoftSwitch / PBX

SIP

E1/PRI

BRI

External SMS Applications

3rd Party BTSSome support for * Siemens * Nokia * Ericsson * ip.access

Abis/IP Abis/E1

SMPPMNCC

Page 3: External SMS applications using SMPP · 2018. 10. 19. · Abis/IP OsmoNITB VTY CTRL Includes functionality of * BSC * MSC/VLR * HLR/AUC * SMSC Linux Call Router SoftSwitch / PBX SIP

19 Oct 2018 (c) 2018 by sysmocom - s.f.m.c. GmbH 3

Present: OsmoMSC

➔ OsmoNITB split into BSC, MSC, HLR➔ SMSC remained inside OsmoMSC :(➔ SMPP v3.4 still the only programmatic

interface to SMS

Radio Access Network Core Network

hNodeB

Gp

GSUP

Iuh

RTP

IuCS

GSUP

SS7 Internet

Gi

OsmoBTS OsmoBSC

OsmoPCU

OsmoSIP connector

OsmoMGW

OsmoHNBGW

OsmoMSC (VLR)

 

OsmoSGSN  

OsmoGGSN  

SMSCRTP

IuPS

OsmoMGW

RTP

MGCP

SIGTRANSIGTRAN

MGCP

OsmoSTP  

OsmoSTP  

OsmoSIP connector

OsmoHLROsmoBTS

RTP

OsmoPCU

OsmoBSCMGCP

RTP

OsmoMGWRTP

OsmoMGW

RTP

MGCP

MGCP

Iuh

IuCS

OsmoHNBGW IuPS

SIGTRANSIGTRAN

OsmoSTP  

OsmoSTP  

Gp

GSUPOsmoSGSN  

IuPS

IuCS

GSUP

OsmoMSC (VLR)

 

SMSC

MGCP

Gp

Gi

OsmoGGSN  GSUP

GSUPOsmoHLR

OsmoSIP connectorOsmoSIP connectorhNodeB

Gp

GSUP

Iuh

RTP

IuCS

GSUP

SS7 Internet

Gi

OsmoBTS OsmoBSC

OsmoPCU

OsmoMGW

OsmoHNBGW

OsmoMSC (VLR)

 

OsmoSGSN  

OsmoGGSN  

SMSCRTP

IuPS

OsmoMGW

RTP

MGCP

SIGTRANSIGTRAN

MGCP

OsmoSTP  

OsmoSTP  

OsmoSIP connector

OsmoHLR

Page 4: External SMS applications using SMPP · 2018. 10. 19. · Abis/IP OsmoNITB VTY CTRL Includes functionality of * BSC * MSC/VLR * HLR/AUC * SMSC Linux Call Router SoftSwitch / PBX SIP

19 Oct 2018 (c) 2018 by sysmocom - s.f.m.c. GmbH 4

SMPP

➔ Not a 3GPP standard, but standard by SMS industry (SMSC vendors)➔ Doesn't describe protocols/interfaces inside GSM network, but towards external users

– External SMS Entity (ESME) is the terminology for such users/applications➔ Binary protocol, follows yet another style/mix of fixed + variable/optional fields

– Implementations exist for many languages (C, Java, Python, …)➔ Unfortunately not transparent with what happens on GSM Layer 3 + above

– Different definitions of coding schemes– Different encoding from TPDU

Page 5: External SMS applications using SMPP · 2018. 10. 19. · Abis/IP OsmoNITB VTY CTRL Includes functionality of * BSC * MSC/VLR * HLR/AUC * SMSC Linux Call Router SoftSwitch / PBX SIP

19 Oct 2018 (c) 2018 by sysmocom - s.f.m.c. GmbH 5

Ways to use SMS in Osmocom CNI

➔ Send SMS from one phone/modem to another– most natural way for SMS– requires radio resources and is slow

➔ Send SMS from the VTY– not really useful beyond development and testing– VTY is for human user, not programmatic use by other programs

➔ Send SMS from an external application via SMPP– yay, proper interface/protocol designed for this purpose!

Page 6: External SMS applications using SMPP · 2018. 10. 19. · Abis/IP OsmoNITB VTY CTRL Includes functionality of * BSC * MSC/VLR * HLR/AUC * SMSC Linux Call Router SoftSwitch / PBX SIP

19 Oct 2018 (c) 2018 by sysmocom - s.f.m.c. GmbH 6

OsmoMSC SMPP configuration➔ smpp node

– local-tcp-port 2775

– policy (accept-all|closed): Accept any ESME or only those with proper credentials?– [no] smpp-first: Do SMPP routes take higher precedence over other subscribers?– system-id NAME: The SMPP system ID as which the SMSC identifies itself

➔ esme NAME node: Configure an ESME with system-id “NAME”– password PASSWORD: set the – route prefix …: install a prefix route with type-of-number / numbering plan / digits– default-route: install the default route to this ESME

Page 7: External SMS applications using SMPP · 2018. 10. 19. · Abis/IP OsmoNITB VTY CTRL Includes functionality of * BSC * MSC/VLR * HLR/AUC * SMSC Linux Call Router SoftSwitch / PBX SIP

19 Oct 2018 (c) 2018 by sysmocom - s.f.m.c. GmbH 7

MT-SMS from SMPP (1/2)

Page 8: External SMS applications using SMPP · 2018. 10. 19. · Abis/IP OsmoNITB VTY CTRL Includes functionality of * BSC * MSC/VLR * HLR/AUC * SMSC Linux Call Router SoftSwitch / PBX SIP

19 Oct 2018 (c) 2018 by sysmocom - s.f.m.c. GmbH 8

MT-SMS from SMPP (2/2)

Page 9: External SMS applications using SMPP · 2018. 10. 19. · Abis/IP OsmoNITB VTY CTRL Includes functionality of * BSC * MSC/VLR * HLR/AUC * SMSC Linux Call Router SoftSwitch / PBX SIP

19 Oct 2018 (c) 2018 by sysmocom - s.f.m.c. GmbH 9

MO-SMS to SMPP (2/2)

Page 10: External SMS applications using SMPP · 2018. 10. 19. · Abis/IP OsmoNITB VTY CTRL Includes functionality of * BSC * MSC/VLR * HLR/AUC * SMSC Linux Call Router SoftSwitch / PBX SIP

19 Oct 2018 (c) 2018 by sysmocom - s.f.m.c. GmbH 10

MO-SMS to SMPP (1/2)

Page 11: External SMS applications using SMPP · 2018. 10. 19. · Abis/IP OsmoNITB VTY CTRL Includes functionality of * BSC * MSC/VLR * HLR/AUC * SMSC Linux Call Router SoftSwitch / PBX SIP

19 Oct 2018 (c) 2018 by sysmocom - s.f.m.c. GmbH 11

Osmocom SMPP extensions

➔ deliver-src-imsi: Use IMSI instead of MSISDN when delivering MO SMS to ESME➔ osmocom-estensions: Include various details

– ARFCN, RxLev, RxQual – only in NITB!– IMEI of subscriber

➔ dcs-transparent: Use 3GPP data coding scheme values even in SMPP➔ SMPP ALERT every time a LOCATION UPDATE happens

Page 12: External SMS applications using SMPP · 2018. 10. 19. · Abis/IP OsmoNITB VTY CTRL Includes functionality of * BSC * MSC/VLR * HLR/AUC * SMSC Linux Call Router SoftSwitch / PBX SIP

19 Oct 2018 (c) 2018 by sysmocom - s.f.m.c. GmbH 12

Limitations of Osmocom SMS

➔ SMSC inside OsmoMSC assumes network consists of single SMSC➔ No delivery reports➔ No roaming / interworking with other networks➔ Outlook

– Vadim is creating a “proper” MSC SMS-IWMSC / SMS-GMSC interface↔

● Use GSUP instead of MAP for SRI-for-SM, Forward-SM & friends– This paves the way for having an external [Osmo]SMSC, shared by multiple MSCs

Page 13: External SMS applications using SMPP · 2018. 10. 19. · Abis/IP OsmoNITB VTY CTRL Includes functionality of * BSC * MSC/VLR * HLR/AUC * SMSC Linux Call Router SoftSwitch / PBX SIP

19 Oct 2018 (c) 2018 by sysmocom - s.f.m.c. GmbH 13

SMPP is not for all use cases

➔ SMPP was designed as protocol between SMSC and ESME➔ It's not intended for use between MS and SMSC➔ If you want inbound roaming from other networks

– the SMSC is in home network, while MS/RAN/MSC in visited network– there are MAP-encoded messages between (visited) MSC and (home) SMSC

➔ Ignoring the question of MAP encoding/protocol– we still need the kind of procedures/transactions like MAP ForwardSM, …

➔ This is not possible using SMPP. Vadim is working on proper GSUP based SMS handling

Page 14: External SMS applications using SMPP · 2018. 10. 19. · Abis/IP OsmoNITB VTY CTRL Includes functionality of * BSC * MSC/VLR * HLR/AUC * SMSC Linux Call Router SoftSwitch / PBX SIP

19 Oct 2018 (c) 2018 by sysmocom - s.f.m.c. GmbH 14

Further Reading

➔ The SMPP chapter of the OsmoMSC user manual➔ https://osmocom.org/projects/libsmpp34/wiki (Osmocom libsmpp34 homepage)➔ http://sourceforge.net/projects/c-open-smpp-34/ (original libsmpp34 homepage)➔ http://opensmpp.org/specs/SMPP_v3_4_Issue1_2.pdf (SMPP 3.4 spec)➔ http://opensmpp.org/specs/smppv34_gsmumts_ig_v10.pdf (GSM guidelines)➔ http://opensmpp.org/ (OpenSMPP Java library)➔ https://github.com/praekelt/python-smpp (Python SMPP library, Twisted based)➔ http://git.osmocom.org/osmo-gsm-tester/tree/src/osmo_gsm_tester/esme.py