Download ActiveXperts SMS and MMS Toolkit 5.1  (6826 KB - .exe file)
Download Manual  (623 KB - .htm file)
SMS and MMS Toolkit - SmsProtocolSmpp object
Overview
SMPP stands for Short Message Peer to Peer Protocol SMPP is used to send and receive messages from and to GSM, UMTS, iDEN, CDMA and TDMA cell phones.
The protocol is a level-7 TCP/IP protocol, which allows fast deliver of SMS messages.
Using the SMPP protocol instead of sending/receiving messages using a GSM modem has the following advantages:
- The SMPP protocol is TCP/IP based, GSM hardware is not required;
- Users can send SMS to a simple shortcode, this is not possible when sending to a GSM phone;
- High throughput (up to 200 messages per second);
- Alphanumeric sender address can be assigned.
The SmsProtocolSmpp object features the following:
- Send and receive SMS messages through an SMPP compliant SMSC provider;;
- Send and receive alphanumeric text and binary multimedia SMS messages, including ringtones, pictures and logo's;
- Send and receive WAP Push messages, WAP Bookmark messages, voicemail/e-mail/fax indications;
- Verify delivery (so called 'status reports');
- Support for Unicode, to support foreign languages like Chinese, Turkisch, etc.;
- Support for multi-part messages, to allow messages longer than 160 characters.
The SmsProtocolSmpp object is part of the ActiveXperts SMS and MMS Toolkit component. Overview of all SMS and MMS Toolkit objects:
- SmsProtocolGsm - Send and receive SMS messages using a GSM modem or a modem-capable GSM phone.
- SmsProtocolSmpp - Send and receive SMS messages via an SMPP provider.
- SmsProtocolHttp - Send (bulk) SMS messages through an SMS/HTTP compliant SMS provider over the internet/VPN.
- SmsProtocolDialup - Send SMS messages using a normal Hayes compatible modem (1200 bps or higher).
- MmsProtocolMM1 - Send and receive MMS messages via a GPRS modem through WAP (wireless application protocol).
- MmsProtocolMM4 - Send MMS messages via an SMTP server. The protocol is based on SMTP, messages are MIME encoded.
- MmsProtocolMM7 - Send and receive MMS messages via SOAP/XML using HTTP as the transport protocol.
- PagerProtocolSnpp - Send pager messages via an SNPP provider through the internet/VPN.
Sample code
VBScript sample: Send a simple SMS message via SMPP
Set objSmppProtocol = CreateObject ( "ActiveXperts.SmsProtocolSmpp" )
Set objSmsMessage = CreateObject ( "ActiveXperts.SmsMessage" )
Set objConstants = CreateObject ( "ActiveXperts.SmsConstants" )
' Set provider properties
objSmppProtocol.Server = "smpp.activexperts-labs.com"
objSmppProtocol.ServerPort = 2775
objSmppProtocol.SystemID = "mylogin"
objSmppProtocol.SystemPassword = "topsecret"
objSmppProtocol.SystemType = "SMPP"
objSmppProtocol.ServerTimeout = 3000
objSmppProtocol.SystemMode = objConstants.asSMPPMODE_TRANSMITTER
objSmppProtocol.Connect ' Connect
If( objSmppProtocol.LastError <> 0 ) Then
WScript.Quit
End If
' Message: set all properties
objSmsMessage.Clear
objSmsMessage.Recipient = "+31625044454" ' Recipient's mobile number
objSmsMessage.Format = objConstants.asMESSAGEFORMAT_TEXT ' Plain text
objSmsMessage.Data = "ActiveXperts Test Message" ' Set message body
' Send the message
strReference = objSmppProtocol.Send( objSmsMessage )
If( objSmppProtocol.LastError <> 0 ) Then
objSmppProtocol.Disconnect
WScript.Quit
End If
WScript.Echo "Message Reference: " & strReference ' Show the Message Reference
objSmppProtocol.Disconnect
VB .NET sample: Send a simple SMS message via SMPP
Imports AXmsCtrl
Module Module1
Sub Main()
Dim objSmppProtocol As SmsProtocolSmpp = New SmsProtocolSmpp
Dim objSmsMessage As SmsMessage = New SmsMessage
Dim objConstants As SmsConstants = New SmsConstants
Dim strMessageRef
objSmppProtocol.Clear()
' Set provider properties
objSmppProtocol.Server = "smpp.activexperts-labs.com"
objSmppProtocol.ServerPort = 2775
objSmppProtocol.SystemID = "mylogin"
objSmppProtocol.SystemPassword = "topsecret"
objSmppProtocol.SystemType = "SMPP"
objSmppProtocol.ServerTimeout = 3000
objSmppProtocol.SystemMode = objConstants.asSMPPMODE_TRANSMITTER
' Connect
objSmppProtocol.Connect()
Console.WriteLine("Connect, result: " & objSmppProtocol.LastError )
If (objSmppProtocol.LastError = 0) Then
' Message: set all properties
objSmsMessage.Clear
objSmsMessage.Recipient= "+31625044454" ' Recipient's mobile number
objSmsMessage.Format = objConstants.asMESSAGEFORMAT_TEXT ' Plain text
objSmsMessage.Data = "ActiveXperts Test Message" ' Set message body
' Send the message
strReference = objSmppProtocol.Send( objSmsMessage )
If( objSmppProtocol.LastError = 0 ) Then
Console.WriteLine("Message Reference: " + strMessageRef)
End If
objSmppProtocol.Disconnect()
End If
End Sub
End Module
More samples
Samples are available for: Visual Basic, Visual C/C++, VB .NET, VC# .NET, ASP, ASP .NET, Borland C++ Builder, Boland Delphi, ColdFusion, Java, Javascript, PHP, HTML and more.
On ftp.activexperts-labs.com, you can find many SMS and MMS Toolkit samples.
Samples are also part of the SMS and MMS Toolkit installation.
|