Running Mbuni as a MMSC

15 Jul

Mbuni is an open source mms gateway.You can download Mbuni source code from Mbuni site.
Try to compile source and install.Go through mbuni documentation for installation instructions.
It is a must to install all the dependencies stated in documentation page.

mbuni installation will install several components.






we can run Mbuni as MMSC or as VAS gateway.

Lets see how
mbuni configured as a MMSC.

First we need to meet these requirements

Mbuni installation machine
1)should be globally accessible.So we need to assign a global ip and open a port.

2)It should be able to access internet

3)Running web server (optional)

4)SMPP connection or a GSM modem with SIM.

Mbuni source comes with .conf have to manually configure them.
Copy .conf files (you might find them in mbuni-1.4.0\mbuni-1.4.0\doc\examples) in to folder.

Ex /etc/mmsc.conf,/etc/mmsbox.conf

Lets take a look few important configuration parameters.
refer  mmsc .conf file using vi editor

vi /etc/mmsc.conf ip or hostname configured in hosts file
host-alias = This is used to shorten the message retrieval url
lets put some thing like
This should be configured in hosts file.located at /etc/hosts
In /etc/hosts configuration there should be a configuration like
x.x.x.x mmsc

x.x.x.x is (global) ip of your machine
when mbuni send out notification, in mbuni logs we can see that it is sending this url
LOG :::Preparing to notify client to fetch message at URL: http://mmsc/4-qf3440.1.x96.38@2/wx63
local-prefixes =according to mbuni documentation ,number prefixes that should be considered local.

Normally mobile number consists of  country code ,operator code ,followed by identification number.

Ex : +94 77 XXXXXXX

+94 = country code

77 = operator code

Send a mms to this number you need to put +9477 as local prefix.

storage-directory =This is where mbuni creates message queue.

since retrieval url is something like http://x.x.x.x/mms/mm1.we need to create a directory called ‘mms’inside a web server root directory
Ex :/usr/local/apache/htdocs/mms

sendsms-url = According to documentation
URL of the service through which SMS can be sent to a mobile subscriber .
This is some what similar to Kannel send-sms-url

Ex 1)http://x.x.x.x:port/cgi-bin/sendsms

x.x.x.x = Ip of kannel installed machine
port= sendsms-port in Kannel configuration
/cgi-bin/sendsms = sendsms-url in Kannel configuration

If using GSM modem with SIM,it should be configured in kannel configuration file under group smsc

group =smsc
smsc = TEST
modemtype =
device = /dev/ttyS0
speed = 9600


group = smsbox
bearerbox-host = localhost
sendsms-port = 12345
sendsms-url = /cgi-bin/sendsms
global-sender = 900


group = sendsms-user
username = foor
password = bar

Then mbuni sendsms-url must be like in example 2.Where we have to provide extra parameter smsc=TEST
TEST is the allowed-smsc-id .
If Kannel binds to an smpp account then the sendsms-url must be like in example 1.
sendsms-username ,sendsms-password
This is for authentication of sendsms url.
Insert same username ,pasword pair in Kannel ,”smskannel.conf “group = sendsms-user
sendsms-global-sender This maps with the kannel global-sender
Mms port
mms-port = 1981
This is the port mbuni listens for sending/receiving mms

List of IP addresses of hosts allowed to use/access the MM1Port

optimize-notification-size set true

go to mms/ folder. set read write file permission
chmod – R 777 mm1
Set read wite file permission of mms/mm1 directory,sub directories owns to daemon

Once set these parameters.Save the. conf file and exit from vi editor (press <Esc>:wq).

Now we have to start mmsproxy and mmsrelay components.

Try these commands

mmsproxy /etc/mmsc.conf  &

mmsrelay /etc/mmsc.conf  &

See logs and check for errors.

We can use sendmms component to test whether mms is delivered to mobile
Try this command

mmssend -f XXXX -t YYYY -m sample.mms -b /etc/mmsc.conf

-f = From number
-t = To number
-m = give binary mms file name with path
-b = configuration file name
After executing the command check mbuni logs.
make sure your SIM is activated for sending and receiving MMS.
You should get a notification mms. If you have correctly configured mbuni with Kannel & GSM Modem
When you received the notification sms try to download the MMS .For this we should connect to Mbuni installation machine via GPRS .If you are unable to download the message this is because mobile doesn’t know how to grab the message from
mbuni.So we need to modify MMS settings in our mobile

Here is sample MMS profile configuration for Samsung SGH-J200 model
Go to
Messages ->Message Settings->Multimedia Message->Multimedia Message Profile
Option ->new
Change these parameters
Set Name = mbuni (as you wish )
Access name = put your operator APN name here
Home url =http://x.x.x.x:mms_port/mms
According to above configurations x.x.x.x is the global ip of mbuni installed machine,
“mms_port” is mms port we configured in mmsc.conf
“mms” is the storage directory inside web server root directory

proxy address =If you connect to mbuni machine via proxy put that ip here.Otherwise mbuni machine ip
Port = proxy port if any otherwise mms_port

Try to download the mms now.This should download the mms into your mobile.
Check for mbuni logs.It will show any attempt that is made by the phone to fetch the message.

