首页 FreeSWITCH入门指南

FreeSWITCH入门指南

举报
开通vip

FreeSWITCH入门指南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 als...

FreeSWITCH入门指南
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™采用模块化 设计 领导形象设计圆作业设计ao工艺污水处理厂设计附属工程施工组织设计清扫机器人结构设计 。 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.根据您的要求的情况你可能只需要允许该由你的系统发起的连接。 如果您有任何问 快递公司问题件快递公司问题件货款处理关于圆的周长面积重点题型关于解方程组的题及答案关于南海问题 的协议不工作, 建议 关于小区增设电动车充电建议给教师的建议PDF智慧城市建议书pdf给教师的36条建议下载税则修订调整建议表下载 您禁用防火墙的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:是在第一次安装最有可能想要设置: directives for use in other portions of the configuration. 用于配置的其他部分中的指令。 The default port of Freeswitch is also defined in Freeswitch默认端口也被定义在里面 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确定如何路线不同类型的要求,必要时,还能让你的灵活性,以调整你的拨号 方案 气瓶 现场处置方案 .pdf气瓶 现场处置方案 .doc见习基地管理方案.doc关于群访事件的化解方案建筑工地扬尘治理专项方案下载 基于路径的一个叫来源于/。 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 "my.server.com:5080".作为一个例子,在X光宝,如果你是从外部连接,设置为“my.server.com: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网页将让你在正确的方向信息的XML底漆检查。 There are two other important resources for you to learn more about the diaplan: the small-but-growing Dialplan_Recipes page as well as the default dialplan that comes with a standard FreeSWITCH installation.有两个其他重要资源,您了解diaplan:小,但增长Dialplan_Recipes页以上,以及默认的拨号规则与标准FreeSWITCH安装中。 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 default.xml dialplan, are still being updated.请注意,默认的配置文件,包括default.xml的拨号规则,现正被更新。 It makes sense to put your custom diaplan entries into the extensions subdirectory under conf/dialplan.是有道理的conf置于您的自定义diaplan项目扩展到子目录/拨号规则。 You may create one or more XML files in this subdirectory, all of which will be included in the dialplan thanks to an "include" directive in the default.xml file.您可以创建一个或多个在这个子目录XML文件,所有这些都将在一个“包括”在default.xml的文件指令包含的拨号规则感谢。 By keeping your customized extensions separate from default.xml you will be able to update default.xml without having to re-enter your custom extensions.通过保持你的个性化扩展的default.xml的你将能够更新default.xml的独立,而不必重新输入您的自定义扩展。 Some common extensions for testing 用于测试一些常用的扩展 · 1000, 1001, ..., 1019 - Generic SIP extensions 1000,1001,...,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搁置-音乐(音乐文件需要安装) directory 目录 See Config_directory.xml for a sample configuration.见一个示例配置Config_directory.xml。 The directory holds authentication credentials for other sip endpoints that will register to freeswitch (most commonly users).该目录保存的其他SIP终端,将登记freeswitch(最常见的用户)身份验证凭据。 The directory configuration default is configured to process the glob $PREFIX/conf/directory/default/*.xml by the configuration included in freeswitch.xml $PREFIX/conf/directory/*.xml.该目录默认配置配置为处理的glob $PREFIX/conf/directory/default/*.xml 的包括freeswitch.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/conf/directory/随意看看在例子: $PREFIX/conf/directory/ User Configuration 用户配置 see Config_1000.xml for a simple (1000.xml) configuration of a user (endpoint) which will register to freeswitch.看到一个简单(1000.xml Config_1000.xml)的用户(终端),将登记freeswitch配置。 Sample Gateway Configuration 样本网关配置 See SIP Provider Examples for sample gateway configurations for different providers.见为不同供应商的样本网关配置SIP提供者的例子 。 outbound registrations to providers can also be made in the outbound profile. 出站登记的供应商也可以在出站的形象。 see Clarification:gateways this page for a clarification 见 Clarification:gateways此解释页 Dialing out via Gateway 通过网关进行拨号 Add the following to default.xml (in prefix /conf/dialplan) for 11 digit dialing (US) via your newly created gateway configuration above.以下添加到default.xml文件(在 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 defined.请记住,默认配置FreeSWITCH提供不包括为通过您所定义的网关呼出拨号规则。 You will need to add something similar to the following.您将需要添加类似以下。 如果您的提供商不提供回铃音(180或183),你可以模拟下面的注释行回铃音。 Receiving an inbound call from a Gateway 接收来自网关发出入站调用 Add the following to public.xml (in prefix /conf/dialplan) to receive inbound calls via your newly created gateway configuration above.以下添加到public.xml(在 prefix /conf/dialplan)接收通过新建立的网关配置上面接听电话。 Make sure to set destination_number to a DID defined for this gateway.请确保将设置为此网关定义一个 DID 目的地号码。 This will route all inbound calls to extension 1001.这将路线延长1001的所有来电。 Remember, you can have multiple endpoints register to one account ( See Multiple Registrations ).请记住,你可以有多个端点注册一个帐户(见 Multiple Registrations )。 You will need to add something similar to the following.您将需要添加类似以下。 Please note, this will only redirect to an extension, you will also need to have the extension bridge with an endpoint/user if that is your desire (See Dialplan_XML#Example_9 ).请注意,这只会重定向到一个扩展,您还需要有一个端点延伸桥/用户如果这是您的愿望(见Dialplan_XML#Example_9)。
本文档为【FreeSWITCH入门指南】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_235171
暂无简介~
格式:doc
大小:388KB
软件:Word
页数:21
分类:互联网
上传时间:2013-01-11
浏览量:46