{"id":491,"date":"2011-12-01T12:55:32","date_gmt":"2011-12-01T11:55:32","guid":{"rendered":""},"modified":"2018-11-01T00:54:48","modified_gmt":"2018-10-31T23:54:48","slug":"installing-siremis-210-components","status":"publish","type":"post","link":"https:\/\/nil.uniza.sk\/en\/installing-siremis-210-components\/","title":{"rendered":"Installing SIREMIS 2.1.0 components"},"content":{"rendered":"<p>Siremis web interface provides opportunities to extend main functionalities with special components. However, these components requires additional configuration.<\/p>\n<h1>Prerequisities<\/h1>\n<p>Installed the Kamailio server with Mysql, installed siremis with apache following steps in <a href=\"https:\/\/nil.uniza.sk\/en\/sip\/kamailio\/installing-siremis-20-kamailio-web-management-interface-debian-lenny-how\/\">the guide<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<h1>Chart service<\/h1>\n<p>THe chart service allows SIREMIS&nbsp;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.<\/p>\n<p>The official guide is available at <a href=\"http:\/\/kb.asipto.com\/siremis:install20:charts\">link<\/a>.<\/p>\n<p>There are two ways how to get data from Kamailio and put they into a DB.<\/p>\n<ul>\n<li>Using a cron job with shell scripting together with Kamailio MI commands.<\/li>\n<li>Using rtimerm kamailio module. A simple way which we shoud try now.<\/li>\n<\/ul>\n<h2>Modification of Kamailio config file<\/h2>\n<p>Open your kamailio.cfg<\/p>\n<pre>\r\nvim \/etc\/kamailio\/kamailio.cfg<\/pre>\n<p>and paste there<\/p>\n<pre>\r\n# SIREMIS Charts\r\n#!define WITH_SIREMIS_CHARTS<\/pre>\n<p>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)<\/p>\n<pre>\r\n#!ifdef WITH_SIREMIS_CHARTS\r\nloadmodule &quot;rtimer.so&quot;\r\nloadmodule &quot;sqlops.so&quot;\r\nloadmodule &quot;cfgutils.so&quot;\r\n#!endif<\/pre>\n<p>&nbsp;them move to modparam section of the kamailio.cfg file and paste there following lines<\/p>\n<pre>\r\n#!ifdef WITH_SIREMIS_CHARTS\r\nmodparam(&quot;rtimer&quot;, &quot;timer&quot;, &quot;name=tst;interval=300;mode=1;&quot;)\r\nmodparam(&quot;rtimer&quot;, &quot;exec&quot;, &quot;timer=tst;route=STATS&quot;)\r\nmodparam(&quot;sqlops&quot;,&quot;sqlcon&quot;,&quot;ca=&gt;mysql:\/\/openser:openserrw@localhost\/kamailio&quot;)\r\n#!endif<\/pre>\n<p>and into routing part of cfg file paste<\/p>\n<pre>\r\n#!ifdef WITH_SIREMIS_CHARTS\r\nroute[STATS] {\r\n   sql_query(&quot;ca&quot;,\r\n       &quot;insert into statistics (time_stamp,shm_used_size,shm_real_used_size,&quot;\r\n         &quot;shm_max_used_size,shm_free_used_size,ul_users,ul_contacts) values ($Ts,&quot;\r\n         &quot;$stat(used_size),$stat(real_used_size),$stat(max_used_size),&quot;\r\n         &quot;$stat(free_size),$stat(location-users),$stat(location-contacts))&quot;,\r\n       &quot;ra&quot;);\r\n}\r\n#!endif<\/pre>\n<p>&nbsp;&nbsp;and finally restart the kamailio service<\/p>\n<h1>MI command panel<\/h1>\n<p>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:<\/p>\n<p>Open your kamailio.cfg and go to loadmodule section, then add line:<\/p>\n<pre>\r\nloadmodule &quot;mi_datagram.so&quot;<\/pre>\n<p>to load required module, then add line that configure the module<\/p>\n<pre>\r\nmodparam(&quot;mi_datagram&quot;, &quot;socket_name&quot;, &quot;udp:127.0.0.1:8033&quot;)<\/pre>\n<p>which define UDP socket used for writing MI commands from siremis web. Parameters includes transport protocol type, udp here, IP address and port number.<\/p>\n<p>Finally check siremis config to reflect correct IP address and port parameters settings<\/p>\n<pre>\r\nvim siremis\/modules\/ser\/service\/siremisMICommands.xml<\/pre>\n<p>where the file look like. Edit appropriate fields:<\/p>\n<pre>\r\n&lt;?xml version=&quot;1.0&quot; standalone=&quot;no&quot;?&gt;\r\n&lt;PluginService Name=&quot;siremisMICommands&quot; Package=&quot;asipto&quot; Class=&quot;siremisMICommands&quot;&gt;\r\n        &lt;MIConfig name=&quot;MIConfig&quot; type=&quot;udp&quot; mode=&quot;rich&quot;&gt;\r\n                &lt;Local name=&quot;local&quot; address=&quot;127.0.0.1&quot; port=&quot;8044&quot; timeout=&quot;3.0&quot;\/&gt;\r\n                &lt;Remote name=&quot;remote&quot;<span style=\"background-color: rgb(255, 255, 153); \"> address=&quot;127.0.0.1&quot; port=&quot;8033&quot;\/<\/span>&gt;\r\n                &lt;MICommands&gt;\r\n                        &lt;cmd name=&quot;ps&quot; title=&quot;List Processes&quot; command=&quot;ps&quot;\/&gt;\r\n                        &lt;cmd name=&quot;uptime&quot; title=&quot;Show Uptime&quot; command=&quot;uptime&quot;\/&gt;\r\n                        &lt;cmd name=&quot;getstatsall&quot; title=&quot;Get All Statistics&quot; command=&quot;get_statistics all&quot;\/&gt;\r\n                        &lt;cmd name=&quot;which&quot; title=&quot;Get All MI Commands&quot; command=&quot;which&quot;\/&gt;\r\n                &lt;\/MICommands&gt;\r\n        &lt;\/MIConfig&gt;<\/pre>\n<p>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-&gt; Command services -&gt; MI commands, choose one and check result:<\/p>\n<p><img decoding=\"async\" width=\"0\" height=\"0\" alt=\"\" src=\"\/wp-content\/uploads\/files\/image\/Siremis\/siremis-mi-datagram.png\" \/><\/p>\n<p><img decoding=\"async\" width=\"720\" height=\"363\" border=\"1\" alt=\"\" src=\"\/wp-content\/uploads\/files\/image\/Siremis\/siremis-mi-datagram.png\" \/><\/p>\n<h2>&nbsp;List of MI interface command<\/h2>\n<p>uptime<\/p>\n<p><span><span><span>version<br \/>\n<\/span><span>pwd<br \/>\n<\/span><span>arg<br \/>\n<\/span><span>which<br \/>\n<\/span><span>kill<br \/>\n<\/span><span>ps<br \/>\n<\/span><span>debug<br \/>\n<\/span><span>get_statistics<br \/>\n<\/span><span>reset_statistics<br \/>\n<\/span><span>clear_statistics<br \/>\n<\/span><span>t_uac_dlg<br \/>\n<\/span><span>t_uac_cancel<br \/>\n<\/span><span>t_hash<br \/>\n<\/span><span>t_reply<br \/>\n<\/span><span>t_reply_callid<br \/>\n<\/span><span>shv_get<br \/>\n<\/span><span>shv_set<br \/>\n<\/span><span>ul_rm<br \/>\n<\/span><span>ul_rm_contact<br \/>\n<\/span><span>ul_dump<br \/>\n<\/span><span>ul_flush<br \/>\n<\/span><span>ul_add<br \/>\n<\/span><span>ul_show_contact<br \/>\n<\/span><span>LOAD_CPL<br \/>\n<\/span><span>REMOVE_CPL<br \/>\n<\/span><span>GET_CPL<br \/>\n<\/span><span>sip_trace<br \/>\n<\/span><span>rand_set_prob<br \/>\n<\/span><span>rand_reset_prob<br \/>\n<\/span><span>rand_get_prob<br \/>\n<\/span><span>get_config_hash<br \/>\n<\/span><span>check_config_hash<br \/>\n<\/span><span>set_gflag<br \/>\n<\/span><span>reset_gflag<br \/>\n<\/span><span>is_gflag<br \/>\n<\/span><span>get_gflags<br \/>\n<\/span><span>refreshWatchers<br \/>\n<\/span><span>cleanup<br \/>\n<\/span><span>dum<br \/>\n<\/span><span>nh_enable_ping<br \/>\n<\/span><span>nh_enable_rtpp<br \/>\n<\/span><span>nh_show_rtpp<br \/>\n<\/span><span><br \/>\n<\/span><\/span><\/span><\/p>\n<p>&nbsp;More info at: <a href=\"http:\/\/www.kamailio.org\/wiki\/alphaindexes\/3.2.x\/micommands\">http:\/\/www.kamailio.org\/wiki\/alphaindexes\/3.2.x\/micommands<\/a><\/p>\n<h1>&nbsp;Accounting service<\/h1>\n<p>&nbsp;<\/p>\n<h1>&nbsp;<\/h1>\n<p>&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>Siremis web interface provides opportunities to extend main functionalities with special components. However, these components requires additional configuration.<\/p>\n<h1>Prerequisities<\/h1>\n<p>Installed the Kamailio server with Mysql, installed siremis with apache following steps in <a href=\"https:\/\/nil-test.kis.fri.uniza.sk\/sip\/kamailio\/installing-siremis-20-kamailio-web-management-interface-debian-lenny-how\">the guide<\/a>.<\/p>\n<p>&nbsp;<\/p>","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[781,771],"tags":[],"class_list":["post-491","post","type-post","status-publish","format-standard","hentry","category-kamailio-en","category-sip-en"],"taxonomy_info":{"category":[{"value":781,"label":"Kamailio"},{"value":771,"label":"SIP"}]},"featured_image_src_large":false,"author_info":{"display_name":"admin","author_link":"https:\/\/nil.uniza.sk\/en\/author\/admin\/"},"comment_info":4,"category_info":[{"term_id":781,"name":"Kamailio","slug":"kamailio-en","term_group":0,"term_taxonomy_id":779,"taxonomy":"category","description":"","parent":771,"count":29,"filter":"raw","cat_ID":781,"category_count":29,"category_description":"","cat_name":"Kamailio","category_nicename":"kamailio-en","category_parent":771},{"term_id":771,"name":"SIP","slug":"sip-en","term_group":0,"term_taxonomy_id":769,"taxonomy":"category","description":"","parent":0,"count":23,"filter":"raw","cat_ID":771,"category_count":23,"category_description":"","cat_name":"SIP","category_nicename":"sip-en","category_parent":0}],"tag_info":false,"_links":{"self":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/491","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/comments?post=491"}],"version-history":[{"count":0,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/491\/revisions"}],"wp:attachment":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/media?parent=491"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/categories?post=491"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/tags?post=491"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}