apache遇上selinux
关键字: apache, selinux
最常见的问题就是报无权限的错误,但是文件属性已经设为777还不行。那是因为selinux在起作用,查看apache的error_log可以看出来。
有三个办法可以解决:
1.直接禁止SELinux
Java代码
vi /etc/sysconfig/selinux
SELINUX=enforcing --> SELINUX=disabled
2.不保护apache
Java代码
setsebool -P httpd_disable_trans 1
3.设置内容的类型
Java代码
chcon -R -t httpd_sys_content_t <目录名>
可以man一下httpd_selinux,里面有更详细的内容。
还有个参考:http://fedoraproject.org/wiki/SELinux/apache
SELinux也不是恶魔,不过出问题的时候可以先禁掉试试,排除法。
Rocky Space
2010年11月14日 星期日
2010年8月11日 星期三
Cisco 7940/7960 “Configuring IP” problem (FreePBX/Asterisk 1.4)
I was recently programming our new ip phones, and was upset to find that they couldn’t get past the “Configuring IP” part of the boot-up phase. Googling only turns up suggestions to do a factory reset. So I followed the instructions, but they didn’t help. Here’s how you do it anyway:
1.) Power the phone off
2.) Power the phone on, then immediately press and hold the ‘#’ button.
3.) The boot up light sequence will commence, after which the screen will prompt ‘Reset key sequence detected.’ You can release the ‘#’ key now
4.) You now have 60 seconds to input this sequence: ‘123456789*0#’ (the whole keypad, left to right, top to bottom)
5.) Choose whether to keep the network config or not (since it is a reset after all, I’d recommend not keeping it)
6.) The phone should then reboot.
Okay, from a bit of experimenting, I was finally able to get past that annoying ‘Configuring IP’ part, turns out in our case the phone didn’t detect our tftpboot server. Here’s what I did:
1.) Press the Settings button.
2.) Go to Network Configuration.
3.) Scroll down to Alternate TFTP (which by default should say: NO)
4.) Unlock it (press **#), then change it to YES.
5.) Scroll back up to TFTP Server 1, Unlock it (using code above) and enter in your tftpboot servers’ IP.
6.) Push ‘Save’. The phone should reboot and now continue on
http://princechavez.net76.net/?p=39
1.) Power the phone off
2.) Power the phone on, then immediately press and hold the ‘#’ button.
3.) The boot up light sequence will commence, after which the screen will prompt ‘Reset key sequence detected.’ You can release the ‘#’ key now
4.) You now have 60 seconds to input this sequence: ‘123456789*0#’ (the whole keypad, left to right, top to bottom)
5.) Choose whether to keep the network config or not (since it is a reset after all, I’d recommend not keeping it)
6.) The phone should then reboot.
Okay, from a bit of experimenting, I was finally able to get past that annoying ‘Configuring IP’ part, turns out in our case the phone didn’t detect our tftpboot server. Here’s what I did:
1.) Press the Settings button.
2.) Go to Network Configuration.
3.) Scroll down to Alternate TFTP (which by default should say: NO)
4.) Unlock it (press **#), then change it to YES.
5.) Scroll back up to TFTP Server 1, Unlock it (using code above) and enter in your tftpboot servers’ IP.
6.) Push ‘Save’. The phone should reboot and now continue on
http://princechavez.net76.net/?p=39
2010年8月4日 星期三
[轉]将用户(user)与设备(device)区分开来--内线分机的高级应用 - [CTI开发]
我们知道,FreePBX/TrixBox为我们造就了一个配置和使用Asterisk的轻松环境。但是,有些时候FreePBX/TrixBox的省略配置界面还不能完全满足我们的需要。
当你配置一个内线分机(extensions)时,FreePBX/TrixBox就将用户(user)与设备(device)绑定在一起了。比如,张三使用分机101。
情况一:如果张三有三个分机呢?公司办公室有一个IP电话,笔记本上有XLite软电话,家里面的电脑上也装上了XLite软电话。(假设张三同志很积极)是不是我们一定要给张三同志配备3个分机号码呢?三个留言箱?
情况二:在一个三班倒的客服中心,王五,马六,和徐七轮流值班各8小时,但是他们三人共同使用一部IP电话机。(配3部电话?好像不现实吧)是不是就设定一个分机号码呢?共同使用一个留言箱?
绑定设置分机,设置起来非常简单。但当你需要查找某一个人的电话记录时,这种绑定设置就给我们带来了麻烦。对情况一,我们要把这个用户的所有分机的纪录一个一个地全找出来。对情况二,我们要把值班时间记录找出来,才能分清哪一个电话是哪一个人打的。
实际上,Asterisk/FreePBX/TrixBox对此有完美的解决方法,就是将用户User与设备Device区分开来。下面,我们就以情况二为例,说明一下如何设置用户User与设备Device。
首先,要对FreePBX做一个修改。Telnet 或 SSH到Trixbox 服务器,以root登陆。然后编辑文件 /etc/amportal.conf
nano /etc/amportal.conf
找到:
# AMPEXTENSIONS: the type of view for extensions admin
# If set to 'deviceanduser' Devices and Users will be administered seperately, $
# If set to 'extensions' Devices and Users will me administered in a single scr$
AMPEXTENSIONS=extensions
改为:
# AMPEXTENSIONS: the type of view for extensions admin
# If set to 'deviceanduser' Devices and Users will be administered seperately, $
# If set to 'extensions' Devices and Users will me administered in a single scr$
# AMPEXTENSIONS=extensions
AMPEXTENSIONS=deviceanduser
按Ctrl-X退出并存盘。
重启Asterisk
amportal restart
然后,回到TrixBox管理界面,就会看到左面的菜单有了变化:
原来的Extensions没有了,取而代之的是Devices 和 Users。
到了这一步,剩下的就不难了!
先来设置用户Users。需要注意的是,每一个用户都要有自己的用户分机号码,就是 User Extension。此号码不能与他人重复。密码Password只能用数字。依次为王五(2001),马六(2002),和徐七(2003)建好用户。
再来搞定设备Device:(假设我们有一台SIP电话机)
对上面做两点说明。1)Device要有自己的号码和密码,这仅仅用在Asterisk的验证上。真正的分机号码是取决于那一个用户在这部电话机上登陆。 2)Device Type 这里选用 Ad hoc,因为这个设备是要被多人共用的。(如果是情况一那样,一个User多个Device时,就要选用Fixed)
设置好了,来看看怎样使用:王五上早班,他首先要用自己的帐号登陆。拨打 *11,听到提示,输入分机号 2001#,再听到提示,输入密码 123456#。如果输入正确,分机2001就加入了Asterisk系统中。到王五下班时,拨打 *12 退出登陆。接班的马六则同样使用同一部电话机,但分机号就变成了2002(为马六设置的分机号)。徐七(2003)也如是。这样每个人都有自己的分机号, 都有自己的留言箱。
这样建立的分机,和普通分机一样,可以加入队列,振铃组等。
转自 :http://www.star-voip.com/viewtopic.php?t=23
http://vontall.blogbus.com/logs/41521736.html
当你配置一个内线分机(extensions)时,FreePBX/TrixBox就将用户(user)与设备(device)绑定在一起了。比如,张三使用分机101。
情况一:如果张三有三个分机呢?公司办公室有一个IP电话,笔记本上有XLite软电话,家里面的电脑上也装上了XLite软电话。(假设张三同志很积极)是不是我们一定要给张三同志配备3个分机号码呢?三个留言箱?
情况二:在一个三班倒的客服中心,王五,马六,和徐七轮流值班各8小时,但是他们三人共同使用一部IP电话机。(配3部电话?好像不现实吧)是不是就设定一个分机号码呢?共同使用一个留言箱?
绑定设置分机,设置起来非常简单。但当你需要查找某一个人的电话记录时,这种绑定设置就给我们带来了麻烦。对情况一,我们要把这个用户的所有分机的纪录一个一个地全找出来。对情况二,我们要把值班时间记录找出来,才能分清哪一个电话是哪一个人打的。
实际上,Asterisk/FreePBX/TrixBox对此有完美的解决方法,就是将用户User与设备Device区分开来。下面,我们就以情况二为例,说明一下如何设置用户User与设备Device。
首先,要对FreePBX做一个修改。Telnet 或 SSH到Trixbox 服务器,以root登陆。然后编辑文件 /etc/amportal.conf
nano /etc/amportal.conf
找到:
# AMPEXTENSIONS: the type of view for extensions admin
# If set to 'deviceanduser' Devices and Users will be administered seperately, $
# If set to 'extensions' Devices and Users will me administered in a single scr$
AMPEXTENSIONS=extensions
改为:
# AMPEXTENSIONS: the type of view for extensions admin
# If set to 'deviceanduser' Devices and Users will be administered seperately, $
# If set to 'extensions' Devices and Users will me administered in a single scr$
# AMPEXTENSIONS=extensions
AMPEXTENSIONS=deviceanduser
按Ctrl-X退出并存盘。
重启Asterisk
amportal restart
然后,回到TrixBox管理界面,就会看到左面的菜单有了变化:
原来的Extensions没有了,取而代之的是Devices 和 Users。
到了这一步,剩下的就不难了!
先来设置用户Users。需要注意的是,每一个用户都要有自己的用户分机号码,就是 User Extension。此号码不能与他人重复。密码Password只能用数字。依次为王五(2001),马六(2002),和徐七(2003)建好用户。
再来搞定设备Device:(假设我们有一台SIP电话机)
对上面做两点说明。1)Device要有自己的号码和密码,这仅仅用在Asterisk的验证上。真正的分机号码是取决于那一个用户在这部电话机上登陆。 2)Device Type 这里选用 Ad hoc,因为这个设备是要被多人共用的。(如果是情况一那样,一个User多个Device时,就要选用Fixed)
设置好了,来看看怎样使用:王五上早班,他首先要用自己的帐号登陆。拨打 *11,听到提示,输入分机号 2001#,再听到提示,输入密码 123456#。如果输入正确,分机2001就加入了Asterisk系统中。到王五下班时,拨打 *12 退出登陆。接班的马六则同样使用同一部电话机,但分机号就变成了2002(为马六设置的分机号)。徐七(2003)也如是。这样每个人都有自己的分机号, 都有自己的留言箱。
这样建立的分机,和普通分机一样,可以加入队列,振铃组等。
转自 :http://www.star-voip.com/viewtopic.php?t=23
http://vontall.blogbus.com/logs/41521736.html
2010年7月31日 星期六
[Forward] Elastix DAHDI Trunk Routing with DID
If you have multiple FXO (PSTN) lines into your PBX, it is always nice to be able to route these in-bound calls based on the physical line they arrive upon. Getting this working with DAHDI in Elastix has been driving me up the wall!
This issue has been bugging me for over a week now and I have finally got it to work. I have two trunks connected via FXO modules on a TDM400 card, but I could not get the DID working with them (CLI with BT sorted). But once Asterisk had the call, I could not make Asterisk make a decision with call based on which number/line the caller called. Not the number the caller is calling from, this is CLI or CID, but the number they dialled to make your line ‘ring’.
Asterisk was either saying there was no route and answering the call to say the number you have called is not in service, or just handling the 2 lines in the same way – i.e. it could not tell them apart. Here I detail my findings so you can process lines automatically.
I had most of the configuration right, but I had to hand edit another configuration file to actually to get the changes made via the web interface actually working. Trying to find this last little bit of information on the forums has been maddening to say the least.
Changing the route
First you need to correct the router handler, by changing a setting in a configuration file. There is no graphical interface for this I’m afraid and it is the only file you need to manually edit by a suitable means.
The default setting in this configuration file is ‘from-pstn’ and this needs to be changed to ‘from-zaptel’. You need to edit:
/etc/asterisk/dahdi-channels.conf
You need to find the correct section for your line connection. For me this was lines 3 & 4. Below is the example original settings for my channel 3:
;;; line=”3 WCTDM/4/2 FXSKS”
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 3
callerid=
group=
context=default
And you need to edit this for each channel to become like this:
;;; line=”3 WCTDM/4/2 FXSKS”
signalling=fxs_ks
callerid=asreceived
group=0
context=from-zaptel
channel => 3
callerid=
group=
context=default
Then save the file back and restart Asterisk.
Marking the Channel DID
The next stage is to assign DID numbers to these channels so a decision can be made on how to process the call based on line ID.
Elastix does not have an interface to the required facility, so you need to un-embed the FreePBX console, details are here.
Once in the FreePBX console, you need to choose ‘ZAP Channel DIDs’ from the menu on the left. You should get a screen similar to:
ZAP DIDs
It is quite simple to complete, needing only 3 bits of information:
Channel – The DAHDI channel you are assigning the DID to.
Description – Your description for this allocation. I would suggest an name and a summary of the DID you will be allocating.
DID: The DID number need to call to make this channel ‘ring’.
An example UK configuration might look like this for channel 3, used to be routed (Inbound Routes) to the sales department for the number: 01234-123456:
ZAP DID Sample
Once completed, you can click ‘Submit Changes’. You need to repeat this for each FXO port you have for inbound calls.
You can then save the changes back and configure the ‘Inbound Routes’ to actually ‘route’ the calls where you want them.
You can actually use almost any number in the DID, but I suggest you use the full number, including the STD, in case you have any ‘out of area’ number. And it generally reduces confusion in the future.
Originated from [http://automation.binarysage.net/?p=348]
This issue has been bugging me for over a week now and I have finally got it to work. I have two trunks connected via FXO modules on a TDM400 card, but I could not get the DID working with them (CLI with BT sorted). But once Asterisk had the call, I could not make Asterisk make a decision with call based on which number/line the caller called. Not the number the caller is calling from, this is CLI or CID, but the number they dialled to make your line ‘ring’.
Asterisk was either saying there was no route and answering the call to say the number you have called is not in service, or just handling the 2 lines in the same way – i.e. it could not tell them apart. Here I detail my findings so you can process lines automatically.
I had most of the configuration right, but I had to hand edit another configuration file to actually to get the changes made via the web interface actually working. Trying to find this last little bit of information on the forums has been maddening to say the least.
Changing the route
First you need to correct the router handler, by changing a setting in a configuration file. There is no graphical interface for this I’m afraid and it is the only file you need to manually edit by a suitable means.
The default setting in this configuration file is ‘from-pstn’ and this needs to be changed to ‘from-zaptel’. You need to edit:
/etc/asterisk/dahdi-channels.conf
You need to find the correct section for your line connection. For me this was lines 3 & 4. Below is the example original settings for my channel 3:
;;; line=”3 WCTDM/4/2 FXSKS”
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 3
callerid=
group=
context=default
And you need to edit this for each channel to become like this:
;;; line=”3 WCTDM/4/2 FXSKS”
signalling=fxs_ks
callerid=asreceived
group=0
context=from-zaptel
channel => 3
callerid=
group=
context=default
Then save the file back and restart Asterisk.
Marking the Channel DID
The next stage is to assign DID numbers to these channels so a decision can be made on how to process the call based on line ID.
Elastix does not have an interface to the required facility, so you need to un-embed the FreePBX console, details are here.
Once in the FreePBX console, you need to choose ‘ZAP Channel DIDs’ from the menu on the left. You should get a screen similar to:
ZAP DIDs
It is quite simple to complete, needing only 3 bits of information:
Channel – The DAHDI channel you are assigning the DID to.
Description – Your description for this allocation. I would suggest an name and a summary of the DID you will be allocating.
DID: The DID number need to call to make this channel ‘ring’.
An example UK configuration might look like this for channel 3, used to be routed (Inbound Routes) to the sales department for the number: 01234-123456:
ZAP DID Sample
Once completed, you can click ‘Submit Changes’. You need to repeat this for each FXO port you have for inbound calls.
You can then save the changes back and configure the ‘Inbound Routes’ to actually ‘route’ the calls where you want them.
You can actually use almost any number in the DID, but I suggest you use the full number, including the STD, in case you have any ‘out of area’ number. And it generally reduces confusion in the future.
Originated from [http://automation.binarysage.net/?p=348]
FreePBX 常用配置
添加分机
进入 FreePBX 中的"Extensions"项,点击右侧的“Add Extension”链接
选择设备类型:“Generic SIP Device”为软电话,“Generic ZAP Device”为使用ZAP设备连接的电话机,“Other (Custom) Device”为自定义电话机。选好后点击“”按钮。
填写分机设置
分机设置时的各设置项说明如下:
Add Extension
User Extension: 分机号码,为3位以上的数字
Display Name: 分机用户名称
Device Options
secret: SIP 软电话登录密码
dtmfmode: SIP 软电话模式
channel: ZAP设备电话连接端口号
呼出设置
1、添加中继
进入 FreePBX 中的“Add a Trunk”项,点击“Add Zap Trunk (DAHDI compatibility mode)”链接
在下方的“Zap Identifier (trunk name)”的设置项中填写Zap端口信息,默认可以填为“g0”,表示可以使用"dahdi-channels.conf"文件中"group"为0的所有线路
点击下方的“Submit Changes”按钮提交
2、添加呼出路由
进入 FreePBX 中的“Outbound Routes”项,点击右侧的“Add Route”链接
填写路由设置
点击下方的“Submit Changes”按钮提交
路由设置中的各设置项说明如下:
Route Name: 填写路由名称,例如此条路由为外线号码前加拨9,可以命名为“9_outside”
Route Password: 路由密码,如设置有密码分机拨打外线后时会提示要输入密码
Dial Patterns: 拨号模式设置,外线号码前加拨9的设置为“9|.”
Trunk Sequence: 中继续列,在这里我们选择上一步添加的中继“ZAP/g0”
参考资料:Asterisk Dialplan命令中文翻译
呼入设置
进入 FreePBX 中的“Inbound Routes”项,点击右侧的“Add Incoming Route”链接
因为我们这里添加的是包含所有呼入的总路由,所以除了在下方的“Set Destination”中选择呼入处理外,其它的都不选择
点击下方的“Submit”按钮提交
呼入队列设置
1、添加队列
进入 FreePBX 中的“Queues”项,点击右侧的“Add Queue”链接
填写队列设置
点击下方的“Submit Changes”按钮提交
队列设置中的各设置项说明如下:
Queue Number: 队列号码(同分机号码),各分机可使用命令加入、退出队列
Queue Name: 队列名称,用来进行说明
Static Agents: 静态座席,可以使用下面的“”来快速的选择分机加入静态座席
2、添加呼入路由
进入 FreePBX 中的“Inbound Routes”项,点击右侧的“Add Incoming Route”链接来添加一个新路由
按需求设置上面的 DID 等设置项,最后在最下方的“Set Destination”中选中“”并选择上一步添加的队列
点击下方的“Submit”按钮提交
直线呼入设置
1、修改 DAHDI 的配置文件
修改配置文件"/etc/asterisk/dahdi-channels.conf",将其中各 FXO 口由以下设置:
;;; line="5 WCTDM/0/4 FXSKS"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 5
callerid=
group=
context=default
改为:
;;; line="5 WCTDM/0/4 FXSKS"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-zaptel
channel => 5
callerid=
group=
context=default
说明: "context=from-zaptel":在 FreePBX 中设置 DID 时查找端口
2、重启服务
需要重启 DAHDI 和 Asterisk:
/etc/init.d/dahdi restart
/etc/init.d/asterisk restart
3、设置 ZAP 端口对应号码
进入 FreePBX 中的"Zap Channel DIDs"项,点击"Add Channel"来添加端口,各设置项说明如下:
Channel: Zap端口号,与"dahdi-channels.conf"中的配置相对应。例如填写为"5"
Description: 端口的说明信息,如填写为“销售部直线1”
DID: 此端口所接外线的电话号码,可以任意填写,但建议按真实号码填写,并加上区号。例如“07558310000”
建议为所有 FXO 端口添加设置以方便以后使用。
4、添加呼入路由
进入 FreePBX 中的 "Inbound Routes" 项,点击 "Add Incoming Route" 添加一个呼入路由,各设置项说明如下:
DID Number: 填写上一步中设置的直线号码,如“07558310000”
然后在下边的"Set Destination"中设置呼入处理方案。例如设置为直接转分机则要选中“Extensions”并选择对应的分机号。
参考文章:HowTo: Elastix DAHDI Trunk Routing with DID
直线呼出设置
1、添加专用中继
进入 FreePBX 中的“Add a Trunk”项,点击“Add Zap Trunk (DAHDI compatibility mode)”链接
在上方的“Outbound Caller ID”设置项中可以填写此线路的电话号码,如“8310001”
在下方的“Zap Identifier (trunk name)”设置项中填写此直线在Zap设备上端口号,例如设置为“6”
点击下方的“Submit Changes”按钮提交
2、添加专用呼出路由
进入 FreePBX 中的“Outbound Routes”项,点击右侧的“Add Route”链接
填写路由设置
点击下方的“Submit Changes”按钮提交
路由设置中的各设置项说明如下:
Route Name: 填写路由名称,例如此条路由的拨出时显示的号码为“8310001”,拨外线时号码前要加拨3,可以命名为“3_8310001”
Route Password: 路由密码,如设置有密码分机拨打外线后时会提示要输入密码
Dial Patterns: 拨号模式设置,外线号码前加拨3的设置为“3|.”
Trunk Sequence: 中继续列,在这里我们选择上一步添加的中继“ZAP/6”
至此在分机上使用拨外机时在前面加拨3即可直接使用号码为“8310001”的线路。
注:为了防止抢线的现象发生,可以在"dahdi-channels.conf"配置文件中将6号端口的所属组"group"改为其它数字。
Forwarded from
http://www.haijd.net/article/index.php?action=read&id=806
进入 FreePBX 中的"Extensions"项,点击右侧的“Add Extension”链接
选择设备类型:“Generic SIP Device”为软电话,“Generic ZAP Device”为使用ZAP设备连接的电话机,“Other (Custom) Device”为自定义电话机。选好后点击“”按钮。
填写分机设置
分机设置时的各设置项说明如下:
Add Extension
User Extension: 分机号码,为3位以上的数字
Display Name: 分机用户名称
Device Options
secret: SIP 软电话登录密码
dtmfmode: SIP 软电话模式
channel: ZAP设备电话连接端口号
呼出设置
1、添加中继
进入 FreePBX 中的“Add a Trunk”项,点击“Add Zap Trunk (DAHDI compatibility mode)”链接
在下方的“Zap Identifier (trunk name)”的设置项中填写Zap端口信息,默认可以填为“g0”,表示可以使用"dahdi-channels.conf"文件中"group"为0的所有线路
点击下方的“Submit Changes”按钮提交
2、添加呼出路由
进入 FreePBX 中的“Outbound Routes”项,点击右侧的“Add Route”链接
填写路由设置
点击下方的“Submit Changes”按钮提交
路由设置中的各设置项说明如下:
Route Name: 填写路由名称,例如此条路由为外线号码前加拨9,可以命名为“9_outside”
Route Password: 路由密码,如设置有密码分机拨打外线后时会提示要输入密码
Dial Patterns: 拨号模式设置,外线号码前加拨9的设置为“9|.”
Trunk Sequence: 中继续列,在这里我们选择上一步添加的中继“ZAP/g0”
参考资料:Asterisk Dialplan命令中文翻译
呼入设置
进入 FreePBX 中的“Inbound Routes”项,点击右侧的“Add Incoming Route”链接
因为我们这里添加的是包含所有呼入的总路由,所以除了在下方的“Set Destination”中选择呼入处理外,其它的都不选择
点击下方的“Submit”按钮提交
呼入队列设置
1、添加队列
进入 FreePBX 中的“Queues”项,点击右侧的“Add Queue”链接
填写队列设置
点击下方的“Submit Changes”按钮提交
队列设置中的各设置项说明如下:
Queue Number: 队列号码(同分机号码),各分机可使用命令加入、退出队列
Queue Name: 队列名称,用来进行说明
Static Agents: 静态座席,可以使用下面的“”来快速的选择分机加入静态座席
2、添加呼入路由
进入 FreePBX 中的“Inbound Routes”项,点击右侧的“Add Incoming Route”链接来添加一个新路由
按需求设置上面的 DID 等设置项,最后在最下方的“Set Destination”中选中“”并选择上一步添加的队列
点击下方的“Submit”按钮提交
直线呼入设置
1、修改 DAHDI 的配置文件
修改配置文件"/etc/asterisk/dahdi-channels.conf",将其中各 FXO 口由以下设置:
;;; line="5 WCTDM/0/4 FXSKS"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 5
callerid=
group=
context=default
改为:
;;; line="5 WCTDM/0/4 FXSKS"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-zaptel
channel => 5
callerid=
group=
context=default
说明: "context=from-zaptel":在 FreePBX 中设置 DID 时查找端口
2、重启服务
需要重启 DAHDI 和 Asterisk:
/etc/init.d/dahdi restart
/etc/init.d/asterisk restart
3、设置 ZAP 端口对应号码
进入 FreePBX 中的"Zap Channel DIDs"项,点击"Add Channel"来添加端口,各设置项说明如下:
Channel: Zap端口号,与"dahdi-channels.conf"中的配置相对应。例如填写为"5"
Description: 端口的说明信息,如填写为“销售部直线1”
DID: 此端口所接外线的电话号码,可以任意填写,但建议按真实号码填写,并加上区号。例如“07558310000”
建议为所有 FXO 端口添加设置以方便以后使用。
4、添加呼入路由
进入 FreePBX 中的 "Inbound Routes" 项,点击 "Add Incoming Route" 添加一个呼入路由,各设置项说明如下:
DID Number: 填写上一步中设置的直线号码,如“07558310000”
然后在下边的"Set Destination"中设置呼入处理方案。例如设置为直接转分机则要选中“Extensions”并选择对应的分机号。
参考文章:HowTo: Elastix DAHDI Trunk Routing with DID
直线呼出设置
1、添加专用中继
进入 FreePBX 中的“Add a Trunk”项,点击“Add Zap Trunk (DAHDI compatibility mode)”链接
在上方的“Outbound Caller ID”设置项中可以填写此线路的电话号码,如“8310001”
在下方的“Zap Identifier (trunk name)”设置项中填写此直线在Zap设备上端口号,例如设置为“6”
点击下方的“Submit Changes”按钮提交
2、添加专用呼出路由
进入 FreePBX 中的“Outbound Routes”项,点击右侧的“Add Route”链接
填写路由设置
点击下方的“Submit Changes”按钮提交
路由设置中的各设置项说明如下:
Route Name: 填写路由名称,例如此条路由的拨出时显示的号码为“8310001”,拨外线时号码前要加拨3,可以命名为“3_8310001”
Route Password: 路由密码,如设置有密码分机拨打外线后时会提示要输入密码
Dial Patterns: 拨号模式设置,外线号码前加拨3的设置为“3|.”
Trunk Sequence: 中继续列,在这里我们选择上一步添加的中继“ZAP/6”
至此在分机上使用拨外机时在前面加拨3即可直接使用号码为“8310001”的线路。
注:为了防止抢线的现象发生,可以在"dahdi-channels.conf"配置文件中将6号端口的所属组"group"改为其它数字。
Forwarded from
http://www.haijd.net/article/index.php?action=read&id=806
2010年7月30日 星期五
T1有四种格式: IDAP、IDAC、IDAM、IDAR
D/240SC-T1 support all these 4 types:
IDA-P = ISDN PRI on T1 (ITU-T standard), using 4ESS protocol
IDA-M = DTMF on T1 (can use US CAS Global Call or direct DTMF+A/B bit programming)
IDA-R = R1 tones on T1 (rarely available now)
IDA-C = ITU C7(SS7) on T1 (D/240SC-T1 be the bearer circuit, and SIU/PCCS6 as signalling GW)
The card had been approved for IDA-P and IDA-M, while have references for IDA-C with DK's products.
IDA-P = ISDN PRI on T1 (ITU-T standard), using 4ESS protocol
IDA-M = DTMF on T1 (can use US CAS Global Call or direct DTMF+A/B bit programming)
IDA-R = R1 tones on T1 (rarely available now)
IDA-C = ITU C7(SS7) on T1 (D/240SC-T1 be the bearer circuit, and SIU/PCCS6 as signalling GW)
The card had been approved for IDA-P and IDA-M, while have references for IDA-C with DK's products.
My Bookmarks
Installing ADA (Asterisk Desktop Assistant) on Elastix
http://chillingsilence.wordpress.com/2010/05/11/installing-ada-asterisk-desktop-assistant-on-elastix/
http://chillingsilence.wordpress.com/2010/05/11/installing-ada-asterisk-desktop-assistant-on-elastix/
訂閱:
文章 (Atom)