PerKins Zhu

Le vent se lève,il faut tenter de vivre.

导航

freeswitch 在visualstudio 2017 中编译运行

Posted on 2023-09-01 11:11  PerKins.Zhu  阅读(169)  评论(0编辑  收藏  举报

1、 visual studio 使用 2017版本的

2、下载 https://github.com/PerkinsZhu/freeswitch/tree/v1.8  源码

 

 

 

错误处理:

一、

 下载地址: https://wixtoolset.gallerycdn.vsassets.io/extensions/wixtoolset/wixtoolsetvisualstudio2017extension/1.0.0.22/1668223938167/Votive2017.vsix   (如果需要调整版本,只需要把 链接中的2017修改为2019即可)

                  https://marketplace.visualstudio.com/items?itemName=WixToolset.WixToolsetVisualStudio2017Extension

 

二、

严重性 代码 说明 项目 文件 行 禁止显示状态
错误 C1083 无法打开包括文件: “ctype.h”: No such file or directory libapr c:\program files (x86)\windows kits\8.1\include\um\winnt.h 31

 

找不到标准库的头文件:重定向解决方案 使用 windows SDK 10 b版本

 

三、软电话内部呼叫时发现到30S自动挂断。抓被叫SIP包发现SDP消息没有ACK,十次后自动挂断。 抓主叫SIP消息发现 ACK消息被发送给外网IP地址。

处理方案,把 conf/sip_profiles/internal.xml 中param name=“ext-rtp-ip” 和 param name="ext-sip-ip"的部分都注释掉,再重启 就可以了

 

 四、录音文件异常。录音文件中,通话内容复制了两份,第一份音调变高,播放速度被压缩,第二份录音正常。两份录音被合并在同一份录音文件中。

 

 五、代码找不到 switch.h 等其他 include 文件夹中的头文件。

附加包含目录: $(SolutionDir)\src\include;%(AdditionalIncludeDirectories)

 

 

 

严重性 代码 说明 项目 文件 行 禁止显示状态
错误 C2001 常量中有换行符 ffmpeg D:\myproject\visualCode\freeswitch\libs\ffmpeg-5.1.3\libavutil\tx.c 350

解决方案:https://blog.csdn.net/qq_32966261/article/details/127094959

 

switch.h中找不到  #include <switch_am_config.h>

1、手动找一个switch_am_config.h文件,放在 switch_am_config.h.in同级目录下

(可以手动复制这里https://docs.freeswitch.org/switch__am__config_8h_source.html 的保存到这个文件中)

 在这里右键属性C/C++ -> 常规 附加包含目录中 ,加入 src/include 目录

 

--END