Category Archives: MMS

Multimedia Messaging Service

Perl Module to access Clickatell HTTP API

I’ve written a perl module to access to Clickatell HTTP API. This module supports the API from Clickatell’s HTTP API Specification v.2.2.7.

The following are all the available APIs and whether they are supported or not:

Basic Commands

  • http://api.clickatell.com/http/auth
  • Yes (But session Not support)
  • http://api.clickatell.com/http/ping
    • Yes (But session Not support)
  • http://api.clickatell.com/http/querymsg
    • Yes
  • http://api.clickatell.com/http/sendmsg
    • Yes

    Additional Commands

    • http://api.clickatell.com/http/delmsg
    • No
  • http://api.clickatell.com/http/getbalance
    • Yes
  • http://api.clickatell.com/http/routeCoverage.php
    • Yes
  • http://api.clickatell.com/mms/ind_push.php
    • Yes
  • http://api.clickatell.com/mms/si_push.php
    • Yes
  • http://api.clickatell.com/http/getmsgcharge
    • Yes
  • http://api.clickatell.com/http/token_pay
    • No

    Batch Messaging

    • http://api.clickatell.com/http_batch/startbatch
    • No
  • http://api.clickatell.com/http_batch/senditem
    • No
  • http://api.clickatell.com/http_batch/quicksend
    • No
  • http://api.clickatell.com/http_batch/endbatch
    • No

    I tested this module on perl v5.8.5.

    INSTALL

    To install the module, perform the usual perl module installation procedures. The following is the steps:

            perl Makefile.PL
            make
            make install
    

    Continue reading Perl Module to access Clickatell HTTP API

    Example to read MMS message and write to a file in Perl

    This example is a simple subroutine to check whether the content is a MMS and write to a file. Combine the example in “Detect WAP browser and redirect to different url in Perl”, you can route the URL request to another URL if it is not a MMS content.

    The subroutine “doRedirrect” is meant to do that, or you can do a simple print message to state that this requested URL is for MMS.

    The following is the code for this:

    
    sub doMMSC {
       my $class=shift;
    
       my $length = $ENV{'CONTENT_LENGTH'};
    
       if ($ENV{'CONTENT_TYPE'} ne "application/vnd.wap.mms-message") {
          &doRedirrect;
          return;
       }
       
    
       my $count = read(STDIN, $body, $length);
       if ($count == $length) {
          open ER, ">incoming.mms";
          print ER $body;
          close ER;    
       }
    
    }
    

    What is MM per second (MM/sec)?

    What is MM per second (MM/sec)? How do you calculate MM per second?

    MM/sec is a common term that Telco industry used to define the license scheme when they measure the performance of MMSC (Multimedia Messaging Service Centre). So how do the Telco industry comes up with MM/sec? It first starts with SMSC when Telco industry starts to measure SMSC and this is how SMS/sec first used. When the industry inverts MMS and start to measure performance of MMSC, MM/sec is been used.

    However, measuring SMS is easier since 1 SMS is 160 characters and if a SMS message is more than 160 characters, it is treated as multiple SMS. In additional, traditional SMSC is just a simple stored and forward server for SMS.

    Due to the complexity of what MMSC can do and message size per message; it is sometime very difficult to compare Apple to Apple between different MMSC if we are going to compare MM/sec. For example, to send and retrieve a 100KB of MM, it will definitely take longer to send and retrieve a 10KB of MM. Complexity will come into the equation if you start to take re-try push scheme, multiple recipients, delivery and read-reply report into the consideration. With add-on features such as transcoding and copy-forwarding become a standard feature that can be found in MMSC, it is quite hard to measure MM/sec.

    For such, when speaking to different people in the Telco industry, different people has different idea what they think MM/sec is about and for such, it is very important to understand their presumption is.

    Anyway, the following is what I believe a MM/sec should be:

    1. Any incoming MM submission and retrieval that come in and out of the MMSC except notification push request should be treated as one MM.
    2. Multiple push requests should not be treated as multiple MM if the recipient is only downloading one MM.
    3. Request with does not contain the message’s content such as Read-Reply Report should be ignored.

    In short, each full cycle of MM submission and retrieval will consist of at least two MM.