- Products websites
- Other Services
The system is based on two processes:
Bearebox takes data from storefile and transfers them to the defined SMSC.
SMSbox accepts / verify the message queuing requests and deposits them into the storefile.
The Bearerbox consists of two separate processes: one is the active and the other is its watchdog; if the active process drops the watchdog takes its place and starts a new spare.
To launch the processes use the script:
Although the processes are very stable, it's recommended to start pschk.sh via Crontab every minute to ensure script relaunch after an hypothetical processes fall.
The configuration file is located in:
and contains these sections:
The core section defines the main PATH system:
The Bearerbox.log file, according to the defined verbosity, will show debugging information relative to SMSC communications.
The Access.log file will log all the message queuing requests and DLRs.
2011-03-19 14:38:48 Sent SMS [SMSC: smppf] [SVC: userf] [ACT:] [BINF: 18042] [FID: 1533151279] [from: entersrl] [to: 393409007144] [flags: - 1:0: -1: -1:3] [msg: 5: test8] [udh: 0:] 2011-03-19 14:38:48 Sent SMS [SMSC: smppf] [SVC: userf] [ACT:] [BINF: 18042] [FID: 3355996176] [from: entersrl] [to: 393409007144] [flags: - 1:0: -1: -1:3] [msg: 5: test8] [udh: 0:] 2011-03-19 14:38:48 Sent SMS [SMSC: smppf] [SVC: userf] [ACT:] [BINF: 18042] [FID: 3223118989] [from: entersrl] [to: 393409007144] [flags: - 1:0: -1: -1:3] [msg: 5: test8] [udh: 0:]
The “Storefile.log” file contains all the outgoing SMSs and incoming DLRs.
The SMSbox is the SMS-send interface and manages the socket HTTP (the socket HTTP port is defined in sendsms-port file).
To obtain the SMS queuing it's necessary to launch a GET HTTP request on the indicated port, passing the mandatory parameters.
Configured port: 13013
The SMSC group is used to setup bindings to the SMPP providers servers.
The pre-installed configuration is a 2 SMPP server load-balancing conf. type, but it can be defined by the user.
Defines the SMSbox login name, password and ACLs.
It's needed to specify the source IP to be able to append SMSs.
Defines the parameters for sending WAP PUSH messages.
To append a text message it's necessary to use an HTTP GET call.
The parameters are:
The dlr-mask can be extended by adding “type” values.
The dir-url is the URL called when the SMSC return the delivery report, and contain all related informations.
Particular attention should be paid to the last parameter of the URL: idgen.
idgen is the ID necessary to match the DLRs, and must be passed in URLENCODE format (http://www.w3schools.com/TAGS/ref_urlencode.asp).
The pre-installed configuration calls http://127.0.0.1/dlr.php, passing all the available parameters.
dlr.php save data in “append” mode into the file /var/www/html/dlr.txt (.CSV type, “;” separator).
dir.php data are subdivided into columns:
8;smppf;ACK/;userf;3662288417;393409007144;entersrl;2 8;smppf;ACK/;userf;119834508;393409007144;entersrl;3 8;smppf;ACK/;userf;230003381;393409007144;entersrl;4 1;smppf;id:24b9502b sub:001 dlvrd:001 submit date:1300548579 done date:1300548579 stat:DELIVRD err:000 text: ;userf;616124459;393409007144;entersrl;2 1;smppf;id:5dbc5794 sub:001 dlvrd:001 submit date:1300548579 done date:1300548579 stat:DELIVRD err:000 text: ;userf;1572624276;393409007144;entersrl;4 1;smppf;id:a620001b sub:001 dlvrd:001 submit date:1300548579 done date:1300548579 stat:DELIVRD err:000 text: ;userf;2787115035;393409007144;entersrl;3
The dlr.php file is located into /var/www/html/dlr.php.
The service-type, or billing-info; it's the parameter that mBlox or the SMS vendors apply to your profile.
The SMS destination MSISDN; it should be specified with country code without the “leading +” (e.g. 393409007144).
The SMS numeric or alphanumeric sender (11 chars); if not specified it will be used the default value specified in the “default-sender = entersrl” configuration.
WARNING: when using numeric sender always place before the “+” char, as a ministerial decision made it mandatory; omitting “+” char can result into not-delivered messages, due to carrier filters.
The text of the SMS in charset UTF-8 format (e.g. for Arabic etc. use the additional parameter & coding = 2).
Into the /home/cantaluppi/ folder there are some examples to try execute calls:
The speed reached today during tests is 326SMS/sec. on a single channel.
The URL http://127.0.0.1:13000/status provide system status:
Kannel bearerbox version `1.4.3 '. Build `Mar 19 2011 10:52:21 ',` compiler 4.1.2 20080704 (Red Hat 4.1.2-48)'. System Linux 2.6.18-194.32.1.el5 release, version # 1 SMP Wed Jan 5 17:52:25 EST 2011 x86_64 machine. Localhost.localdomain hostname, IP address 127.0.0.1. Libxml version 2.6.26. Using native malloc. Status: running, uptime 0d 2h 45m 10s WDP: received 0 (0 queued), sent 0 (0 queued) SMS: received 1541 (0 queued), sent 1034 (0 queued), store size 0 SMS: inbound (0.64,0.38,0.16) msg/sec, outbound (0.42,0.26,0.10) msg/sec DLR: 527 queued, using internal storage Box connections: smsbox:smsbox1, IP 127.0.0.1 (0 queued), (on-line 0d 2h 45m 0s) SMSC connections: smppf SMPP:lab2.kdev.it:2346/2346:entersrl11:KDEvsmP1 (online 9898s, rcvd 1541, sent 1034, failed 0, queued 0 msgs)
The commands available on this interface are:
In case of Stop and clear the queue .
After launching kill command on Bearerbox to pause a queue (e.g. in the case of incorrect launch of the queue), is necessary to remove both the storefile.log and storefile.log.bak files, otherwise the queue will not be flushed.
The Kill command will also cause that everything that populates the pipeline will be stored into the file storefile.log.bak: restarting demons will result in re-enqueueing data into storefile.log file.
To permanently destroy the queue is necessary to delete both the storefile.log and storefile.log.bak files.
Currently is not possible to perform a selective modification on the queue: the queue can only be entirely deleted but not altered (e.g. by removing messages linked to a particular sender).