您的位置:首页 > 其它

Elastix2.4安装、中继、 呼出、呼入、IVR等设置、忘记密码、端口映射

2013-12-12 15:49 801 查看
Elastix官网:http://www.elastix.org
Elastix 中
文版安装设置手册:http://wenku.baidu.com
/link?url=lx2FqurHFBticYa1ydNWStLhVvf9yfcBzzD2XHEuCjrpxNdaSr4W4Ht3KHIr9kgxbW4vyaQFwdgYFFowk5g7wk5HOVGXE30M1ujs-_07FUK

Elastix安装,以Elastix2.4_64为例

按 ENTER 回车键























Eth0设置IP





设置网关、DNS






果Bios系统时钟是当地时间,则不选择System clock uses UTC,若是安装在ESXi虚拟上,ESXi服务器BIOS使用
UTC时间,时间不正确的请参照 http://hi.baidu.com/hanxiao2100/item /1dc58298fa1c2cbf82d295e3



设置系统root密码





设置Mysql root帐号密码





设置Elastix管理后台 http://Elastix_IP 管理员admin登录密码





elastix的web端口修改
第一步,修改”#listen 12.34.56.78:80”后的80为800
修改”listen 80”后的80为800
第二步:修改”rewriteengine on”后的on改为off
重启apache service httpd restart

分机之间通话
Elaxtix安装完后,添加分机号,分机号之间便可以通话。
登录Elastix管理后台 http://ElastixService_IP
添加分机号



填写User Extension(用户分机号)、Display Name(显示名称)、Outbound CID(外呼时显示的号码)、secret(密码),最后点击 submib提交即成功创建一个分机号



按以上方法,多建几个分机号。
软件电话:
eyeBeam(可设置多个SIP帐号) http://www.kuaipan.cn/file/id_11924074754214766.htm X-Lite3.0 http://www.kuaipan.cn/file/id_11924074754214765.htm






中继设置
添加中继,输入中继名称,帐号、密码、hostIP电话服务商会提供



呼出中继设置:
type=peer
host=192.168.1.121
port=5060
fromdomain=192.168.1.121
context=from-trunk
dtmfmode=rfc2833
insecure=port
disallow=all
allow=all
nat=yes
canreinvite=no

呼入中继设置:
type=peer
host=192.168.1.121
port=5060
fromdomain=192.168.1.121
context=from-trunk
dtmfmode=rfc2833
insecure=port
disallow=all
allow=alaw
nat=yes
canreinvite=no



呼出设置



呼入设置
填写Description(描述)、DID Number(呼入对应的电话号码)、Set Destination(设置目标),目标是可以设置为分机号、IVR、时间条件等,先设置一个简单的呼入,直接转到分机号1001
可设置多个呼入





IVR互动式主意应答设置

里示例一个复杂点的:工作时间欢迎语(周1到周5每天的8:30-12:00,13:00-18:00),按0人工服务、按1产品介绍、按2下订单、探3
售后服务、按4报修,当按键进入相应服务超时无人接听时按0继续等待,按1返回欢迎语,非法按键时返回欢迎语,无人应答时返回欢迎语,其他时间则非工作欢
迎语,工作欢迎语与非工作欢迎语在根据时间条件自动切换

1、添加系统铃声
注意上传的语音文件必须为PCM编码16位,在8000赫兹,the file must be PCM Encoded 16 Bits, at 8000Hz



2、添加Ring Groups振铃组,如下,添加600-604,4组振铃组,并选择相应无应答时的IVR





3、添加IVR
Digital Receptionist
Instructions
Digital ReceptionistInstructionsYou use the Digital Receptionist to make IVR's, Interactive Voice Response systems.
When
creating a menu option, apart from the standard options of 0-9,* and #,
you can also use 'i' and 't' destinations. 'i' is used when the caller
pushes an invalid button, and 't' is used when there is no response. If
those options aren't supplied, the default 't' is to replay the menu
three times and then hang up, and the default 'i' is to say 'Invalid
option, please try again' and replay the menu. After three invalid
attempts, the line is hung up.
Announcement为播放的语音

添加振铃组IVR











设置工作时欢迎IVR,并选择相应的Announcement。



设置非工作欢迎IVR



设置假日IVR



4、设置时间组

设置Time Groups时间组(一个时间组可设置多个时间段)

工作时间组



假日时间组 Dayoff-GZ,2013-10-01~2013-10-07国庆节休假



上班调整时间组 WorkAdjustment-GZ,如2013国庆节上班时间调整,2013-09-28~2013-09-29原本为周末的调整为上班了



5、设置时间条件(时间条件可嵌套)
设置一个时间条件 gzwork,Time Group时间组选择work上班时间组,Destination if time matches时间匹配应用工作欢迎IVR,Destination if time does not matche选择非工作欢迎IVR




