Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix translate problem #25

Merged
merged 7 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ xpath = "/cdr/callflow[@profile_index='1']/extension/@name";
}
```

```xml

然后我们将能够为任何插件匹配分机号的名称。
...
,
Expand All @@ -272,6 +274,7 @@ xpath = "/cdr/callflow[@profile_index='1']/extension/@name";
}
...


示例xmlcdrd.conf

----
Expand Down Expand Up @@ -605,8 +608,8 @@ vsa_pec = 9;
vsa_type = "string";
},

```json
[


{
var_name = "h323-remote-address";
vsa_name = "h323-remote-address";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 发表 |
| // 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 发表 |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ touch internal.xml

创建 **/usr/local/freeswitch/scripts/directory.lua**:

**directory.lua** Expand source
**directory.lua** 扩展源

```xml
 --[[
Expand All @@ -175,6 +175,7 @@ Brian West <[email protected]>

用于启用语音的LUA应用程序的示例。

```
-- 用于解析XML的函数
function parseargs_xml(s)
local arg = {}
Expand All @@ -183,6 +184,7 @@ function parseargs_xml(s)
end)
return arg
end
```

```lua
-- 将XML转换为lua表格。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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发布

## **欢迎使用我们的翻译服务**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ A -------- GSM/PCMA/G729 --------> FS(允许G729/PCMA/PCMU)-------- PCMA/G72

### 混合媒体/编解码器的差异(转码)

如果您希望FreeSWITCH能够匹配不同编解码器的两个通话路进(进行转码),则需要设置几个变量以使其成为可能。首先,您必须设置 **_media\_mix\_inbound\_outbound\_codecs=true_**,可以全局设置(例如在vars.xml中),也可以在桥接时在B路进上显式设置(即 _&lt;action application="bridge" data="{media\_mix\_inbound\_outbound\_codecs=true}sofia/gateway/....">_ )。
如果您希望FreeSWITCH能够匹配不同编解码器的两个通话路进(进行转码),则需要设置几个变量以使其成为可能。首先,您必须设置 **_media\_mix\_inbound\_outbound\_codecs=true_**,可以全局设置(例如在vars.xml中),也可以在桥接时在B路进上显式设置(即 `_&lt;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的大小,并且会大大减少转码的数量。

Expand Down
2 changes: 1 addition & 1 deletion docs/FreeSWITCH-Explained/Codecs-and-Media/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ FreeSWITCH支持大量的VoIP压缩编解码器,但默认配置不会为所有

一些编解码器存在专利限制,因此它们不是开源的,无法直接进行分发。根据适用情况,可以购买许可证进行使用。

执行fs\_cli命令"show codec"可以显示已启用的编解码器。
执行fs\_cli命令`show code`可以显示已启用的编解码器。

[vars.xml](../Configuration/Configuring-FreeSWITCH/vars.xml_7144079.mdx#about)文件包含以下全局控制与远程终端协商的编解码器的配置行:

Expand Down
Loading