centos alsa centos镜像
大家好,centos alsa相信很多的网友都不是很明白,包括centos镜像也是一样,不过没有关系,接下来就来为大家分享关于centos alsa和centos镜像的一些知识点,大家可以关注收藏,免得下次来找不到哦,下面我们开始吧!
如何在FreeSWITCH开源软交换安装Sangoma-A400模拟卡
FreeSWITCH是目前非常流行的开源软交换平台,支持IPPBX,软交换调度,IVR系统,呼叫中心等等解决方案,同时支持PSTN的接入方式。Sangoma模拟语音卡可以通过FreeTDM模块和freeSWITCH实现通信。
准备工作
检测板卡配件,确认板卡的RJ11配线,sangoma附件配置包含了RJ11的窄头线。
如果支持FXS,板卡必须上电。如果A400无FXS也需要上电。并且检测12V电脑电源接口
插入模拟板卡,确认支持PCI-E或者PCI卡
通过系统命令 lspci检查系统是否检测到语音板卡,执行系统命令,lspci-vvv,可以看到如下结果:
05:04.0 Network controller: Sangoma Technologies Corp. A200/Remora FXO/FXS Analog AFT card
Subsystem: NEC Corporation Device 1300
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium>TAbort-<TAbort-<MAbort->SERR-<PERR- INTx-
Latency: 255(1250ns min, 3750ns max)
Interrupt: pin A routed to IRQ 185
Region 0: Memory at f7200000(32-bit, non-prefetchable) [size=64K]
解压压缩包
tar xfz wanpipe-current.tgz
cd wanpipe-<version>.tgz
编译板卡驱动和freetdm
执行编译安装命令
make freetdm
make install
下载安装配置FreeSWITCH
安装linux Centos支持包
yum install expat-devel openssl-devel libtiff-devel libX11-devel unixODBC-devel libssl-devel python-devel\
zlib-devel libzrtpcpp-devel alsa-lib-devel libogg-devel libvorbis-devel perl-libs gdbm-devel\
libdb-devel uuid-devel@development-tools
安装git以后,使用git安装 freeSWITCH
安装FreeSWITCH
git clone git://git.freeswitch.org/freeswitch.git
cd freeswitch
./bootstrap.sh
编译前,添加freetdm模块,编辑modules.conf文件,注释掉libs/freetdm/mod_freetdm模块,保存文件。执行
./configure
make
make install
make all install cd-sounds-install cd-moh-install//安装语音文件和语音等待文件
配置Sangoma板卡文件
执行/usr/sbin/wancfg_fs命令,启动配置脚本,通过选项来一步步配置板卡
[root@localhost sbin]# wancfg_fs
########################################################################
# Sangoma Wanpipe#
# Dahdi/Zaptel/SMG/TDMAPI/BOOT Configuration Script#
# v2.39#
# Sangoma Technologies Inc.#
# Copyright(c) 2013.#
########################################################################
Would you like to change FreeSWITCH Configuration Directory?
Default:/usr/local/freeswitch/conf
1. NO
2. YES
[1-2, ENTER='NO']:1//选择默认安装目录
-------------------------------------------------------
Configuring T1/E1 cards [A101/A102/A104/A108/A116/T116]
-------------------------------------------------------
No Sangoma ISDN T1/E1 cards detected
Press any key to continue:
-------------------------------------------
Configuring ISDN BRI cards [A500/B500/B700]
-------------------------------------------
No Sangoma ISDN BRI cards detected
Press any key to continue:
------------------------------------
Configuring GSM cards [W400]
------------------------------------
No Sangoma GSM cards detected
Press any key to continue:
------------------------------------
Configuring analog cards [A200/A400/B600/B610/B700/B800]
------------------------------------
-----------------------------------------------------------
A400 detected on slot:4 bus:3
-----------------------------------------------------------
Would you like to configure AFT-400 on slot:4 bus:3
1. YES
2. NO
[1-2]:1//选择yes
Which codec will be used?
1. MULAW- North America
2. ALAW- Europe
[1-2]:2// ALAW
Which Operation Mode will be used?
1. FCC
2. TBR21
3. AUSTRALIA
[1-3, ENTER='FCC']: 1//无中国制式,暂时选择FCC。如果修改到中国制式,修改/etc/wanpipe/wanpipe1.conf文件的 TDMV_OPERMODE= CHINA
Press any key to continue:
AFT-400 configured on slot:4 bus:3 span:1
Analog card configuration complete
Press any key to continue:
------------------------------------
Configuring USB devices [U100]
------------------------------------
###################################################################
# SUMMARY#
###################################################################
0 T1/E1 port(s) detected, 0 configured
0 ISDN BRI port(s) detected, 0 configured
1 analog card(s) detected, 1 configured
0 GSM card(s) detected, 0 configured
0 usb device(s) detected, 0 configured
Configurator will create the following files:
1. Wanpipe config files in/etc/wanpipe
2. freetdm config file/usr/local/freeswitch/conf/freetdm.conf
3. freetdm_xml config file/usr/local/freeswitch/conf/freetdm.conf.xml
Your configuration has been saved in/etc/wanpipe/debug-2013-07-31.tgz.
When requesting support, email this file to techdesk@sangoma.com
###################################################################
Configuration Complete! Please select following:
1. YES- Continue
2. NO- Exit
[1-2]:1//选择继续
Wanpipe configuration complete: choose action
1. Save cfg: Stop Wanpipe now
2. Do not save cfg: Exit
[1-2]:1//选择立即停止wanpipe
sh: asterisk: command not found
sh: asterisk: command not found
Stopping Wanpipe...
Removing old configuration files...
Copying new Wanpipe configuration files...
Copying new freetdm configuration files(/usr/local/freeswitch/conf/freetdm.conf)...
Copying new freetdm configuration files(/usr/local/freeswitch/conf/autoload_configs/freetdm.conf.xml)...
Wanrouter start complete...
Current boot level is 3
Wanrouter boot scripts configuration...
Removing existing wanrouter boot scripts...OK
Would you like wanrouter to start on system boot?
1. YES
2. NO
[1-2]:1//选择系统自动启动
Verifying Zaptel boot scripts...
Enabling wanrouter boot scripts...(level:8)
Enabling wanrouter shutdown scripts...(level:91)
Sangoma cards configuration complete, exiting...
[root@localhost sbin]# reboot
Broadcast message from root(pts/1)(Wed Jul 31 20:13:04 2013):
The system is going down for reboot NOW!
[root@localhost sbin]#
检测板卡硬件
执行以下命令,检查板卡状态,先执行命令:wanrouter start,然后执行以下命令:
[root@localhost~]# wanrouter hwprobe
-------------------------------
| Wanpipe Hardware Probe Info|
-------------------------------
1. AFT-A400-SH�0�2: SLOT=4�0�2: BUS=3�0�2: IRQ=5�0�2: CPU=A�0�2: PORT=PRI�0�2: HWEC=0�0�2: V=11
Sangoma Card Count: A200=1
[root@localhost~]#
[root@localhost bin]# wanrouter status
Devices currently active:
wanpipe1
Wanpipe Config:
Device name| Protocol Map| Adapter| IRQ| Slot/IO| If's| CLK| Baud rate|
wanpipe1| N/A| A200/A400/B600/B700/B800/B610| 169| 4| 1| N/A| 0|
Wanrouter Status:
Device name| Protocol| Station| Status|
wanpipe1| A-ANALOG| N/A| Connected|
[root@localhost bin]#
检查配置freetdm.conf文件
这是FreeTDM配置文件.
编辑:/usr/local/freeSWITCH/conf/freetdm.conf文件
[span wanpipe FXO]
name=> freetdm
trunk_type=> fxo
group=> grp2
fxo-channel=> 1:7
number=> 29193553//必须设置线路电话号码
trunk_type=> fxo
group=> grp2
fxo-channel=> 1:8
number=> 29193554//必须设置线路电话号码
编辑/usr/local/freeswitch/conf/tones.conf�0�2文件,添加支持中国忙音,拨号音
[cn]
generate-dial=> v=-7;%(1000,0,450)
detect-dial=> 450
generate-ring=> v=-7;%(1000,4000,460)
detect-ring=> 460
generate-busy=> v=-7;%(350,350,460)
detect-busy=> 460
generate-attn=> v=0;%(100,100,1400,2060,2450,2600)
detect-attn=> 460
generate-callwaiting-sas=> v=0;%(300,0,440)
detect-callwaiting-sas=> 460
generate-callwaiting-cas=> v=0;%(80,0,2750,2130)
detect-callwaiting-cas=> 460
detect-fail1=> 913.8
detect-fail2=> 1370.6
detect-fail3=> 1776.7
编辑freetdm.conf.xml
autoload_configs/freetdm.conf.xml
<configuration name="freetdm.conf" description="FreeTDM Configuration">
<settings>
<param name="debug" value="4"/>
<param name="hold-music" value="$${moh_uri}"/>
</settings>
<!-- one entry here per freetdm span-->
<analog_spans>
<span name="FXS">
<!-- This is where the calls coming on this sapn will be directed-->
<param name="dialplan" value="XML"/>
<param name="context" value="fxs-ports"/>
<param name="enable_callerid" value="true"/><!-- This is the default value anyway-->
</span>
<span name="FXO">
<param name="dialplan" value="XML"/>
<param name="context" value="public"/>
<!-- Set this to the correct value for your area, to get the
correct tones on the phones connected to the FXS ports-->
<param name="tonegroup" value="cn"/>//设置到中国制式
<param name="enable_callerid" value="true"/>
</span>
</analog_spans>
</configuration>
在默认的FreeSWITCH启动模块中添加添加freetdm模块
编辑文件 vi/usr/local/freeswitch/conf/autoload_configs/modules.conf.xml删除注释,确认freetdm模块已经被添加
<load module="mod_freetdm"/>
检查ftdm模块加载状态
运行 fs_cli命令,进入到freeSWITCH CLI
freeswitch@internal> ftdm list
+OK
span: 1(FXO)
type: analog
physical_status: ok
signaling_status: UP
chan_count: 2
dialplan: XML
context: public
dial_regex:
fail_dial_regex:
hold_music:
analog_options: none
freeswitch@internal> ftdm dump 1 1
span_id: 1//逻辑组
chan_id: 1//逻辑端口,呼入呼出的拨号规则中使用此端口
physical_span_id: 1//物理组
physical_chan_id: 7//物理端口位置
physical_status: ok
physical_status_red: 0
physical_status_yellow: 0
physical_status_rai: 0
physical_status_blue: 0
physical_status_ais: 0
physical_status_general: 0
signaling_status: UP
type: FXO
state: DOWN
last_state: HANGUP
txgain: 0.00
rxgain: 0.00
cid_date:
cid_name:
cid_num:
ani:
aniII:
dnis:
rdnis:
cause: NONE
session:(none)
-- States---- Function---- Location---- Time Offset--
RING=> HANGUP [channel_on_hangup] [mod_freetdm.c:590] 0ms
HANGUP=> DOWN [ftdm_analog_channel_run] [ftmod_analog.c:562] 515ms
DOWN=> DIALING [analog_fxo_outgoing_call] [ftmod_analog.c:62] 161968ms
DIALING=> UP [ftdm_analog_channel_run] [ftmod_analog.c:509] 7900ms
UP=> HANGUP [channel_on_hangup] [
确认freetdm模块已经加载。
CentOS63264位安装AdobeFlashPlayer组件的方法
前几天一个网友在Linux CentOS6服务器中的某个需要远程操作的项目需要使用到Adobe Flash Player组件,直接通过YUM方式安装不了,于是通过强大的搜索,还是可以解决到安装方法的,通过重新加载安装Adobe RPM包后再YUM安装组件即可实现,这里就记录下来以便以后有需要。
第一、安装Adobe YUM RPM包
1、64位
复制代码代码如下:
rpm-ivh
rpm--import/etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
2、32位
复制代码代码如下:
rpm-ivh
rpm--import/etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
然后我们选择当前CENTOS6的版本执行。
第二、更新
复制代码代码如下:
yum check-update
第三、安装
复制代码代码如下:
yum install flash-plugin nspluginwrapper alsa-plugins-pulseaudio libcurl
执行命令安装,然后会有两处需要输入y回车。
最后,在安装完毕之后且没有报错基本就安装成功,然后登入我们的项目,比如浏览器可以看到Adobe Flash Player组件安装完毕。
CentOS使用MPlayer有图像无声音的解决方法
CentOS在安装完MPlayer后,有些人出现了有图像无声音的情况,而网上大部分都是Linux系统的解决方法,那么CentOS系统要如何解决呢?下面小编就给大家介绍下Linux使用MPlayer播放器无声音的解决方法。
步骤:
1.安装alsa相关的包,因为rhel6和centos6以上的版本使用声卡配置都是alsa了,所以声音可能与缺这个相关的包有关。
yum install-y*alsa*
2.下在解码包 all-xxxxx.tar.bz2
3.解压all-xxxxx.tar.bz2
tar-xf all-xxxxx.tar.bz2
4.创建一个文件夹
mkdir/usr/local/lib/codecs
5.进入all-xxxx
cd all-xxxxxx
6.将里面的所有文件移到第4部创建出来的文件夹中
mv-f/all-xxx/*/usr/local/lib/codecs
7.重新。/configure.这次加上参数--codecsdir=/usr/local/lib/codecs
。/configure--codecsdir=/usr/local/lib/codecs
8.make
9.make install
上面就是CentOS使用MPlayer无声音的解决方法的介绍了,MPlayer无声音很可能是缺少alsa包所导致,下载解码包解压,按照本文介绍的方法进行相关处理。