Tag Archives: vas gateway

Mbuni MMSBOX – Mms VAS Gateway

I tried to install cvs version of Mbuni which can be downloaded from Sourceforge.

As I found the mbuni project can be downloaded from the following link.

Released version can be found in

I used the source code compilation method.

First I needed to install several dependencies of Mbuni

Installed Kannel patched version found in mbuni site.

Installed AMR Encoder Decoder and given patch

Above steps are mandatory, otherwise there ll be compilation errors in mbuni.

For  basic installation I followed following steps

Inside mbuni source folder

chmod +x  configure

./configure --with-kannel-dir=DIR

DIR is where my kannel  installation is. I installed Kannel in /usr/local/kannel.

So DIR = /usr/local/kannel

Compile mbuni source

make install

by default  `make install’ will install all the files in

/usr/local/bin and /usr/local/lib.

For alter the default installation directory try

./configure ––help

Try out the options available

For  configure the mbuni vas gateway I used the  sample configuration file provided with mbuni.

Configuration files can be found in  doc/examples folder.

I used mmsbox.conf file for configuring the vas gateway.

I copied the mmsbox.conf file into  /etc/

cp mmsbox.conf /etc

Im mmsbox need to add following configurations

  1. Communicate with operator mmsc(s)
  2. Communicate with VAS application.

Communicate with operator mmsc.
Modify the group mmsc

group = mmsc
id = local
mmsc-url = http://mbuni:test@localhost:1982/soap
incoming-username = user
incoming-password = pass
incoming-port = 12345
type = soap

id – is a mandatory field
mmsc-url – url address of the mmsc.
Normally mmsc needs to configure vas application with short code,vas_usrename ,vas_password,vasp-url ..etc
So VAS application can send messages to mmsc using
Here I have used Mbuni mmsc as my mmsc. I configured VASP account in mmsc.conf.

group = mms-vasp
vasp-id = newscorp
type = soap
short-codes = 111,1234
vasp-username = mbuni
vasp-password = test
vasp-url = http://user:pass@localhost:12345/

Here vasp-url is the url of vas gw
Any incoming message to shortcode 111 or 1234 will post to vasp-url
user:pass is the incoming-username and incoming-password of vas gw.
localhost – Vas gw host
12345 is the port which vas gw listens for messages from mmsc

In mmsc-url
mbuni:test is vasp-username and vasp-password
localhost – mmsc host
1982 –mmsc mm7 listen port
When a VAS application sends a message to VAS GW ,VAS GW will post messages to mmsc- url .

Communicate with VAS application

Group mms-service can be used to send message to VAS application

group = mms-service
name = me
post-url = http://localhost/test-mbuni.php
catch-all = false
http-post-parameters = fx=true&images[]=%i&text[]=%t&skip=1
accept-x-mbuni-headers = true
pass-thro-headers = X-NOKIA-MMSC-Charging,X-NOKIA-MMSC-Charged-Party
keyword = test
omit-empty = no
suppress-reply = true
service-code = regular

According to my mms-service configuration
messages which has the word test will post to http://localhost/test-mbuni.php
Vas gw only passes images and text content to service.

Catch message sent to post-url

I have configured a vasp account in my mbuni mmsc.which has the shortcode of
111,1234. So when I send a mms to shortcode 111 or 1234,mmsc should send the message to VAS GW and
VAS GW should route to the message into correct mms-service (mm7 application).
According to my mms-service configuration,incoming message which has text ‘test’ will route to test-mbuni.php

test-mbuni.php will get a message which has following format.(multipart/form-data)

POST /test-mbuni.php HTTP/1.1
Host: localhost
Connection: keep-alive
User-Agent: Mbuni/cvs-20091014
X-Mbuni-Message-ID: qf1032.5.x293.98
X-Mbuni-MMSC-ID: newscorp
X-Mbuni-LinkedID: o-8n-qf1029.5.x876.70@mmsc
X-Mbuni-TransactionID: Mbuni-qf1032.5.x293.98
X-Mbuni-To: 111
X-Mbuni-Message-Date: Wed, 17 Feb 2010 10:03:49 GMT
X-Mbuni-Received-Date: Wed, 17 Feb 2010 10:03:52 GMT
Content-Type: multipart/form-data; boundary=_boundary_800406929_1266401032_C_s_bd914252053
MIME-Version: 1.0
Content-Length: 435
Content-Disposition: form-data; name="fx"
Content-Disposition: form-data; name="text[]"; filename="This_is.txt"
Content-Type: text/plain; charset=utf-8
This is 4 test
Content-Disposition: form-data; name="skip"

Capture mms content

This is a sample php script which extracts mms content and save them as separate files.

$uploaddir = '/var/www/html/';
foreach ($_FILES as $i => $file) {
$part = $_FILES[$i];
$uploadfile = $uploaddir . basename $part['name'][0]);
if(move_uploaded_file($part['tmp_name'][0],$part['name'][0])) {
echo "File is valid, and was successfully uploaded.\n";
else {
echo "File upload error!\n";


Posted by on February 18, 2010 in mmsc


Tags: , , , , , ,

Mms Vas Gateway

According to my interpretation VAS gateway operates between MMSC(s) and VAS Application(s).
It switches messages between mmsc and vas application

mmsc and vas gateway

Protocol between MMSC and MMS VAS GW is MM7.

Leave a comment

Posted by on February 17, 2010 in mmsc


Tags: , ,