2009-07-17 08:30:32 [23422] [2] DEBUG: HTTP: Creating HTTPClient for `'.
2009-07-17 08:30:32 [23422] [2] DEBUG: HTTP: Created HTTPClient area 0xa00e328.
2009-07-17 08:30:33 [23422] [0] DEBUG: Request, ip=, base_client_addr=2001514, client_addr=2001514/TYPE=PLMN, url=http://mmsc/4-qf3440.1.x96.38@2/wx63
2009-07-17 08:30:33 [23422] [0] DEBUG: Started thread 5 (mmsproxy.c:(gwthread_func_t *)fetchmms_proxy)
2009-07-17 08:30:33 [23422] [5] DEBUG: Thread 5 (mmsproxy.c:(gwthread_func_t *)fetchmms_proxy) maps to pid 23422.
2009-07-17 08:30:33 [23422] [5] DEBUG: ---> Entered fetch interface: url=http://mmsc/4-qf3440.1.x96.38@2/wx63<---

In logs if you can’t see any attempt made by phone to download the message,Check for these
1:Make sure machine has a global ip and the mms port is not blocked.
2: Make sure the GPRS APN configured in your mms profile permits HTTP requests to other addresses
These are few reasons that I have come across where above configuration is not working .If still its not working update me:).

About these ads

Posted by on July 15, 2009 in mmsc


Tags: , , , , , ,

47 responses to “Running Mbuni as a MMSC

  1. Belma

    June 19, 2012 at 11:58 am

    Well I have done all that things but when i want to run mmsc.mmsfromemail like in Mbuni documentation don’t recognise command :-(. Also mmsrelay, mmsproxy don’t have when i install mbuni. I have install kannel using yum install kannel (also i tried with download gateway form site) , lib like libxml, libxml-devel, libxml2, libxml2-devel, mbuni lastest version …. what version of linux do you use?

  2. Belma

    June 19, 2012 at 3:28 pm

    OS: fedora 15
    Installed lib: libxml, libxml-devel, libxml2, libxml2-devel
    installed kannel with command yum install kannel (last version), sox, lame, mpg, postfix, squid…
    installed mbuni (last version)
    Download the AMR code patch (like in documentation on mbuni site)

    but when i try to run the command mmsc. mmsfromemail i get message that command not found also in installed files I dont have mmsrelay, mmsproxy. What version of OS do you use?

    I want to try send mms from pc to mobile.

    Thank you :-)

  3. Javed Iqbal

    May 21, 2013 at 1:47 pm

    Hi guys,

    I am using ubuntu 12.04 OS. First I have install kannel from ubuntu terminal.I have just installed all required dependencies of mbuni and mbuni itself. Now when I run mbuni from terminal it gives following errors still, even I have copied the mmsc.conf and mmsbox.conf into /etc folder. Where I am doing wrong?

    Error is:

    2013-05-21 12:59:52 [7623] [0] INFO: Debug_lvl = -1, log_file = , log_lvl = 0
    2013-05-21 12:59:52 [7623] [0] INFO: mmsc.c:52 [mmsc] [n/a] —————————————-
    2013-05-21 12:59:52 [7623] [0] INFO: mmsc.c:53 [mmsc] [n/a] Mbuni MMSC version 1.5.0 starting
    2013-05-21 12:59:52 [7623] [0] ERROR: fopen failed: couldn’t open `mbuni.conf’
    2013-05-21 12:59:52 [7623] [0] ERROR: System error 2: No such file or directory
    2013-05-21 12:59:52 [7623] [0] ERROR: mms_cfg.c:151 [mms_cfg] [n/a] failed to read config from `mbuni.conf’
    2013-05-21 12:59:52 [7623] [0] ERROR: System error 2: No such file or directory
    2013-05-21 12:59:52 [7623] [0] PANIC: Couldn’t read configuration from ‘mbuni.conf’.
    2013-05-21 12:59:52 [7623] [0] PANIC: mmsc(gw_panic+0xd2) [0x809cce2]
    2013-05-21 12:59:52 [7623] [0] PANIC: mmsc(mms_load_mmsc_settings+0x1996) [0x8063d36]
    2013-05-21 12:59:52 [7623] [0] PANIC: mmsc(main+0x12f) [0x8053cef]
    2013-05-21 12:59:52 [7623] [0] PANIC: /lib/i386-linux-gnu/ [0xb72984d3]
    2013-05-21 12:59:52 [7623] [0] PANIC: mmsc() [0x805402d]

  4. thilani

    May 21, 2013 at 2:16 pm

    how did u start mbuni.Usually you have to specify configuration filename with it’s location. Otherwise it is using default file “mbuni.conf”

    Eg : mmsproxy /etc/mmsc.conf &

    mmsrelay /etc/mmsc.conf &

  5. Javed Iqbal

    May 21, 2013 at 2:53 pm

    Thanks thilani for your reply… I just use following command to start mbuni in terminal:
    javed@javed-HP-Compaq:~$ mmsc

  6. Javed Iqbal

    May 21, 2013 at 6:50 pm

    My Mbuni service starts successfully now but when I enter following command
    mmsproxy /etc/mmsc.conf &
    it gives error that mmsproxy: command not found
    I expects during installation of mbuni it will install also. Should I install mmsproxy and mmsrelay individually?

  7. Rusiru Malik

    February 6, 2014 at 9:43 pm

    what kind of billing method it support ?
    is it support CAMEL or need to use soap base charging ?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

%d bloggers like this: