Asterisk-Kannel Integration Project Version 0.0.1 Release Notes
Hello,
We are proud to announce the first release 0.0.1 version of kannel-asterisk integration project. The goal of this project is to allow asterisk users to use kannel capabilities like SMS sending and receiving. Please visit https://asterisk-kannel.sourceforge.io/ for more information. You can download the release files at:
https://sourceforge.net/projects/asterisk-kannel/files/
This version 0.0.1 includes an asterisk app module called app_mt.c which can be used from the dial plan to send SMS MT (mobile terminated).
—technical details:
app_mt.c is an asterisk module (a dialplan app called mt) that uses kannel C API to connect to kannel bearerbox as an smsbox and send sms mt messages. It also integrates a thread for receiving ack’s and delivery reports (dlr)
from bearerbox.
—requirements:
-Asterisk source.
-Kannel compiled libs and header files (compilation of kannel is not covered here).
—config:
-actually the config is done in the source code itself. Adjust the following parameters to fit your setup before compiling and linking the app:
static char* dflt_bb_host = “#############”;//default kannel bearerbox IP
address static long dflt_bb_port = 13001;//kannel bearerbox smsbox-port port static int dflt_bb_ssl = 0;//default kannel bearerbox smsbox-port ssl let it 0 if you don’t want to use ssl static char* dflt_smsbox_id = “astb”;//default smsbox id static char* dflt_service = “csvc”;//default service name static char* dflt_account = “supacc”;//default account name static char* dflt_from = “18555”;//default sender number static char* dflt_to = “111111111”;//default receiver number static char* dflt_smsc_id = “fake-smsc-1”;//default smsc-id used to route the sms static char* dflt_dlr_url = “http://127.0.0.1:40001”;//default dlr url static int dflt_dlr_mask = 31;//default dlr mask static char* dflt_sms = “Dialplan extension 400 get executed!”;//default sms text
—compiling:
compilation is similar to any other asterisk module. Just copy the source file to asterisk apps folder, modify your toolchain by adding kannel header files and libs locations. Compile asterisk as usual. you will get app_mt.so generated.
—using:
-# cp app_mt.so /usr/lib/asterisk/modules
-# asterisk -x “module load app_mt.so”
-modify your dialplan to add a test extension for app_mt:
exten => 400,1,mt()
same => n,Hangup()
-call extension 400 from your device, an sms mt will be sent to the receiver number configured above.
—roadmap:
-read default config parameters from file.
-pass sms parameters from the dialplan.
-send sms from cli/manager/rest/…etc.
-…etc. Any suggestion is welcome.
Any feedback is welcome.
Best regards.