Menu Close

Installing SIREMIS 2.1.0 components

Siremis web interface provides opportunities to extend main functionalities with special components. However, these components requires additional configuration.

Prerequisities

Installed the Kamailio server with Mysql, installed siremis with apache following steps in the guide.

 

Chart service

THe chart service allows SIREMIS to display charts of configured parameters. The Siremis installation package is shipped with a few examples which I should test. Data required to generate charts are taken from Kamailio DB.

The official guide is available at link.

There are two ways how to get data from Kamailio and put they into a DB.

  • Using a cron job with shell scripting together with Kamailio MI commands.
  • Using rtimerm kamailio module. A simple way which we shoud try now.

Modification of Kamailio config file

Open your kamailio.cfg

vim /etc/kamailio/kamailio.cfg

and paste there

# SIREMIS Charts
#!define WITH_SIREMIS_CHARTS

then move to loadmodule section and paste there line which load required modules. They have to be loaded after my_sql module (mainly sqlops.so module)

#!ifdef WITH_SIREMIS_CHARTS
loadmodule "rtimer.so"
loadmodule "sqlops.so"
loadmodule "cfgutils.so"
#!endif

 them move to modparam section of the kamailio.cfg file and paste there following lines

#!ifdef WITH_SIREMIS_CHARTS
modparam("rtimer", "timer", "name=tst;interval=300;mode=1;")
modparam("rtimer", "exec", "timer=tst;route=STATS")
modparam("sqlops","sqlcon","ca=>mysql://openser:openserrw@localhost/kamailio")
#!endif

and into routing part of cfg file paste

#!ifdef WITH_SIREMIS_CHARTS
route[STATS] {
   sql_query("ca",
       "insert into statistics (time_stamp,shm_used_size,shm_real_used_size,"
         "shm_max_used_size,shm_free_used_size,ul_users,ul_contacts) values ($Ts,"
         "$stat(used_size),$stat(real_used_size),$stat(max_used_size),"
         "$stat(free_size),$stat(location-users),$stat(location-contacts))",
       "ra");
}
#!endif

  and finally restart the kamailio service

MI command panel

Siremis, using mi-datagram module allows socket access to the Management interface (MI) and directly through web interface issue MI command commands. To enable this service do following:

Open your kamailio.cfg and go to loadmodule section, then add line:

loadmodule "mi_datagram.so"

to load required module, then add line that configure the module

modparam("mi_datagram", "socket_name", "udp:127.0.0.1:8033")

which define UDP socket used for writing MI commands from siremis web. Parameters includes transport protocol type, udp here, IP address and port number.

Finally check siremis config to reflect correct IP address and port parameters settings

vim siremis/modules/ser/service/siremisMICommands.xml

where the file look like. Edit appropriate fields:

<?xml version="1.0" standalone="no"?>
<PluginService Name="siremisMICommands" Package="asipto" Class="siremisMICommands">
        <MIConfig name="MIConfig" type="udp" mode="rich">
                <Local name="local" address="127.0.0.1" port="8044" timeout="3.0"/>
                <Remote name="remote" address="127.0.0.1" port="8033"/>
                <MICommands>
                        <cmd name="ps" title="List Processes" command="ps"/>
                        <cmd name="uptime" title="Show Uptime" command="uptime"/>
                        <cmd name="getstatsall" title="Get All Statistics" command="get_statistics all"/>
                        <cmd name="which" title="Get All MI Commands" command="which"/>
                </MICommands>
        </MIConfig>

Local socket include parameters of siremis wen interface and remote socket include parameter of remote Kamailio server. For me it looks OK. Lets check, so login to your siremis web management, go to Ser Menu-> Command services -> MI commands, choose one and check result:

 List of MI interface command

uptime

version
pwd
arg
which
kill
ps
debug
get_statistics
reset_statistics
clear_statistics
t_uac_dlg
t_uac_cancel
t_hash
t_reply
t_reply_callid
shv_get
shv_set
ul_rm
ul_rm_contact
ul_dump
ul_flush
ul_add
ul_show_contact
LOAD_CPL
REMOVE_CPL
GET_CPL
sip_trace
rand_set_prob
rand_reset_prob
rand_get_prob
get_config_hash
check_config_hash
set_gflag
reset_gflag
is_gflag
get_gflags
refreshWatchers
cleanup
dum
nh_enable_ping
nh_enable_rtpp
nh_show_rtpp

 More info at: http://www.kamailio.org/wiki/alphaindexes/3.2.x/micommands

 Accounting service

 

 

 

Rate this post

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.