资源描述
Getting Started Guide入门指南
From FreeSWITCH Wiki从FreeSWITCH维基
Jump to: navigation , search跳转到: 导航 , 搜索
The purpose of the following page is to instruct new users on how to configure FreeSWITCH™ in a basic way.以下网页的目的,是指导新用户如何配置FreeSWITCH™的一个基本方式。 It is also intended to provide people with a basic understanding of the configuration files and how they are processed.这也是为了提供一个配置文件的基本了解的人以及他们如何处理。 If FreeSWITCH™ is not already installed on your system you should read the Installation Guide .如果FreeSWITCH™不是已经安装在您的系统,你应该阅读安装指南 。 This guide is not intended to allow for more than a default configuration.本指南不打算让超过默认配置。
FreeSWITCH layout 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.您将需要启用,你的愿望,根据他们的功能模块。 By default FreeSWITCH™ comes with a good set of modules loaded, to enable most basic functionality.默认情况下FreeSWITCH™附带了一个良好的加载模块设置,使最基本的功能。
Read up on the default config for more information.阅读上的更多信息, 配置的默认 。
Configuration 配置
The following sections will show you each step that you will have to take to get a functional system.下面的章节将告诉你每一步,你将不得不采取获得功能系统。
Firewall 防火墙
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 environments.这并不总是在一些企业环境的情况。 If you are not responsible for your network, you may wish to contact the group or individuals that are for assistance.如果您没有为您的网络负责,您可能希望联络小组或个人的援助。
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 outbound.一些你需要的双向连接,有些你只需要出站。 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.根据您的要求的情况你可能只需要允许该由你的系统发起的连接。 如果您有任何问题的协议不工作,建议您禁用防火墙的FreeSWITCH™系统和地点通话测试 , 看看该问题仍然存在。常见的有问题的人谁具有防火墙的配置错误是造成上述问题。
FireWall Ports防火墙中的端口
Network Protocol网络协议
Application Protocol应用协议
Description描述
1719
UDP
H.323 Gatekeeper RAS port
1720
TCP
H.323 Call Signalling
3478
UDP
STUN service
Used for NAT traversal用于NAT穿越
3479
UDP
STUN service
Used for NAT traversal用于NAT穿越
5002
TCP
MLP protocol server
5003
UDP
Neighborhood service
5060
UDP & TCP
SIP UAS
Used for SIP signalling (Standard SIP Port, for default Internal Profile)用于SIP信令(标准SIP端口,默认内部资料)
5070
UDP & TCP
SIP UAS
Used for SIP signalling (For default "NAT" Profile)用于为SIP信令(对于默认“的NAT”专页)
5080
UDP & TCP
SIP UAS
Used for SIP signalling (For default "External" Profile)用于为SIP信令(对于默认“外部”专页)
16384-32768
UDP
RTP/ RTCP multimedia streaming
Used for audio/video data in SIP and other protocols用于SIP音频/视频数据中和其他协议数据
Configuration Files 配置文件
FreeSWITCH™ configuration data is stored in XML format. FreeSWITCH™配置数据存储在XML格式文件。 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/freeswitch/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.有预处理标记标签,告诉配置分析器来执行任务,如包括其他文件,这是前进行的XML时,被解析。
Folder文件夹
Description描述
autoload_configs
These configuration files are loaded automatically into FreeSWITCH.这些配置文件自动加载到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.有如何配置您的拨号规则包括一些例子。
directory
The directory contains all users that may register and use freeswitch as their PBX.该目录包含所有的用户都可以登记,并以此为他们的PBX freeswitch。
jingle_profiles
Jingle is the mod that FS uses to handle XMPP. 丁当是FS使用处理XMPP的mod。 Profiles tells FS how to use the protocol. 档案文件告诉FS如何使用协议。 Each profile has it's own ip port.每个配置文件有它自己的IP端口。
lang
Tells FS how to say currency etc in different languages告诉FS如何用不同的语言
mrcp_profiles
MRCP is used to allow FreeSWITCH to use speech recognition and TTS MRCP是用来允许FreeSWITCH使用语音识别和语音合成
sip_profiles
Tells FS how to talk sip. 告诉FS如何对话SIP。 Each profile has it's own port.每个配置文件有它自己的端口。
Configuring FreeSWITCH 配置FreeSWITCH
This guide aims to explain the default configuration layout and how you configure it to your liking.本指南旨在解释默认配置的布局,以及如何配置它,你自己的喜好。 Read up on the default config for more information.阅读配置的默认上的更多信息, 。
This layout is in no way required, you can minimize the configuration to just one file if needed.这种布局在任何需要的方式,您可以配置,以最大限度地减少只是一个文件,如果需要的。 The main config file is called freeswitch.xml, you don't need to change it in any way, it just loads all other config files.主要的配置文件被称为freeswitch.xml,你不必以任何方式改变它,它只是加载所有其他的配置文件。
vars.xml vars.xml
vars.xml is used to define a couple of variables that are used system wide. vars.xml 用于定义两个是使用的系统广泛的变量。 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 Config_vars.xml for example.看例子Config_vars.xml
In the default configuration the vars.xml file is used to define some preprocessor variables.在默认配置中vars.xml文件是用来定义一些预处理变量。 In a first time setup you will most likely want to set:是在第一次安装最有可能想要设置:
<X-PRE-PROCESS cmd="set" data="outbound_caller_name=FreeSWITCH"/>
<X-PRE-PROCESS cmd="set" data="outbound_caller_id=8777423583"/>
<X-PRE-PROCESS cmd="set" data="call_debug=false"/>
directives for use in other portions of the configuration. 用于配置的其他部分中的指令。
The default port of Freeswitch is also defined in Freeswitch默认端口也被定义在里面
<param name="sip-port" value="5060" />
autoload_configs 自动加载配置
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。 The default freeswitch.xml preprocesses xml files matched by the glob conf/autoload_configs/*.xml默认 freeswitch.xml 预先处理(自动加载)conf/autoload_configs/*.xml 里面匹配的 XML 文件
modules.conf.xml modules.conf.xml
See modules.conf.xml for an example of modules.conf.xml.看一个modules.conf.xml的例子modules.conf.xml。
modules.conf.xml tells freeswitch which modules to load. modules.conf.xml告诉freeswitch加载哪些模块。 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有操作所需要的某些模块,因此你不能编辑这个文件,除非你知道你想添加或删除特定模块
sofia.conf.xml sofia.conf.xml
mod_sofia is used to create SIP endpoints in FreeSWITCH. 模块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.如果您熟悉Asterisk,每个mod_sofia 的SIP档案类似Asterisk 的chan_sip,但更强大。
The sofia.conf.xml file contains a "X-PRE-PROCESS" directive that includes other XML files (within, by default, conf/sip_profiles/) that define one or more "SIP Profiles".该sofia.conf.xml文件包含的"X-PRE-PROCESS"指令,其中包括其他XML文件(在默认情况下,conf/sip_profiles/),定义一个或多个“SIP档案文件”。 A SIP Profile is a SIP UA (User Agent or an endpoint), which communicates with other SIP endpoints. 一个 SIP UA (用户代理或终结点) 与 SIP 的其他终结点进行通信的 SIP的配置文件。
A "User Agent" ("UA") 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.这个Sofia用户代理是同样的事情,但如果是在那应样的话协议是SIP。 In FreeSWITCH terms, User Agent = UA = Sofia Profile = SIP Profile.在FreeSWITCH方面,User Agent = UA = Sofia Profile = SIP Profile.。
See Sofia_Configuration_Files for an example sofia.conf.xml.看例子sofia.conf.xml Sofia_Configuration_Files。
See also SIP Network Elements on wikipedia .另见SIP在维基百科网络元素 。
What SIP Profiles Do 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 允许您在处理不同的设备相连网络的媒体 (电话,视频,等)。 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 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确定如何路线不同类型的要求,必要时,还能让你的灵活性,以调整你的拨号方案基于路径的一个叫来源于/。
In the sample configuration there are three default categories for where a SIP Profile can reside.在示例配置有3个在一个SIP文件可以驻留默认类别。 Each profile is detailed below.每个配置文件的详细情况如下。
SIP_Profiles SIP_Profiles
The default profiles are "internal" and "external", each serves a special purpose so it would be wise to understand what they do.默认配置文件是("internal" and "external",) “内部”和“外部”,都提供了特殊用途,所以明智的做法是了解他们所做的事情。
Internal 内部
File Location: $PREFIX/conf/sip_profiles/internal.xml文件位置:$PREFIX/conf/ sip_profiles / internal.xml
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.默认情况下,这些设备必须使用SIP认证。
The Internal (formerly called "default") SIP profile is configured to listen on the primary IP address of the machine (unless you set $${domain} to something else in vars.xml) on port 5060 (the default SIP port).内部(以前称为"default"))的SIP配置文件被配置为侦听的主IP地址的机器(除非您设置域$${domain}的东西在vars.xml其他)在端口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 Getting_Started_Guide#directory 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 the default context .这个文件验证的用户通常设置(通过变量user_context)使用default context.定义的拨号规则。
See Config_default.xml见Config_default.xml
External 外部
File Location: $PREFIX/conf/sip_profiles/external.xml文件位置:$PREFIX/conf/ sip_profiles / external.xml
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 "outbound") profile handles outbound registrations to a SIP provider.外部(先前"outbound")配置文件处理出站登记,SIP的供应商。 The SIP provider sends calls to you, and you send calls to your provider, through the external profile.供应商发送的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.为了获取您的FreeSWITCH与拨号方案的安全,您的向外去外形除‘缺省之外’是明智的,它在默认配置是在身份验证的用户的位置。
NOTE: The default port for external connections is 5080. 注意:为外部连接的默认端口是5080。 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 ":5080".作为一个例子,在X光宝,如果你是从外部连接,设置为“:5080”。
The dialplan for this profile (per-default) is defined in the public context此配置文件的拨号规则(每默认)在 the public context的定义
See Config_external.xml见Config_external.xml
NAT NAT的
The nat.xml file (and profile) have been deprecated.该nat.xml文件(和配置文件)已被弃用。 Use the External Profile and port 5080.使用外部配置文件和端口5080。
Other Profile Concepts 其他配置文件概念
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.)经对不同的远程主机多个配置文件/端点(远程办公室等)
dialplan 拨号规则
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 Dialplan page here on the wiki. (此外,还存在Asterisk的支持,如拨号方案以及真正花式实时和/或后端数据库驱动拨号方案。)的最佳位置大约在FreeSWITCH拨号规则学习的开始是拨号规则页的维基这里。 It discusses the basics of the FreeSWITCH dialplan.它讨论了FreeSWITCH拨号规则的基础知识。 If you need an XML primer check out the information on the Basic_XML page which will get you pointed in the right direction.如果您需要内,有关Basic_XML网页将让你在正确的方向信息的XM
展开阅读全文