NAME
NetSDS::Message::SMS - short message according to ETSI GSM 03.40
SYNOPSIS
use NetSDS::Message::SMS;
...
$msg = NetSDS::Message::SMS->new();
$msg->udh(conv_hex_str('050102030405');
$msg->ud('Hello there');
$msg->coding(COD_7BIT);
print "SM: " . $msg->message_body();
DESCRIPTION
This class provides API to SMS message data structure.
CLASS API
- new() - class constructor
-
Implements SMS constructor.
my $object = NetSDS::Message::SMS->new();
- coding() - set/get SMS coding
-
Paramters: new coding to set
Returns: message coding
$msg->coding(COD_UCS2);
- mclass() - set/get message class
-
Paramters: new message class value
$msg->mclass(0); # Send as Flash SMS
- udh() - set/get UDH
-
Paramters: UDH as binary string
Returns: UDH
$msg->udh(conv_hex_str('050102030405');
- ud() - set/get user data
-
Paramters: user data as binary string
Returns: user data
- esm_class() - get esm_class from message
-
See 5.2.12 chapter of SMPP 3.4 specification for details.
$esm_class = $msg->esm_class();
- dcs() - get data coding scheme
-
Returns data coding schmeme in accordance with ETSI GSM 03.38
$dcs = $msg->dcs();
- message_body() - return SMS message body
-
Returns: SMS body as byte string (UDH + UD)
$msg_hex = conv_str_hex($msg->message_body);
EXAMPLES
See samples
directory for examples.
BUGS
Unknown yet
SEE ALSO
* ETSI GSM 03.38 - alphabets and language specific information
* ETSI GSM 03.40 - SMS realization on GSM networks
* SMPP Protocol Specification v3.4
TODO
* Implement RPI and message mode support in esm_class()
* Implement MWI support in dcs() method
AUTHOR
Michael Bochkaryov <misha@rattler.kiev.ua>