From f284530590a9a7b96a0c3224c81fc3597c6c4df1 Mon Sep 17 00:00:00 2001 From: lmt Date: Wed, 24 Jan 2024 09:43:50 +0800 Subject: [PATCH 1/3] FreeSWITCH-Explained fix FS Air fix 1 fix-2 fix-Codecs and Media fix Codec Negotiation methods to github path to github aaa --- .../Xmlcdrd_13173237.mdx | 7 ++- .../Freeswitch-GUI/FS-Air_13173094.mdx | 3 +- .../Lua-ASR-TTS-Directory-example_1049011.mdx | 4 +- .../Script-Language-Choice_1048942.mdx | 14 +++-- .../Codec-Negotiation_2883752.mdx | 2 +- .../Codecs-and-Media/index.mdx | 2 +- .../howto/how-to-access-Github-in-China.mdx | 56 +++++++++++++++++++ docs/rts/howto/index.mdx | 1 + 8 files changed, 78 insertions(+), 11 deletions(-) create mode 100644 docs/rts/howto/how-to-access-Github-in-China.mdx diff --git a/docs/FreeSWITCH-Explained/Auxiliary-Knowledge-and-Utilities/Xmlcdrd_13173237.mdx b/docs/FreeSWITCH-Explained/Auxiliary-Knowledge-and-Utilities/Xmlcdrd_13173237.mdx index eb7c998..52f179a 100644 --- a/docs/FreeSWITCH-Explained/Auxiliary-Knowledge-and-Utilities/Xmlcdrd_13173237.mdx +++ b/docs/FreeSWITCH-Explained/Auxiliary-Knowledge-and-Utilities/Xmlcdrd_13173237.mdx @@ -263,6 +263,8 @@ xpath = "/cdr/callflow[@profile_index='1']/extension/@name"; } ``` +```xml + 然后我们将能够为任何插件匹配分机号的名称。 ... , @@ -272,6 +274,7 @@ xpath = "/cdr/callflow[@profile_index='1']/extension/@name"; } ... + 示例xmlcdrd.conf ---- @@ -605,8 +608,8 @@ vsa_pec = 9; vsa_type = "string"; }, -```json -[ + + { var_name = "h323-remote-address"; vsa_name = "h323-remote-address"; diff --git a/docs/FreeSWITCH-Explained/Client-and-Developer-Interfaces/Freeswitch-GUI/FS-Air_13173094.mdx b/docs/FreeSWITCH-Explained/Client-and-Developer-Interfaces/Freeswitch-GUI/FS-Air_13173094.mdx index e7f1850..25883b7 100644 --- a/docs/FreeSWITCH-Explained/Client-and-Developer-Interfaces/Freeswitch-GUI/FS-Air_13173094.mdx +++ b/docs/FreeSWITCH-Explained/Client-and-Developer-Interfaces/Freeswitch-GUI/FS-Air_13173094.mdx @@ -51,4 +51,5 @@ AIR应用程序:FreeSWITCH-Air.air ### 评论: -| // actionscript 的 sleep() 函数:function sleep(counter:int, subsequentFunction:Function, args:Array):void{ if(counter > 0){ callLater(sleep,[counter-1, subsequentFunction, args]); }else{ callLater(subsequentFunction, args); }}// 在 100 个周期之后调用 trace('Hello')sleep(100, trace, ['Hello']);// 在 50 个周期之后调用 myFunction()sleep(50, myFunction, []); ![](/images/icons/contenttypes/comment_16.png) 发布者 madovsky 在 2018 年 2 月 17 日 07:16 发表 | \ No newline at end of file +| // actionscript 的 sleep() 函数:function sleep(counter:int, subsequentFunction:Function, args:Array):void{ if(counter > 0){ callLater(sleep,[counter-1, subsequentFunction, args]); }else{ callLater(subsequentFunction, args); }}// 在 100 个周期之后调用 trace('Hello')sleep(100, trace, ['Hello']);// 在 50 个周期之后调用 myFunction()sleep(50, myFunction, []); ![](/images/icons/contenttypes/comment_16.png) 发布者 madovsky 在 2018 年 2 月 17 日 07:16 发表 | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | \ No newline at end of file diff --git a/docs/FreeSWITCH-Explained/Client-and-Developer-Interfaces/Lua-API-Reference/Lua-examples/Lua-ASR-TTS-Directory-example_1049011.mdx b/docs/FreeSWITCH-Explained/Client-and-Developer-Interfaces/Lua-API-Reference/Lua-examples/Lua-ASR-TTS-Directory-example_1049011.mdx index 94b39dc..0cda5c2 100644 --- a/docs/FreeSWITCH-Explained/Client-and-Developer-Interfaces/Lua-API-Reference/Lua-examples/Lua-ASR-TTS-Directory-example_1049011.mdx +++ b/docs/FreeSWITCH-Explained/Client-and-Developer-Interfaces/Lua-API-Reference/Lua-examples/Lua-ASR-TTS-Directory-example_1049011.mdx @@ -150,7 +150,7 @@ touch internal.xml 创建 **/usr/local/freeswitch/scripts/directory.lua**: -**directory.lua** Expand source +**directory.lua** 扩展源 ```xml  --[[ @@ -175,6 +175,7 @@ Brian West 用于启用语音的LUA应用程序的示例。 +``` -- 用于解析XML的函数 function parseargs_xml(s) local arg = {} @@ -183,6 +184,7 @@ function parseargs_xml(s) end) return arg end +``` ```lua -- 将XML转换为lua表格。 diff --git a/docs/FreeSWITCH-Explained/Client-and-Developer-Interfaces/Script-Language-Choice_1048942.mdx b/docs/FreeSWITCH-Explained/Client-and-Developer-Interfaces/Script-Language-Choice_1048942.mdx index eb4a2ac..24a6df2 100644 --- a/docs/FreeSWITCH-Explained/Client-and-Developer-Interfaces/Script-Language-Choice_1048942.mdx +++ b/docs/FreeSWITCH-Explained/Client-and-Developer-Interfaces/Script-Language-Choice_1048942.mdx @@ -26,11 +26,15 @@ Lua vs. JavaScript: 脚本与MySQL数据库查找、一些简单逻辑判断、 ### 注解: -| JS更重?慢50%?有基准测试来证实这些说法吗?![图片](/images/icons/contenttypes/comment_16.png)由noliver在2015年2月16日14:36发布 -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -| 简而言之:lua的初始化时间约为60毫秒,mod_v8的初始化时间约为80毫秒。我没有对脚本运行进行基准测试,我认为主要问题是来自初始化延迟。在对FreeSWITCH(版本1.4.15-1 64位)进行测试时,我得到了以下结果:我创建了一个名为hello.lua的文件,其中包含以下内容:freeswitch.consoleLog("WARNING", "Ho!\n");还创建了一个名为hello.js的文件,其中包含以下内容:console_log("WARNING", "Ho!\n");然后我在fs_cli中运行,并比较时间戳:log debug about to init lualuarun hello.lualog debug about to init jsjsrun hello.js(确保粘贴时包括换行符,以便立即运行)。我对每个文件进行了3-4次测试,结果相对一致:lua打印其调试语句所需时间为0.06秒,javascript则为0.08秒。因此,我认为你不必过于担心使用javascript而不是lua。![图片](/images/icons/contenttypes/comment_16.png)由avimarcus在2015年8月21日04:05发布 -| 关于golang、erlang和java呢?需要进行比较的不是简单的console_log,而是涉及到繁重和/或长时间的操作,例如与radius、mysql的工作。Lua太愚蠢了,甚至"filesize"都需要定制函数。还有关于多次调用和python的全局解释器锁(GIL)呢?![图片](/images/icons/contenttypes/comment_16.png)由denis在2016年7月8日07:37发布 -| 欢迎对此感兴趣的开发者发布其基准测试的简要摘录,并附上链接以供查看完整的测试套件。事实胜于观点。请通过我的个人页面或发送电子邮件至FS-Docs邮件列表以获取编辑权限。![图片](/images/icons/contenttypes/comment_16.png)由boteman在2016年12月21日12:26发布 + + +JS更重?慢50%?有基准测试来证实这些说法吗?![图片](/images/icons/contenttypes/comment_16.png)由noliver在2015年2月16日14:36发布 + +简而言之:lua的初始化时间约为60毫秒,mod_v8的初始化时间约为80毫秒。我没有对脚本运行进行基准测试,我认为主要问题是来自初始化延迟。在对FreeSWITCH(版本1.4.15-1 64位)进行测试时,我得到了以下结果:我创建了一个名为hello.lua的文件,其中包含以下内容:`freeswitch.consoleLog("WARNING", "Ho!\n");`还创建了一个名为hello.js的文件,其中包含以下内容:`console_log("WARNING", "Ho!\n");`然后我在fs_cli中运行,并比较时间戳:log debug about to init lualuarun hello.lualog debug about to init jsjsrun hello.js(确保粘贴时包括换行符,以便立即运行)。我对每个文件进行了3-4次测试,结果相对一致:lua打印其调试语句所需时间为0.06秒,javascript则为0.08秒。因此,我认为你不必过于担心使用javascript而不是lua。![图片](/images/icons/contenttypes/comment_16.png)由avimarcus在2015年8月21日04:05发布 + +关于golang、erlang和java呢?需要进行比较的不是简单的console_log,而是涉及到繁重和/或长时间的操作,例如与radius、mysql的工作。Lua太愚蠢了,甚至"filesize"都需要定制函数。还有关于多次调用和python的全局解释器锁(GIL)呢?![图片](/images/icons/contenttypes/comment_16.png)由denis在2016年7月8日07:37发布 + +欢迎对此感兴趣的开发者发布其基准测试的简要摘录,并附上链接以供查看完整的测试套件。事实胜于观点。请通过我的个人页面或发送电子邮件至FS-Docs邮件列表以获取编辑权限。![图片](/images/icons/contenttypes/comment_16.png)由boteman在2016年12月21日12:26发布 ## **欢迎使用我们的翻译服务** diff --git a/docs/FreeSWITCH-Explained/Codecs-and-Media/Codec-Negotiation_2883752.mdx b/docs/FreeSWITCH-Explained/Codecs-and-Media/Codec-Negotiation_2883752.mdx index 2626639..24b59dc 100644 --- a/docs/FreeSWITCH-Explained/Codecs-and-Media/Codec-Negotiation_2883752.mdx +++ b/docs/FreeSWITCH-Explained/Codecs-and-Media/Codec-Negotiation_2883752.mdx @@ -180,7 +180,7 @@ A -------- GSM/PCMA/G729 --------> FS(允许G729/PCMA/PCMU)-------- PCMA/G72 ### 混合媒体/编解码器的差异(转码) -如果您希望FreeSWITCH能够匹配不同编解码器的两个通话路进(进行转码),则需要设置几个变量以使其成为可能。首先,您必须设置 **_media\_mix\_inbound\_outbound\_codecs=true_**,可以全局设置(例如在vars.xml中),也可以在桥接时在B路进上显式设置(即 _<action application="bridge" data="{media\_mix\_inbound\_outbound\_codecs=true}sofia/gateway/....">_ )。 +如果您希望FreeSWITCH能够匹配不同编解码器的两个通话路进(进行转码),则需要设置几个变量以使其成为可能。首先,您必须设置 **_media\_mix\_inbound\_outbound\_codecs=true_**,可以全局设置(例如在vars.xml中),也可以在桥接时在B路进上显式设置(即 `_<action application="bridge" data="{media\_mix\_inbound\_outbound\_codecs=true}sofia/gateway/....">_ `)。 由于webrtc的支持和涉及SIP over UDP时SDP不断增长,这个新的变量在1.6版本及以后的版本中是必需的。SDP现在已经达到了一个难以将WebRTC -> SIP进行转换并保持原始SDP的程度,原因是SDP的大小愈发庞大。在使用SIP over UDP时,当发生分组拆分时,由于UDP不会自动重新装配碎片,会破坏SIP数据包。这会在sip数据包超过MTU时发生,唯一的解决办法是使用小包。这意味着使用紧凑头、消除额外头或者不使用那么大的SDP,以消减SDP的大小。对于FS来说,如果没有将media\_mix\_inbound\_outbound\_codecs设置为true,那么只有A路进上向FS提供的编解码器会传递到B路进上,这会减小SDP的大小,并且会大大减少转码的数量。 diff --git a/docs/FreeSWITCH-Explained/Codecs-and-Media/index.mdx b/docs/FreeSWITCH-Explained/Codecs-and-Media/index.mdx index 0833246..66b0cc6 100644 --- a/docs/FreeSWITCH-Explained/Codecs-and-Media/index.mdx +++ b/docs/FreeSWITCH-Explained/Codecs-and-Media/index.mdx @@ -25,7 +25,7 @@ FreeSWITCH支持大量的VoIP压缩编解码器,但默认配置不会为所有 一些编解码器存在专利限制,因此它们不是开源的,无法直接进行分发。根据适用情况,可以购买许可证进行使用。 -执行fs\_cli命令"show codec"可以显示已启用的编解码器。 +执行fs\_cli命令`show code`可以显示已启用的编解码器。 [vars.xml](../Configuration/Configuring-FreeSWITCH/vars.xml_7144079.mdx#about)文件包含以下全局控制与远程终端协商的编解码器的配置行: diff --git a/docs/rts/howto/how-to-access-Github-in-China.mdx b/docs/rts/howto/how-to-access-Github-in-China.mdx new file mode 100644 index 0000000..32e4ddf --- /dev/null +++ b/docs/rts/howto/how-to-access-Github-in-China.mdx @@ -0,0 +1,56 @@ +# 如何在国内访问 GitHub? + +## 前言 + +登录 GitHub 开拓 RTS 社区是必不可少的一项工作,但有时候由于网络限制或其他原因,我们可能无法直接访问 GitHub。在这篇文档中,将为您提供一种不使用代理的方法来访问 GitHub 网站。 + +## 方法集锦 + +### 使用 hosts 文件 + +修改系统的 hosts 文件,绕过国内 DNS 解析,直接访问 GitHub 的 CDN 节点,从而达到加速访问 GitHub 的目的。不需要海外的服务器辅助。其原理是在浏览器中输入 GitHub 的网址时,会向 DNS 服务器发送一个请求,获取到 GitHub 网站所在的服务器 IP 地址,从而进行访问。就像你是一名快递员,在送快递前要先找中间人询问收件人的地址。而 DNS 就是这个告诉你目标地址的中间人,如果 DNS 告诉了你错误的地址,或者请求被拦截,再或者 DNS 挂了,都会导致你无法访问网站。 + +因此,想要访问 GitHub,我们可以先通过 IP 查询工具来获取当前 GitHub 网站的真实地址,再修改本地 hosts 文件,将该地址和 GitHub 网址关联。 + +首先,打开 https://www.ipaddress.com/,查询以下4个链接的DNS解析地址,哪个能ping上选择哪个。 + +- github.com +- assets-cdn.github.com +- github.global.ssl.fastly.net +- raw.githubusercontent.com + +然后,打开操作系统的文件管理器,找到 hosts 文件的位置,不同操作系统,hosts 文件的存储位置也不同: + +- Windows 系统:C:\Windows\System32\drivers\etc\hosts +- Linux 系统:/etc/hosts +- Mac(苹果电脑)系统:/etc/hosts +- Android(安卓)系统:/system/etc/hosts +- iPhone(iOS)系统:/etc/hosts + +打开 "hosts" 的文件,并用文本编辑器打开它(以管理员身份运行编辑器)。在 hosts 文件的末尾添加一行,`xx.xx.xx.xx www.github.com`将`xx`替换为你查询到的解析地址,保存并关闭 hosts 文件。 + +### 访问 GitHub + +现在,您应该能够通过浏览器直接访问 GitHub 网站了,而无需使用代理。尝试在浏览器中输入 "github.com" 或 "www.github.com",然后按 Enter 键进行访问。 + +请注意,这种方法仅适用于绕过某些网络限制或 DNS 解析问题。如果您仍然无法访问 GitHub,请确保您的网络连接正常,并检查是否存在其他网络层面的限制。 + +希望这个方法能够帮助您成功访问 GitHub 网站。 + +## GitHub 仓库快速导入 Gitee 及同步更新 + +将 GitHub 上的内容 Fork 到 Gitee 仓库是一种将代码或项目从一个代码托管平台迁移到另一个平台的常见操作。 + +### Fork GitHub 仓库到 Gitee + +先创建 Gitee 账号,打开 [Gitee 网站](https://gitee.com),点击 "注册" 或 "Sign Up",填写必要的信息并创建一个 Gitee 账号。再登录 Gitee 账号,点击右上角的 "+" 号,点击从 "GitHub 导入仓库",Fork GitHub 仓库到 Gitee。具体操作如下: + +打开 [GitHub 网站](https://github.com)。导航到您想要 Fork 的仓库页面。在仓库页面的右上角,点击 "Fork" 按钮。在弹出的对话框中,选择您的 Gitee 账号作为 Fork 的目标。等待一段时间,GitHub 会将仓库的副本复制到您的 Gitee 账号下。 + +### 同步更新 + +在 Gitee 上打开 Fork 后的仓库页面。点击页面右上角的 "设置" 按钮。在设置页面的左侧导航栏中,选择 "仓库管理" -> "同步管理"。在 "远程仓库地址" 中输入原始 GitHub 仓库的 URL。点击 "同步" 按钮,Gitee 将会尝试将原始仓库的更新同步到您的 Gitee 仓库中。 + +现在,您已经成功将 GitHub 上的内容 Fork 到 Gitee 仓库中了。您可以在 Gitee 上继续管理和开发这个仓库,而无需直接访问 GitHub。请注意,由于两个平台的差异,一些功能和操作可能会有所不同,您可能需要适应 Gitee 平台的界面和工具。 + +希望这个方法能够帮助您成功将 GitHub 上的内容迁移到 Gitee 仓库。 \ No newline at end of file diff --git a/docs/rts/howto/index.mdx b/docs/rts/howto/index.mdx index 793532f..48c1ad4 100644 --- a/docs/rts/howto/index.mdx +++ b/docs/rts/howto/index.mdx @@ -4,3 +4,4 @@ - [如何向 RTS 文档中添加文档](add-docs/) - [如何在 RTS 中使用 inband DTMF?](inband-dtmf/)。 +- [如何在国内连接 Github ](go-github/)。 \ No newline at end of file From 1f9cd76357c1854bb1f13800711cead2b0c60e9b Mon Sep 17 00:00:00 2001 From: almncu <3209737410@qq.com> Date: Wed, 31 Jan 2024 16:20:32 +0800 Subject: [PATCH 2/3] change-index --- docs/rts/howto/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/rts/howto/index.mdx b/docs/rts/howto/index.mdx index 48c1ad4..637e45d 100644 --- a/docs/rts/howto/index.mdx +++ b/docs/rts/howto/index.mdx @@ -4,4 +4,4 @@ - [如何向 RTS 文档中添加文档](add-docs/) - [如何在 RTS 中使用 inband DTMF?](inband-dtmf/)。 -- [如何在国内连接 Github ](go-github/)。 \ No newline at end of file +- [如何在国内连接 Github ](how-to-access-Github-in-China/)。 \ No newline at end of file From 359b21ed12476e85bebb11567fb10dc558641200 Mon Sep 17 00:00:00 2001 From: almncu <3209737410@qq.com> Date: Mon, 5 Feb 2024 17:48:10 +0800 Subject: [PATCH 3/3] Enterprise-Deployment --- .../Enterprise-Deployment-with-Corosync_13173246.mdx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/FreeSWITCH-Explained/Enterprise-Deployment/Enterprise-Deployment-with-Corosync_13173246.mdx b/docs/FreeSWITCH-Explained/Enterprise-Deployment/Enterprise-Deployment-with-Corosync_13173246.mdx index 883b72b..5435545 100644 --- a/docs/FreeSWITCH-Explained/Enterprise-Deployment/Enterprise-Deployment-with-Corosync_13173246.mdx +++ b/docs/FreeSWITCH-Explained/Enterprise-Deployment/Enterprise-Deployment-with-Corosync_13173246.mdx @@ -155,6 +155,7 @@ LSB(Linux标准基准)脚本 ### END INIT INFO #set -x ``` +```xml FS_CLI_PROG='/usr/local/freeswitch/bin/fs_cli' FS_CLI_HOST='127.0.0.1' @@ -208,6 +209,8 @@ case "$CMD" in esac ``` +``` + 使脚本可执行