在Ubuntu 20.04/18.04/16.04上安装Kamailio的Siremis Web管理
在本教程中,我们将学习在Ubuntu 20.04/18.04 LTS Linux服务器上安装Siremis。
Siremis是Kamailio SIP服务器的Web管理界面。
它允许我们提供用户配置文件,路由规则,查看会计,注册电话,显示图表,并通过XMLRPC与SIP服务器通信。
如果我们在本教程中,我相信我们已在Ubuntu Linux服务器上安装了Kamailio SIP服务器。
一旦我们有一个工作的Kamailio SIP服务器,就会安装Siremis以简化其管理。
以下是Kamailio的完整功能,如官方上所列:
突出的主要特征
它为Kamailio SIP Serversubscriber,数据库别名和速度拨号管理位置表查看Dispatcher(Load Balancer),前缀域转换和最小费用路由(LCR)ManagementAccess Control列表(用户组)和许可管理成本记录和未接来电的系统和数据库管理工具ViesManage呼叫数据记录(从ACC记录生成)哈希表,拨号计划表和用户首选项表Management Offline消息存储,Presence Service和SIP跟踪通过XMLRPCCommunication与Kamailio SIP服务器通过JSONRPCCommunication通过JSONRPCCommunication,通过Event SocketCreate和显示图表来自Kamailiouser位置统计数据存储的统计数据ChartsSIP流量负载ChartsMemory使用图表基于记录图表和摘要TablyQL的CDR生成和评级计费引擎
在Ubuntu 20.04/18.04/16.04上安装siremis
siremis要求在主机系统上安装Apache Web服务器和PHP。
我们还需要CURL模块是使用JSONRPC命令面板。
下载并安装这些依赖项。
sudo apt-get update sudo apt-get install apache2 sudo a2enmod rewrite sudo systemctl restart apache2
安装PHP.
sudo apt-get install php libapache2-mod-php php-{mysql,gd,curl,xml,pear}
安装 XML_RPC
包XMLRPC命令面板
$sudo pear install XML_RPC2 WARNING: channel "pear.php.net" has updated its protocols, use "pear channel-update pear.php.net" to update downloading XML_RPC2-1.1.4.tgz ... Starting to download XML_RPC2-1.1.4.tgz (68,296 bytes) .................done: 68,296 bytes downloading HTTP_Request2-2.3.0.tgz ... Starting to download HTTP_Request2-2.3.0.tgz (119,717 bytes) ...done: 119,717 bytes downloading Cache_Lite-1.8.2.tgz ... Starting to download Cache_Lite-1.8.2.tgz (33,873 bytes) ...done: 33,873 bytes downloading Net_URL2-2.2.1.tgz ... Starting to download Net_URL2-2.2.1.tgz (20,010 bytes) ...done: 20,010 bytes install ok: channel://pear.php.net/Cache_Lite-1.8.2 install ok: channel://pear.php.net/Net_URL2-2.2.1 install ok: channel://pear.php.net/HTTP_Request2-2.3.0 install ok: channel://pear.php.net/XML_RPC2-1.1.4
在Ubuntu 20.04/18.04/16.04上下载和安装siremis
当我们完成依赖项的安装时,下载siremis tar包或者克隆代码从github。
此安装将从GitHub存储库源代码完成。
这将为我们提供最新的发布。
sudo apt-get -y install make
克隆存储库
$cd /var/www $sudo git clone https://github.com/asipto/siremis Cloning into 'siremis'... remote: Counting objects: 8594, done. remote: Compressing objects: 100% (5/5), done. remote: Total 8594 (delta 0), reused 1 (delta 0), pack-reused 8589 Receiving objects: 100% (8594/8594), 12.63 MiB | 19.41 MiB/s, done. Resolving deltas: 100% (4900/4900), done.
生成Apache VirtualHost配置
$cd siremis $sudo make apache24-conf | sudo tee /etc/apache2/sites-enabled/siremis.conf
确认写入的输出 /etc/apache2/sites-enabled/siremis.conf
$cat /etc/apache2/sites-enabled/siremis.conf # siremis apache 2.4 conf snippet ... Alias /siremis "/var/www/siremis/siremis" <Directory "/var/www/siremis/siremis"> Options Indexes FollowSymLinks MultiViews AllowOverride All Require all granted <FilesMatch "\.xml$"> Require all denied </FilesMatch> <FilesMatch "\.inc$"> Require all denied </FilesMatch> </Directory>
有关域使用,请修改要添加域部分的配置:
# siremis apache 2.4 conf snippet ... <VirtualHost *:80> ServerName siremis.theitroad.com ServerAdmin Hyman@theitroad DocumentRoot /var/www/siremis Alias /siremis "/var/www/siremis/siremis" <Directory "/var/www/siremis/siremis"> Options Indexes FollowSymLinks MultiViews AllowOverride All Require all granted <FilesMatch "\.xml$"> Require all denied </FilesMatch> <FilesMatch "\.inc$"> Require all denied </FilesMatch> </Directory> </VirtualHost>
创建 .htaccess
和突出的配置文件通过运行:
$sudo make prepare24 updating htaccess file for apache 2.4 ... deploying htaccess files for apache 2.4 in subdirs ... updating app.inc file... creating folders... done
确保以下目录具有Web服务器用户的写访问权限:
siremis/log siremis/session siremis/files siremis/themes/default/template/cpl
这是通过执行来完成的 make chown
命令
$sudo make chown changing onwner to www-data:www-data ... chown -R www-data:www-data .
配置数据库
如果我们在kamailio安装期间不执行此操作,请创建Kamailio数据库
$sudo kamdbctl create MySQL password for root: INFO: test server charset INFO: creating database kamailio ... INFO: granting privileges to database kamailio ... INFO: creating standard tables into kamailio ... INFO: Core Kamailio tables succesfully created. Install presence related tables? (y/n): y INFO: creating presence tables into kamailio ... INFO: Presence tables succesfully created. Install tables for imc cpl siptrace domainpolicy carrierroute drouting userblacklist htable purple uac pipelimit mtree sca mohqueue rtpproxy rtpengine? (y/n): y INFO: creating extra tables into kamailio ... INFO: Extra tables succesfully created. Install tables for uid_auth_db uid_avp_db uid_domain uid_gflags uid_uri_db? (y/n): y INFO: creating uid tables into kamailio ... INFO: UID tables succesfully created.
创建DB用户可以完全访问Siremis数据库
$sudo mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 166 Server version: 10.3.9-MariaDB-1:10.3.9+maria~bionic-log mariadb.org binary distribution Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> GRANT ALL PRIVILEGES ON siremis.* TO Hyman@theitroad IDENTIFIED BY 'Password'; Query OK, 0 rows affected (0.001 sec) MariaDB [(none)]> QUIT Bye
Ubuntu 20.04/18.04/16.04上的Siremis Web安装
启用Apache重写模块并重新启动Apache。
$sudo a2enmod rewrite Enabling module rewrite. $sudo systemctl restart apache2
访问http://yourwebserver.com/siremis/以访问网页并启动安装向导。
当我们第一次执行此操作时,我们将被重定向到安装向导。
按照步骤。
所有系统检查应通过。
在数据库配置中,选择如下所示的所有选项
完成后,登录:
username: admin Password: admin
通过单击页面顶部的帐户,在第一个登录中更改默认密码admin。
后安装提示
删除安装目录:siremis /安装
如果要再次运行安装向导:还原目录:siremis/installremove文件:siremis/install.lock