freeswitch centos安装,centos network is unreachable

大家好,关于freeswitch centos安装很多朋友都还不太明白,今天小编就来为大家分享关于centos network is unreachable的知识,希望对各位有所帮助!

如何在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模块已经加载。

freeswitch配置SBC实例

freeswitch是一款广受欢迎的开源软交换平台,其在voip客户发展与运营商网络升级换代背景下,SBC的应用场景日益增多。配置SBC实例时,只需简单安装freeswitch即可满足大部分功能需求。这里提供fs-sbc稳定版本的安装与配置步骤,以fs作为SBC的基本配置。

安装环境要求为CentOS版本7及以上,使用GCC 4.8.5进行fs1.10.7的编译安装。

对于fs1.10.7的安装过程和配置指南,建议参考文档“freeswitch1.10.7 on CENTOS7编译安装”。完成基础平台的安装后,进入fs-sbc的初始配置方案。

移除不必要的fs配置文件及bin脚本。fs的bin目录下应保留一些基本维护脚本。

防火墙配置至关重要。具体配置结果需根据实际情况调整。

fs作为SBC,其安全性是首要考虑因素。fs的基础功能已基本能满足SBC的需求,通过简单配置即可投入使用。

作为公私网信令与媒体通道,SBC的安全性至关重要。fs在系统配置上应保持简洁,确保功能稳定与高效。

总结,fs-sbc的配置需注重细节,特别是防火墙与安全配置。fs的基础功能已足够应对SBC的日常需求,配置时需确保系统稳定,避免不必要的复杂性。

Linux下建立多功能SIP服务器linuxsip服务器

本文介绍在Linux下如何建立一个多功能SIP服务器。SIP是一种基于文本的通信协议,在现在的市场上被使用得越来越多。本指南将介绍如何使用Linux来建立一个多功能的SIP服务器。

首先,你需要准备一台Linux服务器,安装并配置在这里,多功能的SIP服务器。可以使用一个特定的网络服务器或主机,例如Redhat或CentOS,来安装这些服务器。安装过程非常简单,也可以使用类似Webmin的管理工具来完成安装过程,只需安装几个包就可以了。

其次,你需要为服务器提供SIP协议要求的软件和配置文件。主要使用的软件包括Asterisk和FreeSWITCH,可以使用Asterisk或FreeSWITCH组合来构建服务器。它们提供了一个友好的web界面,可以使用它们来配置协议,服务器,账户等等。

下一步,你可以通过调用以下代码来启动服务器:

`#/usr/sbin/asterisk-vvvgx`

或者

`#/usr/sbin/freeswitch-nc`

启动服务后,你可以执行一些类似的操作来完成服务器的配置:

–配置服务器的IP地址

–添加域名,账户,用户等

–添加服务器的监听端口

–根据需要设置防火墙

–为服务器添加SSL证书

–启用STUN服务等

最后,你将可以使用SIP服务器提供服务,这样你可以使用这个服务发送语音,文本,视频等数据。我们也建议使用一些相应的监控和管理工具,以便系统性地维护服务器,尤其是像安全扫描这样的重要性能监控工具。

综上所述,使用Linux部署多功能SIP服务器比较容易,只需要确定一些配置和软件,并启动服务器就可以了。在本指南中,我们介绍了如何使用Linux来构建一个多功能SIP服务器,下一步就是开始应用这个服务器,实现自己所需要的业务需求。

阅读剩余
THE END