Download ActiveXperts SMS and MMS Toolkit 5.1  (6826 KB - .exe file)
Download Manual  (623 KB - .htm file)
Sending MMS Notification messages using the ActiveXperts SMS and MMS Toolkit.
What is a MMS Notification ?
A MMS Notification is an indication on your mobile phone that tells you that a new MMS message has been received on the MMSC.
Depending on your phone's settings, it will automatically download the MMS message from the MMSC if there is a GPRS or UMTS connection available.
The MMS Message is encoded according to the MMS Encapsulation protocol.
There are eight types of PDU's described in this protocol:
- M-Send.req
- M-Send.conf
- GET.req
- M-Retrieve.conf
- M-Notification.ind
- M-NotifyResp.ind
- M-Delivery.ind
- M-Acknowledge.req
For MMS Notification messages the 'M-Notification.ind' PDU is used.
This PDU contains the following fields:
| Name |
Content |
Description |
| X-Mms-Message-Type |
m-notification-ind |
specified the pdu type |
| X-Mms-Transaction-ID |
Transaction-id-value |
Unique id to identify this message |
| X-Mms-MMS-Version |
MMS-version-value |
MMS Version: 1.0 |
| From |
From-value |
Address of the sender, if left blank, this address will be added by the network |
| Subject |
Subject-value |
Optional: subject of the message |
| X-Mms-Message-Class |
Message-class-value |
Message Class: private, informational, advertising or auto |
| X-Mms-Message-Size |
Message-size-value |
Size of the MMS message in bytes |
| X-Mms-Expiry |
Expiry-value |
Expiration of the MMS message on the MMSC |
| X-Mms-Content-Location |
Content-location-value |
The location of the message (for instance http://mmsc.com/mmsc/133/145a.mms) |
Sample of a WAP Push message in binary encoding:
0x8C X-Mms-Message-Type
0x82 'm-notification-ind'
0x98 X-Mms-Transaction-ID
0x34 '4'
0x35 '5'
0x41 'A'
0x36 '6'
0x37 '7'
0x32 '2'
0x33 '3'
0x37 '7'
0x00 Terminating Zero
0x8D X-Mms-MMS-Version
0x90 '1.0'
0x89 From
0x0F FieldSize
0x80 Field is present ( 0x81 when no From address is specified )
0x2B '+'
0x33 '3'
0x31 '1'
0x36 '6'
0x33 '3'
0x38 '8'
0x37 '7'
0x34 '4'
0x30 '0'
0x31 '1'
0x36 '6'
0x30 '0'
0x00 Terminating Zero
0x96 Subject
0x4D 'M'
0x4D 'M'
0x53 'S'
0x00 Terminating Zero
0x8A X-Mms-Message-Class
0x80 'Personal'
0x8E X-Mms-Message-Size
0x04 4 bytes
0x00
0x00
0x1E
0xD3 7891 Bytes
0x88 X-Mms-Expiry
0x06 Field Size
0x80 Absolute Date Format ( 0x81 = Relative Date Format )
0x04 Size of Time field
0x45
0xA7
0xC3
0xB7 1168622519 Seconds from 1-1-1970
0x83 X-Mms-Content-Location
0x68 'h'
0x74 't'
0x74 't'
0x70 'p'
0x3A ':'
0x6D '/'
0x6D '/'
...
0x00 Terminating Zero
Using the SmsDataMmsNotification object
The SMS and MMS Toolkit makes it easy to generate and deliver MMS Notification messages.
You can send MMS Notification messages using a GSM modem (or GSM phone), or using an SMPP provider.
Use the SmsDataMmsNotification object to format the message of the SMS,
and use the regular SmsProtocolGsm, SmsProtocolSmpp or SmsProtocolHttp functions to send the MMS Notification formatted message.
The following code snippet shows how to encode the MMS Notification message as shown above:
Set objNotification = CreateObject ( "ActiveXperts.SmsDataMmsNotification" )
Set objConstants = CreateObject ( "ActiveXperts.SmsConstants" )
objNotification.Expiration = 24 ' Message expires after 1 day
objNotification.Subject = "MMS Notification Demo"
objNotification.ContentLocation = "http://mmsc.activexperts-labs.com/mmsc/b12237b"
objNotification.From = "+31638740161"
objNotification.Class = objConstants.asMMS_CLASS_PERSONAL
objNotification.MessageSize = 7891
objNotification.Encode
Used Parameters
ContentLocation
The URL of the message on the MMSC.
The maximum length of this URL is 255 characters.
For instance: http://mmsc.activexperts-labs.com/200601/a6789bc.mms.
Expiration
After this time the message expires and will be deleted from the MMSC.
This value has to be specified in hours. When the expiry time is 4 days, specify '96'.
Subject
This value is optional. You can use it to set the subject of the MMS message on the MMSC.
Class
Specifies the message class of the message. Some phones have the ability to filter certain classes such as advertising.
When no class is specified, 'personal' will be used.
The following values are valid:
| Value |
Constant |
| "personal" |
asMMS_CLASS_PERSONAL |
| "advertisement" |
asMMS_CLASS_ADVERTISEMENT |
| "informational" |
asMMS_CLASS_INFORMATIONAL |
| "automatic" |
asMMS_CLASS_AUTO |
From
Set to the sender of the message. Most networks will add the sender automatically when this field is left blank.
You can set this value to a phone number or email-address.
MessageSize
This field indicates the messagesize of the message on the MMSC. This field has nothing to do with the size of the notification message itself.
Sending the encoded data
After all parameters has been set, you have to call the "Encode" function.
This function does the actual encoding and stores the encoded data into the 'EncodedMessage' property.
Most of the times a MMS Notification message will fit into a single SMS message, unless the description or URL is very long.
In case of multiple message parts, the encoded data is splitted into multiple messages automatically while sending through one of the SMS protocol objects.
The encoded data can be send using the Smpp or GsmOut object.
Sending WAP Push messages using the SmsProtocolDialUp object is not supported.
Please note that you have to set the messagetype to "asMESSAGEFORMAT_DATA_UDH" because the WAP Push data is encoded as 8 bit message data
and includes UDH information for application port addressing.
The samples below demonstrates how to send the messagedata using the SmsProtocolSmpp and SmsProtocolGsm objects:
SmsProtocolSmpp:
objSmsMessage = CreateObject ( "ActiveXperts.SmsMessage" )
objSmsProtocol = CreateObject ( "ActiveXperts.SmsProtocolSmpp" )
objSmsConstants = CreateObject ( "ActiveXperts.SmsConstants" )
objNotification.Encode
objSmsProtocol.Server = "smpp.activexperts-labs.com"
objSmsProtocol.SystemID = "AX008"
objSmsProtocol.SystemPassword = "812056"
objSmsProtocol.Connect
If ( objSmsProtocol.LastError = 0 ) Then
objMessage.Recipient = "+31624225229"
objMessage.Format = objSmsConstants.asMESSAGEFORMAT_DATA_UDH
objMessage.Data = objNotification.EncodedMessage
objSmsProtocol.Send ( objMessage )
End If
objSmsProtocol.Disconnect
SmsProtocolGsm:
objSmsMessage = CreateObject ( "ActiveXperts.SmsMessage" )
objSmsProtocol = CreateObject ( "ActiveXperts.SmsProtocolGsm" )
objSmsConstants = CreateObject ( "ActiveXperts.SmsConstants" )
objNotification.Encode
objSmsProtocol.Device = "COM1"
objMessage.Recipient = "+31624225229"
objMessage.Format = objSmsConstants.asMESSAGEFORMAT_DATA_UDH
objMessage.Data = objNotification.EncodedMessage
objSmsProtocol.Send ( objMessage )
Download SMPP MMS Notification Sample  (4 KB - .vbs file)
Download GSM MMS Notification Sample  (4 KB - .vbs file)
The ActiveXperts SMS and MMS Toolkit is a SMS development component (SDK). This control can be used by any Windows development platform,
including Visual Basic .NET, Visual CSharp .NET,
ASP .NET (VB,CS),
ASP,
Visual Basic,
Visual Basic for Applications (VBA),
Visual Studio/Visual C++,
Borland Delphi and
C++ Builder,
PHP,
ColdFusion,
HTML,
VBScript and any other ActiveX/COM compliant platform. The SMS and MMS Toolkit is an ActiveXperts Software B.V. Product.
|