置WorkAdjustment-GZ时间条件,Time Group时间组选择WorkAdjustment-GZ,Destination if
time matches时间匹配选择工作欢迎IVR,Destination if time does not
match如果时间不匹配应用时间条件gzwork




置时间条件TC-GZ:Time Group时间组选择WorkAdjustment-GZ,Destination if time
matches时间匹配选择工作欢迎IVR,Destination if time does not
match如果时间不匹配应用时间条件gzwork



6、呼入路由+时间条件设置
设置DID Number、Set Destination,Destination选择Time Time Conditions的TC-GZ



以后有什么假日或者放假需要调整上班时间的,提前修改时间组Dayoff-GZ的时间段即可,记得提交并应用配置更改,
Apply Configuration Changes Here

附:
一、给非Administrator用户组分配所有分机号
如新增Reports用户组,该组用户只能查看Reports模块的CDR Report、Missed Calls、PBX模块的Monitoring录音



默认情况下其他非Administrator组用户查看Reports模块的CDR Report会报错There is no extension number associated with the current user. Please contact the administrator to assign it an extension



解决该问题需要修改网站代码

cp /var/www/html/modules/cdrreport/index.php /var/www/html/modules/cdrreport/index.php_bak
vi /var/www/html/modules/cdrreport/index.php
1、注释71行到78行的内容



if(is_null($exten) || $exten == ""){
if(!$isAdministrator){
$smarty->assign('mb_message', "<b>"._tr("contact_admin")."</b>");
return "";
}
else
$smarty->assign('mb_message', "<b>"._tr("no_extension")."</b>");
}

2、注释242到244三行



if(!isset($sExtension) || $sExtension == "" && !$isAdministrator)
$total = 0;
else
主要做的修改如下:
[root@CTIserv cdrreport]# diff index.php index.php_bak
71c71
< /*if(is_null($exten) || $exten == ""){
---
> if(is_null($exten) || $exten == ""){
78c78
< }*/
---
> }
242,244c242,244
< //if(!isset($sExtension) || $sExtension == "" && !$isAdministrator)
< //$total = 0;
< //else
---
> if(!isset($sExtension) || $sExtension == "" && !$isAdministrator)
> $total = 0;
> else

如果PBX模块的Monitoring录音分配所有分机号
把79-87行内容注释



if($extension=="" || is_null($extension)){
if($esAdministrador)
$smarty->assign("mb_message", "<b>"._tr("no_extension")."</b>");
else{
$smarty->assign("mb_message", "<b>"._tr("contact_admin")."</b>");
return "";
}
}

主要做的修改如下:
[root@CTIserv monitoring]# diff index.php index.php_bak
79c79
< /*if($extension=="" || is_null($extension)){
---
> if($extension=="" || is_null($extension)){
87c87
< */
---
>

二、Elastix忘记WEB登录密码

elastix忘记WEB登录密码怎么办
你一定遇到过忘记elastix WEB GUI的情况。好吧,如果你重来不会忘记。那最好。如果遇到了,就往下看吧。
其实很简单,只要用root登录你的elastix。(Linux方式进入elastix.)
输入
sqlite3 /var/www/db/acl.db "UPDATE acl_user SET md5_password = '`echo -n 12341234|md5sum|cut -d ' ' -f 1`' WHERE name = 'admin'"

http://www.ielastix.com/password-change/

Elastix忘记登陆密码解决方法

有一些网友、客户问一些关于安装完elastix后,忘记了登陆密码,这真是个大大的悲剧啊。由于它们对elastix不太了解,所以碰到这样的问题,要
某就去论坛上发帖求助,要某就向销售投诉,抱怨,如果没法解决就只能重装系统了。我个人也给好多客户解决过这样的问题,有的甚至连操作系统root密码都
忘记了,唉!我个人还是建议,安装ealstix的时候,如果你不熟悉,还是仔细看看上面的英文指示,一步一步慢慢来,把密码记清楚。
上次有一个客户遇到了这样的问题,结果跑我们公司的客服那里寻求解答,这种纯技术的事情,她们销售怎懂呢?后来客服把这个事情给我说了,还说那个客户叽叽
歪歪的批评了她一顿。我想还是抽点时间自己写一篇教程吧,正好这段时间要做一个公司的ppt教程,有一部分涉及到这个知识点,所以干脆完整的写一遍吧,如
有不对之处,还望大家批评指正。我不想讲解系统安装完成后,忘记root密码的情况,这个网上一大堆,无非是在grub的menu中加上single
,进单用户模式,然后改密码,请网上自己搜资料解决。

今天主要讲解elastix的2种密码:系统管理登陆密码、后台freepbx管理登陆
1.必备知识:
Linux 基本操作 、SQL语句、了解常见加密算法MD5和SHA1、嵌入式数据库SQLite
2.我的工作环境
Elastix
2.0 ,假设我自己也忘记了所有密码,但是我能够进操作系统和mysql数据库
补充:这次我的环境是Elastix2.0,而不是Elastix1.6,后者保存密码的方式是”明文”,直接用简单的sql语句就可以修改密码,前者保
存密码的字段是加过密的,这就是版本升级后的一个安全更新吧!

