NetSDS::Message::SMS - short message according to ETSI GSM 03.40
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();
This class provides API to SMS message data structure.
Implements SMS constructor.
my $object = NetSDS::Message::SMS->new();
Paramters: new coding to set
Returns: message coding
$msg->coding(COD_UCS2);
Paramters: new message class value
$msg->mclass(0); # Send as Flash SMS
Paramters: UDH as binary string
Returns: UDH
$msg->udh(conv_hex_str('050.02130405');
Paramters: user data as binary string
Returns: user data
See 5.2.12 chapter of SMPP 3.4 specification for details.
$esm_class = $msg->esm_class();
Returns data coding schmeme in accordance with ETSI GSM 03.38
$dcs = $msg->dcs();
Returns: SMS body as byte string (UDH + UD)
$msg_hex = conv_str_hex($msg->message_body);
Paramters: string, SMS coding
# Set SMS text $msg->text('Just some string', COD_7BIT);
This will set UDH to undef and UD to string in GSM 03.38.
Paramters: text string (UTF-8), SMS coding
Returns: array of NetSDS::Message::SMS objects
# Create 300 character string my $long_str = 'abc'x100; my @parts = create_long_sm($long_str, COD_7BIT);
See samples directory for examples.
samples
Unknown yet
* ETSI GSM 03.38 - alphabets and language specific information
* ETSI GSM 03.40 - SMS realization on GSM networks
* SMPP Protocol Specification v3.4
* Implement RPI and message mode support in esm_class()
* Implement MWI support in dcs() method
Michael Bochkaryov <misha@rattler.kiev.ua>
Copyright (C) 2008 Michael Bochkaryov
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
To install NetSDS::Message, copy and paste the appropriate command in to your terminal.
cpanm
cpanm NetSDS::Message
CPAN shell
perl -MCPAN -e shell install NetSDS::Message
For more information on module installation, please visit the detailed CPAN module installation guide.