-
Getting Started
Guide
入门指南
From
FreeSWITCH Wiki
从
FreeSWITCH
p>
维基
Jump to: ,
跳转到:
导航
,
搜索
The purpose
of the following page is to instruct new users on
how to configure
FreeSWITCH? in a basic
way.
以下网页的目的,是指导新用户如何配置
FreeSW
ITCH?的一个
基本方式。
It is also
intended to provide people with a basic
understanding of the
configuration
files and how they are processed.
这也是为了提
供一个配置文件的基本了
解的人以及他们如何处理。
If
FreeSWITCH?
i
s
not
already
installed
on
your
system
you
should
read
the .
如果
FreeSWITC
H?不是已经安装在您的系统,
你应该阅读
安装指南
。
This
guide is not intended to allow for more
than a default configuration.
本指南不打算
让超过默认配置。
FreeSWITCH
布局
FreeSWITCH?
has
a
modular
design.
FreeSWITCH?采用模块化设计。
This
design
allows
it
to
be
extended
without
breaking
functionality
or
requiring
massive
recoding
efforts.
这种设计允许它在不破坏的功能或要求重新编写大量的努力延长。
Each module provides
specific
functionality,
often
commands
that
are
related
are
grouped
into
one
module.
每个模块都提
供特定的功能,往往是相关的命令是在一个模块进行分组。
You will need to
enable the
modules that you desire, based on their function.<
/p>
您将需要启用,你的愿
望,
根据他们的功
能模块。
By
default
FreeSWITCH?
comes
with
a
good
set
of
modules
loaded,
to enable most basic
functionality.
默认情况下
FreeSWITC
H?附带了一个良好的加载模块
设置,使最基本的功能。
Read up on the for more
information.
阅读上的更多信息,
配置的默认
。
配置
The following
sections will show you each step that you will
have to take to get a
functional system
.
下面的章节将告诉你每一步,你将不得不采取获得功能系统。
防火墙
If you are going to route traffic
across your network, you need to ensure that you
do not have a firewall blocking traffic
on the specified network paths.
如果你想在
您的网络传输流量,你需要确保你没有防火墙阻止指定的网络路径流量。
Commonly
firewalls are
installed at egress points, where your local
network connects to the
internet.
常见的防火墙是安装在出口点,在您的本地网络连接到互联网。
This is not
always
the
case
in
some
corporate
en
vironments.
这并不总是在一些企业环境的情况。
If
you are not responsible
for your network, you may wish to contact the
group or
individuals that are for assis
tance.
如果您没有为您的网络负责,您可能希望联络小组
或个人的援助。
Information they
may need to enable traffic would include the port
numbers.
他们可
能需要的信息,使交通将包括端口号。
Various protocols use
different ports for
different
things.
各种协议的不同的使用不同的端口。
Some you need bi-directional
connectivity, some you only need outbou
nd.
一些你需要的双向连接,有些你只需要出站。
Depending on your call scenario you may
only need to allow connections that are
initiated by your system. If you have
any problems with protocols not working, it
is recommended that you disable your
firewall to the FreeSWITCH? system and place
a test call and see if the problem
persists. Commonly people who have problems have
a misconfigured firewall that is
creating the problem.
根据您的要求的情况你可能只
需要允许该由你的系统发起的连接。
如果您有任
何问题的协议不工作,
建议您禁用防火墙的
FreeSWITC
H?系统和地点通话测试
,
看看该问题仍然存在。
常见的有问题的人谁具有防火墙
的配置错误是造成上述问题。
Network
FireWall
Ports
防
Protocol
网
p>
Application
Protocol
应用协议
火墙中的端口
络协议
Description
描述
1719
1720
3478
3479
5002
5003
UDP
TCP
UDP
UDP
TCP
UDP
H.323
Gatekeeper RAS port
H.323 Call
Signalling
STUN service
STUN service
MLP protocol
server
Neighborhood service
Used for NAT traversal
用于
NAT
穿
越
Used for NAT traver
sal
用于
NAT
穿
< br>越
5060
UDP & TCP
SIP UAS
Used for SIP signalling
(Standard
SIP
Port,
for
default
Internal
Profile)
用于
SIP
信令
(标准
SIP
端口,
默认内部资料)
Used
for
SIP
signalling
(For
default
Profile)
用于为
SIP
信
令(对于默认“的
NAT”专页)
< br>
Used
for
SIP
signalling
(For
default
用于为<
/p>
SIP
信令(对于默认“外部”专页)
Used
for
audio/video
data
in
SIP
and
other protocols
用于
SIP
音频
/
视频
5070
UDP & TCP SIP UAS
5080
UDP & TCP SIP UAS
RTP/ RTCP multimedia
streaming
16384-32768
UDP
数据中和其他协议数据
配置文件
FreeSWITCH? configuration data is
stored in XML format.
FreeSW
ITCH?配置数据存储在
XML
格式文件。
< br>
These files are located in the conf
directory under the FreeSWITCH?
install
directory.
这些文件位于下
FreeSWITCH?conf
directory
的目录。
By
default
on
a
Unix-like system this will be
/usr/local/freeswitch/conf.
默认情况下,在
Unix
系
统上,
这将是
/usr/local/fre
eswitch/conf
。
There
are
preprocessor
markup
tags
that
tell
the configuration parser to perform
tasks, such as including other files, which are
carried out before the XML is parsed.
p>
有预处理标记标签,告诉配置分析器来执行任务,
如包括其他文件,
这是前进行的
XML
时,被解析。
Folder
文件夹
Description
描述
These configuration files
are loaded automatically into FreeSWITCH.
这些配置
autoload_configs
文件自动加载到
FreeSWITCH
。
They
contain
configuration
information
for
almost
all
core
modules.
它们包含了几乎所有的核心模块的配置信息。
dialplan
This is the place where you setup your
dialplan.
这是你的地方设置你的拨号规
则。
There are some examples of how to
configure your dialplan included.
有
如何配置您的拨号规则包括一些例子。
The
directory
contains
all
users
that
may
register
and
use
freeswitch
as
their
PBX.
该目录包含所有
的用户都可以登记,并以此为他们的
PBX
freeswitch
。
directory
Jingle
is the mod that FS uses to handle XMPP.
丁当是
FS
使用处理
< br>XMPP
的
mod
。
jingle_profiles
Profiles
tells
FS
how
to
use
the
protocol.
档案文件告诉
FS
如何使用协议。
Each
profile has it's own ip por
t.
每个配置文件有它自己的
IP
端口
。
lang
mrcp_profiles
sip_profiles
Tells FS how to say currency etc in
different languages
告诉
FS
如何用不同的
语言
MRCP is used to allow FreeSWITCH to use
speech recognition and TTS
MRCP
< br>是用
来允许
FreeSWITCH
使用语音识别和语音合成
Tells
FS
how
to
talk
sip.
告诉
FS
如何对话
SIP
。
Each
profile
has
it's
own
port.
每个配置文件有它自己的端口。
配置
FreeSWITCH
This guide aims to explain the default
configuration layout and how you configure
it
to
your
liking.
本指南旨在解释默认配置的布局,
以
及如何配置它,
你自己的喜好。
Read
up on the for more inf
ormation.
阅读
配置的默认
上
的更多信息,
。
This layout is in no way
required, you can minimize the configuration to
just one
file
if
needed.
这种布局在任何需要的方式,
您可以配置,
p>
以最大限度地减少只是一个文件,
如果需要的。
The
main
config
file
is
called
,
you
don't
need
to
change
it in any way, it
just loads all other config files.
主要的配置
文件被称为
,你不必以任何方式改变它,它只是加载所有其他的
配置文件。
is
used
to
define
a
couple
of
variables
that
are
used
system
wide.
用于定义两个是使用的系统广泛的变量。
NOTICE
you
can
not
comment
these
X-PRE-PROCESS
lines
out.
公告您不能注释这些
X-PRE-
PROCESS
行。
They
will still be active in an XML
comment.
他们仍将
XML
注释中的活动。。
See
for example.
看例子
Config_
In the default configuration the
file is used to define some preprocessor
variables.
在默认配置中
文件是用来定义一些预处理变量。
In
a
first
time
setup
you will most likely want to
set:
是在第一次安装最有可能想要设置:
<
br>这个目录位于 freeswitch <
br>
directives for use in other
portions of the configuration.
用于配置的其他部分中的
指令。
The default port of Freeswitch is also
defined in
Freeswitch
默认端口也被定
义在里
面
自动加载配置
autoload_configs
is
a
directory
where
a
lot
of
the
freeswitch
configuration
resides.
autoload_configs autoload_configs
是很多
freeswitch
配置文件保存的目录。
This
directory
is located in
$$PREFIX/conf/autoload_configs.
$$PREFIX/conf/autoload_configs<
/p>
。
The default
preprocesses xml files
matched by the
glob conf/autoload_configs/*.xml
默认
预先处理(自
动加载)
conf/autoload_configs/*.xml
里面匹配的
XML
文件
See for an example of .
看一个<
/p>
的例子
。
tells freeswitch which
modules to load.
告诉
加载哪些模块。
There are certain modules required for
operation so you
should not edit this
file unless you know that you wish to add or
remove a specific
module
有操作所
需要的某些模块,因此你不能编辑这个文件,除非你知道你想添加或删除特
定模块
mod_sofia is used to create SIP
endpoints in FreeSWITCH.
模块<
/p>
sofia
是用于创建
SIP
终端到
FreeSWITCH
。
If
you
are
familiar
with
Asterisk,
each
SIP
Profile
in
mod_sofia
is similar to
chan_sip in Asterisk, though much more powerful.
p>
如果您熟悉
Asterisk
,
每个
mod_sofia
的
SIP
档案类似
Asterisk
的
chan_sip
,但更强大。
The
file
contains
a
directive
that
includes
other
XML
files
(within,
by
default,
conf/sip_profiles/)
that
define
one
or
more
Profiles
该
文件包含的<
/p>
指令,其中包括其他
XML
文件(在默认情况
下,
conf/sip_prof
iles/
),定义一个或多个“
SIP
档案文件”。
A SIP Profile is a SIP
UA (User Agent or an endpoint), which
communicates with other SIP endpoints.
一个
SIP UA
(用户代理或终结点)
与
SIP
的其他终结点进行通信的
SIP
的配置文件。
A
Agent
(
is
an
application
used
for
running
a
certain
network
protocol.
“用户代理”(“
UA
”)是运行在一定的网络协议使用的应用程序。
A
Sofia
User
Agent
is
the same thing but the
protocol in that case is SIP.
这个
< br>Sofia
用户代理是同样的事
情,但如果是在那应样的
话协议是
SIP
。
In FreeSWITCH terms, User Agent = UA =
Sofia
Profile = SIP Profile.
在
FreeSWITCH
方面,
Use
r Agent = UA = Sofia Profile = SIP
Profile.
。
See for
an
example
.
看例子
S
ofia_Configuration_Files
。
See also .
另见
SIP<
/p>
在维基百科网络元素
。
SIP
档案文件
The SIP
Profiles in FreeSWITCH can often lead to
confusion.
在
FreeSWITCH SIP
的
配置文件通常会导致混乱。
Unlike other softswitches (like Asterisk),
FreeSWITCH
allows you to handle media
(calls, video, etc.) differently based on where
the
equipment
is
attached
to
your
network.
不同
(如
Asterisk
)
其他软,
不同的应用
FreeSWITCH
允许您在处理不同的设备相连网络的媒体
(
< br>电话,
视频,
等)
。
This
assists
with
security
as well as
providing added functionality.
这有助于安全,并提
供额外的功能。
SIP Profiles allow
you to define paths to devices or carriers that
may live inside
or outside your
network.
SIP
的配置文件可用于定义路径的设备或
运营商可住内部或外部
网络。
These paths
can be of many different types, but must consist
of a unique
combination of port and IP
pairs.
这些路径可以有许多不同的类型,但必须由一个端口和
IP
对独特的组合。
You
could
have
SIP
profiles
for
your
internal
network,
or
multiple
profiles for each subnet of your
internal network, or even completely different
protocols
like
IPv6
as
profile <
/p>
definitions.
你可能对您的内部网络,即每您的内部
网络,
或者类似的文件定义甚至完全不同的
IPv6
协议的子网的
SIP
配置多个配置文件。
This
helps
FreeSWITCH identify how to route
different types of calls when necessary, and also
gives
you
the
flexibility
to
tailor
your
dialplans
based
on
what
path
a
call
originates
to/from.
这可以帮助
FreeSWITCH
确定如何路线不同类型的要求
< br>,
必要时
,
还能让你的灵活性<
/p>
,
以调整你的拨号方案基于路径的一个叫来源于
< br>/
。
In
the
sample
configuration
there
are
three
default
categories
for
where
a
SIP
Profile
can
resid
e.
在示例配置有
3
个在一个
SIP
文件可以驻留默认类别。
Each
profile
is
detailed
below.
每个
配置文件的详细情况如下。
SIP_Profiles
The default
profiles are
so it would be wise to
understand what they do.
默认配置文件是
< br>(
“内部”和“外部”,都提供了特殊用途,所以明智的
做法是了解他们所做的
事情。
内部
File
Location: $$PREFIX/conf/sip_profiles/
文件位
置:
$$PREFIX/conf/
sip_profiles
/
This profile generally refers to
devices that reside on your internal network.
此
配置文件通常是指设备驻留在您的内部网络。
Those devices will inherit all
configuration options in the internal
profile you setup.
这些设备将继承内部文件的
所有配置选项设置。
This is typically your
internal phones with extensions.
这通常
是与扩展您的内部电话。
By default, these
devices must use SIP authentication.
默认<
/p>
情况下,这些设备必须使用
SIP
认证。
The Internal (formerly
called
primary IP address of the
machine (unless you set $$$${domain} to something
else in
) on port 5060 (the default SIP
port).
内部(以前称为
)的
p>
SIP
配
置文件被配置为侦听的主
IP
地址的机器
(除非您设置域
$$$${domain}
的东西在
其他)
在端口
5060
(默认
SIP
端口)。
The internal SIP profile does
authenticate calls and
is
not
suitable
for
configuring
trunks
to
providers
or
outside
phones,
in
most
cases
(ie,
use
the
External
profile
for
configuring
trunks
to
providers
or
outside
phones).
内部的
SIP
(例如,使用外部配置文件的配置中继或外部电话)。
The Internal profile should be used if
you intend on handling registration for sip
clients
(ie
a
SIP
registrar).
内部
配置文件应使用如果您在处理
SIP
客户端注册的打算
(即
SIP
注册)。
You
may
wish
to
skip
to
the
section to
configure
additional
sip
clients.
你可能希望
跳到
Getting_Started_Guide#directory
配置部分另外的的
SIP
客户端。
Authenticated
users
of
this
profile
are
normally
set
(via
the
variable
user_context)
to
use
the
dialplan
defined
in .
这个文件
验证的用户通常设置(通过变量
user_context
)<
/p>
使用
default
context
.
定义的拨号规则。
See
见
Config_
外部
File Location: $$PREFIX/conf/sip_profile
s/
文件位置:
$$PREFIX/conf/
sip_profiles /
This
profile generally refers to devices or gateways
that reside outside of your
network.
此配置文件,一般是指设备或网关外的网络。
Generally
this
is
where
you
define
your external trunks/VoIP
carriers/etc.
通常这是您定义您的外部中继线
/
VoIP
运营商
/
等。
Again, those devices will inherit all
configuration options in the external
profile you setup.
同样,这些设备将继承
在外部配置文件的所有配置选项设置。
The
External (formerly
provider.
外部
(先前
)
配置文件处理出站登记,
SIP
的供应商。
The
SIP
provider
sends
calls
to
you,
and
you
send
calls
to
your
provider,
through
the
external
prof
ile.
供应商发送的
SIP
要求你,
你调用发送到您的提供商,
通过外部形象。
The
external
profile
allows
anonymous
calling,
which
is
required
as
your
provider
will
never
authenticate
with you to send you a call.
外部配置文件允许匿名电话,这是你的供应商需要将永远与
您进行身份验证向您发出的呼
吁。
In order to secure your
FreeSWITCH it is wise to link your outbound
profile to a
dialplan
context
other
than
'default',
which
in
the
default
configuration
is
the
where
authenticated users are placed.
< br>为了获取您的
FreeSWITCH
与拨号方案的安全,
您的向外
去外形除‘缺省之外’是明智的,它在默认配置是在身份验证的用户的位置。<
/p>
NOTE: The default port for
external connections is 5080.
注意:
为外部连接的默认端
口是
5
080
。
This also means if you
are trying to connect a phone remotely to your
FreeSWITCH
box,
you
must
set
it
to
connect
on
port
5080,
or
change
your
ports
around.
这也意味
着,如果您尝试远程连接到您的手机
FreeSWITCH
框,
您必须将其连接到端口
5080
,
或者
改变你的端口。
This
confuses
a
lot
of
people.
这混淆了很多人。
As
an
example,
in
X-Lite, if you are
connecting to FS from the outside, set your server
as
作为一个例子,在
X
光宝,如果你是从外部连接,设置为
“:5080”。
The dialplan for this profile (per-
default) is defined in
此配置文件的拨号规则(每
默认)在
的定义
See
见
Config_
NAT
的
The file (and profile) have been depre
cated.
该
文件(和配置文件)<
/p>
已被弃用。
Use the
External Profile and port 5080.
使用外部配置文件
和端口
5080
。
其他配置文件概念
Ideas for other SIP profiles you might
end up building:
其他
SIP
配置文件的意见你
可能最终建筑:
?
?
?
Routing
IPv6
IPv6
的路由
Having multiple profiles for different
networks or subnets
经对不同的网络或子网多个配
置文件
Having multiple
profiles for different remote hosts/endpoints
(remote offices, etc.)
经对不同的远程主机多个配置文件
p>
/
端点(远程办公室等)
拨号规则
The FreeSWITCH dialplan is a full-
featured, XML-based call-routing mechanism.
该
FreeSWITCH
拨号规则是一个全功能的,基
于
XML
的呼叫路由机制。
(There also exists
support
for
Asterisk-like
dialplans
as
well
as
really
fancy
real-time
and/or
back-end
database-driven
dialplans.) The best place to get started in
learning about the
FreeSWITCH dialplan
is the page here on the wiki.
(此外,还存在<
/p>
Asterisk
的支持,
如拨号方案以
及真正花式实时和
/
或后端数据库驱动拨号方案。)的最佳位置
大约在
FreeSWITCH
拨号规则学习的开始是拨号规则页
的维基这里。
It
discusses
the
basics
of
the
FreeSWITCH dialplan.
它讨论了
FreeSWITCH
拨号规则的基础
知识。
If you need an XML
primer
check
out
the
information
on
the page
which
will
get
you
pointed
in
the
right
directi
on.
如果您需要内,有关
Basic_XML
网页将让你在正确的方向信息的
XML
底漆检查。
p>
There
are
two
other
important
resources
for
you
to
learn
more
about
the
diaplan:
the
small-but-growing page as well as the
that comes with a standard FreeSWITCH
i
nstallation.
有两个其他重要资源,您了解
dia
plan
:小,但增长
Dialplan_Recipes
p>
页以
上,以及默认的拨号规则与标准
Fre
eSWITCH
安装中。
It
is
recommended
that
you
compile
FreeSWITCH
with
the
default
configuration
and
make
sure it works before
you start making customizations.
我们建议您编译
默认的配置
FreeSWTICH
和确保它工作,然后再开始做
自定义。
Note that the default
config files,
including the dialplan,
are still being updated.
请注意,默认的配置文
件,
包括
的拨号规则,<
/p>
现正被更新。
It
makes
sense
to
put
your
custom
diaplan
entries into the
extensions subdirectory under conf/dialplan.
是有道理的
conf
置于
您
的自定义
diaplan
项目
扩展
p>
到子目录
/
拨号规则。
You may
create one or
more XML files
in this
subdirectory, all of which will be included in the
dialplan thanks to an
您可以创建一
个或多个在这个子目录
XML
文件,所有这些都将在一个“包括
”在
的文件指令包含的拨号规则感谢。
By
keeping your customized
extensions separate from you will be able to
update without having to re-enter your
custom extensions.
通过保持你的
个性化扩
展的
的你将能够更新
< br>的独立,而不必重新输入您的自定
义扩展。
用于测试一些常用的扩展
?
?
?
?
1000, 1001, ..., 1019 - Generic SIP
extensions 1000
,
1001
< br>,
...
,
1019 -
通用
SIP
扩展
5000 - demo IVR (requires sounds and
music files to be installed)
5000 -
演示的
IVR
(需
要声
音和音乐文件被安装)
9995 - five
second delay echo test
9995
-
五秒延迟回波测试
9996 -
standard echo test
9996
-
回波测试标准
?
9999 - music on
hold (requires music files to be
installed)
9999
搁置
-
音乐(音乐文件需
要安装)
目录
See for a sample configuration.
见一个示例配置
Config_
。
The directory holds authentication
credentials for other sip endpoints that will
register to freeswitch (most commonly u
sers).
该目录保存的其他
SIP
终端,将登记
freeswitch
(最常见的用户)身份验证
凭据。
The directory
configuration default is
configured to
process the glob
$$PREFIX/conf/directory/default/*.xml by the
configuration included in $$PREFIX/conf
/directory/*.xml.
该目录默认
配置配置为处
理的
glob
$$PREFIX/conf/directory/default/*.xml
的包括
$$PREFIX/conf/
directory/*.xml.
的。
This may seem confusing but the default
will work in most cases.
这似乎令人困惑,
但默认将在大多数情况下。
Feel free
to look at the examples in:
$$PREFIX/con
f/directory/
随意看看在例子:
$$PREFIX/conf/directory/
用户配置
see for a
simple ()
configuration
of a
user (endpoint) which will
register
to
freeswitch.
看到一
个简单
(
Config_
)
的用户
(终端)
,
p>
将登记
freeswitch
配置。
样本网关配置
See for sample gateway configurations
for different providers.
见为不同供应商的样
本网关配置
SIP
提供者的例子
。
outbound
registrations to providers can also be made in the
outbound profile.
出
站登记的供应商也可
以在出站的形象。
see this page for
a clarification
见
此解释页
通过网关进行拨号
Add
the
following
to
(in
prefix
/conf/dialplan)
for
11
digit
dialing
(US)
via your newly created
gateway configuration above.
以下添加到
文件(在
prefix
/conf/dialplan
)为
11
位拨号(美国)。
Remember, the
default configuration
provided by
FreeSWITCH does not include a diaplan rule for
outbound calls via the
gateway you've d
efined.
请记住,默认配置
FreeSWITCH
提供不包括为通过您所定义的网关
呼出拨号规则。
You will need to add something
similar to the following.
您将需要添
加类似以下。
—拨任意
10
数字
(2223334444)
或
1+10
号码
()
这里
-->
如果您的提供商不提供回铃音(
180
或
183
),你可
以模拟下面的注释行回铃音。
您的供应商或任何你想呼叫的名称
If you want users to
register with something other than the number that
will reach
them, then is for you.
如果您希望用户注册的东西超过了他们将达到他们的话,
等是为
您。
**Note:
Not
all
providers
work
this
way,
if
you
have
difficulty
with
routing
incoming
calls from your provider look in the
Wiki section for .
**
注意:
不是所有的供应商
合作
,
这样,如果您有您的路由在为
提供的例子
看维基部分供应商来电困难。
运行
FreeSWITCH
Starting
FreeSWITCH?
is
done
from
the
command
-line.
开始
FreeSWITCH?完成命令行。
The
location of the
executable varies depending on your system.
可执行文件的位置取决于
您的系统。
-
-
-
-
-
-
-
-
-
上一篇:《管子·权修》原文及现代文注解
下一篇:办公厅工作要严而又严 细而又细