Elastix官网:http://www.elastix.org

Elastix 中 文版安装设置手册:http://wenku.baidu.com /link?url=lx2FqurHFBticYa1ydNWStLhVvf9yfcBzzD2XHEuCjrpxNdaSr4W4Ht3KHIr9kgxbW4vyaQFwdgYFFowk5g7wk5HOVGXE30M1ujs-_07FUK


Elastix安装,以Elastix2.4_64为例


按 ENTER 回车键

08f790529822720e68420e8e79cb0a46f21fab32

54fbb2fb43166d221299f9e0442309f79152d2dc

ac6eddc451da81cbc7096fb95066d016082431d3

9825bc315c6034a89f0d54f5c9134954082376d3

91529822720e0cf3b21ea28f0846f21fbf09aadd

f603918fa0ec08fa048effd35bee3d6d55fbda3c

f703738da97739129ea86915fa198618367ae23c

0b7b02087bf40ad12b6d2b97552c11dfa9ecce3d

f636afc379310a55acad3280b54543a98226103c

cc11728b4710b91225251a8ac1fdfc03934522da

faf2b2119313b07e4134bc7c0ed7912397dd8c3d


Eth0设置IP

d1a20cf431adcbefeed39272aeaf2edda2cc9fdb

0dd7912397dda1443c8180c6b0b7d0a20cf4863e


设置网关、DNS

a50f4bfbfbedab641af9a1b4f536afc379311e3e

5bafa40f4bfbfbedb3d2da0b7af0f736afc31f3e


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

f31fbe096b63f62407d6d5778544ebf81a4ca33f


设置系统root密码

6f061d950a7b02083c14d39560d9f2d3562cc8e1

63d0f703918fa0ec5c1a8879249759ee3c6ddbe1


设置Mysql root帐号密码

b8014a90f603738d82c0e056b11bb051f819ec38

faf2b2119313b07e4137bc7c0ed7912397dd8c38


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

cc11728b4710b912254b1a8ac1fdfc0392452238

203fb80e7bec54e79366f66abb389b504fc26a38


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


添加分机号

21a4462309f79052c45cad4a0ef3d7ca7bcbd507


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

c83d70cf3bc79f3d8af09c45b8a1cd11728b29b5

按以上方法,多建几个分机号。

软件电话:

eyeBeam(可设置多个SIP帐号) http://www.kuaipan.cn/file/id_11924074754214766.htm

X-Lite3.0 http://www.kuaipan.cn/file/id_11924074754214765.htm

6609c93d70cf3bc747701e98d300baa1cd112a56


c995d143ad4bd11377d7654658afa40f4bfb05af

a8773912b31bb051d97d615c347adab44aede06d


中继设置

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


fcfaaf51f3deb48f258f73aaf21f3a292cf578e4


呼出中继设置:

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


caef76094b36acafa3bd44887ed98d1001e99c61



呼出设置


77c6a7efce1b9d165ee64615f1deb48f8c5464a5



呼入设置

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

可设置多个呼入

b58f8c5494eef01f7ca260b0e2fe9925bc317d14

d31b0ef41bd5ad6e5a081c9f83cb39dbb7fd3cd5



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

4d086e061d950a7bc56a23b108d162d9f2d3c96c


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


ac345982b2b7d0a215c364e8c9ef76094b369ab8

279759ee3d6d55fb6ca316536f224f4a20a4dd5a


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

d6ca7bcb0a46f21f539d3e26f4246b600c33ae1e

e1fe9925bc315c6070d50b9a8fb1cb1349547706

9e3df8dcd100baa1a02827ce4510b912c8fc2eba


b64543a98226cffcb795dfc7bb014a90f603ea0c

0df431adcbef760956a1f9ea2cdda3cc7cd99e18


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

3bf33a87e950352ace67457d5143fbf2b2118b44


设置非工作欢迎IVR

50da81cb39dbb6fdd09487530b24ab18962b37f3


设置假日IVR

6609c93d70cf3bc7c1b19899d300baa1cd112a15


4、设置时间组

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

工作时间组

f636afc379310a55242b8a81b54543a9822610b3


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

c2cec3fdfc039245bcbcb57a8594a4c27d1e25bd


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

962bd40735fae6cd897071170db30f2443a70f84


5、设置时间条件(时间条件可嵌套)

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

3812b31bb051f8192ed9573fd8b44aed2f73e7c3


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

64380cd7912397ddd83b5d725b82b2b7d0a28702


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

9345d688d43f87947a628d58d01b0ef41bd53a23


6、呼入路由+时间条件设置

设置DID Number、Set Destination,Destination选择Time Time Conditions的TC-GZ

a044ad345982b2b7daac6fb133adcbef76099b97


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

Apply Configuration Changes Here



附:

一、给非Administrator用户组分配所有分机号

如新增Reports用户组,该组用户只能查看Reports模块的CDR Report、Missed Calls、PBX模块的Monitoring录音

9922720e0cf3d7ca324bfc00f01fbe096b63a903

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

a71ea8d3fd1f41342c34c708271f95cad1c85e41

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


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行的内容

fcfaaf51f3deb48f15ea63a8f21f3a292cf578c1

    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三行

f636afc379310a55b2d31c82b54543a9832610d4

    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行内容注释

b7003af33a87e950576b3c1a12385343fbf2b44c

    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