3. 系统管理登陆密码

我碰到过好多初学者,好不容易装完elastix,结果看到这个界面而被排斥在门外,或者在这里浪费了很多时间。下面我们开始修改密码。
首先要知道在elastix中,系统管理密码是存放在/var/www/db/acl.db 文件中的,而且这个数据库文件是sqlite的,如下:
[root@elastix2-voip88-bangian db]# pwd
/var/www/db
[root@elastix2-voip88-bangian db]# ls
acl.db address_book.db control_panel_design.db endpoint.db FTP.db menu.db samples.db trunk.db
addons.db calendar.db email.db fax.db hardware_detector.db rate.db settings.db
[root@elastix2-voip88-bangian db]#
知道这点还不行,我们还要知道如何操作sqlite数据库,如果不会CLI的Client,就用GUI的sqlite客户端吧,下面我们用命令行的Client操作:
[root@elastix2-voip88-bangian db]# sqlite3 acl.db
SQLite version 3.3.6
Enter ".help" for instructions
sqlite> .tables
acl_action
acl_membership acl_user acl_group
acl_profile_properties acl_user_permission
acl_group_permission acl_resource acl_user_profile
sqlite>
sqlite> .schema acl_user
CREATE TABLE acl_user
(id INTEGER PRIMARY KEY, name varchar(50), description varchar(180),
md5_password varchar(50), extension varchar(20));
sqlite> select * from acl_user
...> ;
1|admin||5b842885be8780c70f7f67ca11421031|
sqlite>
sqlite>

们的密码其实就存放在acl_user表中的md5_password字段中,显然,密码使用md5函数加密的,这里要补充一个基本知识:MD5和
SHA1加密都是不可逆的,而且MD5加密后的字符串是32个16进制的字符串,也就是128位;而SHA1是40个(160位),显然后者更安全。下面
我们用update语句改密码:
sqlite> update acl_user set md5_password=md5('123456');
SQL error: no such function: md5
sqlite>
悲剧,sqlite3中没有md5函数,但是我们的mysql中有啊,于是再开一终端,连上mysql数据库,如下:
[root@elastix2-voip88-bangian ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 38
Server version: 5.0.77 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>
mysql> select MD5('123456');
+----------------------------------+
| MD5('123456') |
+----------------------------------+
| e10adc3949ba59abbe56e057f20f883e |
+----------------------------------+
1 row in set (0.09 sec)

mysql>
mysql>
于是得到了 ‘123456’加密后的字符串,于是我们切换另一终端,继续在sqlite里面改密码,如下:
sqlite>
sqlite> update acl_user set md5_password='e10adc3949ba59abbe56e057f20f883e'; sqlite>
sqlite> select * from acl_user;
1|admin||e10adc3949ba59abbe56e057f20f883e|
sqlite>
修改成功!

4. 后台freepbx管理登陆
1. freepbx登陆的url是在IP后面加上admin/,如下:

Freepbx我不想讲太多,修改密码原理同上面几乎一样,大家一看就明白,我只把重要的地方标记出来。只要明白:freepbx的登陆密码是存放在asterisk数据库中的ampusers表中的,而且采用SHA1方式加密。操作如下:
mysql> use asterisk
Database changed
mysql>
mysql> show tables like 'ampuse%';
+------------------------------+
| Tables_in_asterisk (ampuse%) |
+------------------------------+
| ampusers |
+------------------------------+
1 row in set (0.00 sec)

mysql>
mysql> desc ampusers;
+----------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------------+-------------+------+-----+---------+-------+
| username | varchar(20) | NO | PRI | | |
| password_sha1 | varchar(40) | NO | | NULL | |
| extension_low | varchar(20) | NO | | | |
| extension_high | varchar(20) | NO | | | |
| deptname | varchar(20) | NO | | | |
| sections | blob | NO | | NULL | |
+----------------+-------------+------+-----+---------+-------+
6 rows in set (0.00 sec)

mysql> select sha1('123456');
+------------------------------------------+
| sha1('123456') |
+------------------------------------------+
| 7c4a8d09ca3762af61e59520943dc26494f8941b |
+------------------------------------------+
1 row in set (0.00 sec)

mysql>
mysql> update ampusers set
password_sha1='7c4a8d09ca3762af61e59520943dc26494f8941b';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0

mysql>
执行上面的操作,我们已经将freepbx中所有管理账号的密码改成“123456”了。 现在我们可以用新密码登陆进去了

端口映射
Elastix有许多端口,在配置防火墙时需要打开端口:
1 HTTPS端口: TCP/UDP 443
2 SIP端口:TCP/UDP 5060
3 RTP端口: UDP 10000 - 20000
4 FOP端口: UDP 4445
5 IAX2 TCP/UDP 4569
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息