Advertisement
highsea

学习笔记freeswitch

May 3rd, 2018
567
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.67 KB | None | 0 0
  1.  
  2. ### freeswitch 错误代码
  3.  
  4. https://freeswitch.org/confluence/display/FREESWITCH/Hangup+Cause+Code+Table
  5.  
  6. #### xLite连接 asterisk| fs 提示sip408错误
  7.  
  8. 1.sip408应答代码全文
  9.  
  10. 408 Request Timeout
  11. 在一段时间内,服务器不能产生一个终结应答,例如,如果它无法及时决定用户的位置。客户端可以在稍后不更改请求的内容然后重新尝试请求。
  12. 2.原因:造成无法连接的原因一般是linux防火墙造成。
  13.  
  14. 3.解决方案:
  15.  
  16. 在linux终端执行>setup
  17.  
  18. 选择防火墙直接关闭即可,如果是运行在公网上的服务器,可以选择防火墙中的定制开启相应的端口即可。
  19.  
  20. sip.conf 默认配置端口为5060
  21.  
  22. 1. 永久性生效
  23.  
  24. 开启: chkconfig iptables on
  25.  
  26. 关闭: chkconfig iptables off
  27.  
  28. 2. 即时生效,重启后失效
  29.  
  30. 开启: service iptables start
  31.  
  32. 关闭: service iptables stop
  33.  
  34. 1. 永久有效
  35.  
  36. 修改 /etc/selinux/config 文件中的 SELINUX="" 为 disabled ,然后重启。
  37.  
  38. 2. 即时生效
  39.  
  40. setenforce 0
  41.  
  42. ### fs 添加用户
  43.  
  44. fs 默认只有 20 个用户
  45.  
  46. 1. 进入 directory 目录
  47.  
  48. ```
  49. cd etc/directory/default/
  50. cp 1000.xml 1234.xml
  51. //修改 1000 为 1234
  52. //修改 effective_caller_id_name 为 “your name”
  53. <variable name="effective_caller_id_name" value="highsea"/>
  54. ```
  55.  
  56. 2. dialplan 拨号计划目录
  57.  
  58. 找到 destination_number 修改 正则,比如 ```^(10[01][0-9]|1234)$```
  59.  
  60. ```
  61. cd etc/dialplan/
  62. vim default.xml
  63. <condition field="destination_number" expression="^(10[01][0-9])$">
  64. ```
  65.  
  66. 3. reloadxml + 重启 fs
  67.  
  68.  
  69. ### fs 打开 wss websocket 链接
  70.  
  71. [freeSWITCH安装、配置与局域网测试](https://blog.csdn.net/foruok/article/details/74287842)
  72.  
  73. /etc/freeswitch/sip_profiles/internal.xml
  74. /etc/freeswitch/vars.xml
  75.  
  76.  
  77. 1. 修改vars.xml,加入:
  78.  
  79. ```
  80. <X-PRE-PROCESS cmd=="set" data="proxy_media=true"/>
  81. ```
  82.  
  83. conf/var.xml中有两个开关,要设置true
  84.  
  85. <X-PRE-PROCESS cmd="set" data="internal_ssl_enable=true"/>
  86. <X-PRE-PROCESS cmd="set" data="external_ssl_enable=true"/>
  87.  
  88.  
  89. 2. 修改sip_profiles/internal.xml,设置 **inbound-proxy-media** 和 **inbound-late-negotiation** 为true ,类似下面:
  90.  
  91. ```
  92. <!--Uncomment to set all inbound calls to proxy media mode-->
  93. <param name="inbound-proxy-media" value="true"/>
  94.  
  95. <!-- Let calls hit the dialplan before selecting codec for the a-leg -->
  96. <param name="inbound-late-negotiation" value="true"/>
  97. ```
  98.  
  99. SIP 服务的端口是 5060 ,WebSocket(ws)服务的端口是 5066 , wss 端口是 7443 。
  100.  
  101. 3. 局域网调试 打开 autoload_configs
  102.  
  103. ```
  104.  
  105. /etc/freeswitch/autoload_configs/acl.conf.xml
  106.  
  107. <list name="localnet.auto" default="allow">
  108. </list>
  109. ```
  110.  
  111. #### 测试 WebSocket
  112.  
  113. sip over websoket
  114.  
  115. nginx 代理 wss 协议服务(头部也是 http)
  116.  
  117.  
  118. ````
  119. // ws://192.168.1.43:5066
  120. //
  121. var ws = new WebSocket("wss://192.168.1.43:7443");
  122.  
  123. ws.onopen = function(evt) {
  124. console.log("Connection open ...");
  125. ws.send("Hello WebSockets!");
  126. };
  127.  
  128. ws.onmessage = function(evt) {
  129. console.log( "Received Message: " + evt.data);
  130. ws.close();
  131. };
  132.  
  133. ws.onclose = function(evt) {
  134. console.log("Connection closed.");
  135. };
  136.  
  137. ````
  138.  
  139. readyState属性返回实例对象的当前状态,共有四种。
  140.  
  141. CONNECTING:值为0,表示正在连接。
  142. OPEN:值为1,表示连接成功,可以通信了。
  143. CLOSING:值为2,表示连接正在关闭。
  144. CLOSED:值为3,表示连接已经关闭,或者打开连接失败。
  145.  
  146.  
  147.  
  148. ### 验证端口
  149.  
  150. 启动后,TCP 5060 、UDP 5060 、TCP 5066 、TCP 7443 这几个端口应该被监听。
  151.  
  152. 可以使用下面命令:
  153.  
  154. netstat -an | grep "5060"
  155.  
  156. netstat -an | grep "7443"
  157.  
  158. ### sip trunk 注册配置
  159.  
  160. 添加注册到imclub.com的sip server上,增加imsclub.com_sip_trunk.xml内容
  161.  
  162. ```
  163. freeswitch/conf/sip_profiles/external/imsclub.com_sip_trunk.xml
  164.  
  165. <include>
  166. <gateway name="imsclub.com">
  167. <param name="username" value="1019"/>
  168. <param name="password" value="1234"/>
  169. <param name="realm" value="imsclub.com"/>
  170. <param name="proxy" value="imsclub.com"/>
  171. </gateway>
  172. </include>
  173. ```
  174.  
  175.  
  176. > sip trunk基本原理
  177.  
  178. 注册到 freeswitch 的 internal 内部终端之间显然可以互相拨打,比如公司内部话机可以互相通话。但公司内部话机要想主动跟外部话机通话怎么办?这是就需要进过公司软交换中心跟 external 外部建立通信链路,而软交换中心跟 external 外部建立得通信链路可以是 SIP 或者 PSTN 的运营商网络链接。 Freeswitch 引入所谓网关概念来处理与外部链接问题,这种链路一般称之为 Trunk,故对应的有 SIP Trunk和 PSTN Trunk。
  179.  
  180. 在 Freeswitch 中配置在系统启动时注册到另一个sip服务器(即配置文件中所谓的gateway),此时 Freeswitch 作为一个 sip client ,跟其下面SIP终端注册到 freeswitch 是一样的。跟 SIP 终端一样,配置注册到网关需要 用户名,密码,以及要注册到的sip服务器ip地址和端口等参数。
  181.  
  182. 注册到网关的相关配置保存在目录
  183.  
  184. freeswitch/etc/freeswitch/sofia_profiles/external,
  185. freeswitch/etc/freeswitch/sip_profiles/external.xml 为freeswitch作为客户端注册到另一个网关的全局配置,
  186. freeswitch/etc/freeswitch/sip_profiles/external/ 目录下可以添加多个网关。
  187.  
  188.  
  189. 说明:
  190.  
  191. 1. 以上是基本配置,还有其他配置可参考 example.xml
  192. 2. 确保gateways 上的 sip server 已经添加指定的账号,否则毫无意义
  193.  
  194. 重启external生效
  195. `freeswitch@internal> sofia profile external restart`
  196.  
  197.  
  198. https://freeswitch.org/freeswitch-1-6-17-released/
  199.  
  200. wget https://f.s:8001/freeswitch-1.6.17.tar.gz --no-check-certificate
  201. wget https://f.s:8001/cd_sounds/freeswitch-sounds-music-8000-1.0.50.tar.gz --no-check-certificate
  202.  
  203.  
  204. wget https://f.s:8001/install_on_CentOS_6.5.sh --no-check-certificate
  205.  
  206. ### 添加网关配置
  207.  
  208. ```
  209.  
  210. find ./freeswitch/ -name sip_profiles
  211.  
  212. /root/freeswitch/etc/freeswitch/sip_profiles/external/
  213.  
  214. ```
  215.  
  216. ### FS常用指令
  217.  
  218. fsctl shutdown [cancel|elegant|asap|restart|now]
  219.  
  220. sofia profile external restart
  221.  
  222. sofia status profile internal reg
  223.  
  224. sofia status profile internal
  225.  
  226. show registrations
  227.  
  228. status profile external reg
  229.  
  230. sofia status
  231.  
  232.  
  233. freeswitch@highsea-macos-vmware-centos6.5> version
  234.  
  235. FreeSWITCH Version 1.6.17~64bit ( 64bit)
  236.  
  237.  
  238. freeswitch@highsea-macos-vmware-centos6.5> status
  239.  
  240. UP 0 years, 0 days, 0 hours, 32 minutes, 6 seconds, 205 milliseconds, 733 microseconds #启动时长
  241. FreeSWITCH (Version 1.6.17 64bit) is ready #主要版本号
  242. 20 session(s) since startup #自启动以来已经处理了多少个session
  243. 0 session(s) - peak 4, last 5min 0 #处理了4个
  244. 0 session(s) per Sec out of max 30, peak 2, last 5min 0 #最大支持每秒处理30个,可在配置文件里更改 cps(call per Second)
  245. 1000 session(s) max #最大允许多少个并发session
  246. min idle cpu 0.00/99.07 #最小及当前空闲CPU
  247. Current Stack Size/Max 240K/8192K #当前使用的堆栈空间以及系统预留的堆栈地址空间。
  248.  
  249. 为了调试方便,FreeSWITCH还在conf/autoload_configs/switch.conf.xml中定义了一些控制台快捷键。可以通过F1~F12这几个按键来使用它们(不过,在某些操作系统上,有些快捷键可能与操作系统相冲突,这时你就只能直接输入这些命令或重新定义它们了),也可以修改配置文件加入比较常用的命令(修改完毕后记着运行 reloadxml 命令使之生效)
  250.  
  251. ##freeswitch -waste
  252.  
  253.  
  254. ```
  255. ps aux | grep freeswitch
  256.  
  257. //呼叫注册用户 (显示来电 000000)
  258.  
  259. originate user/1003 &echo
  260.  
  261. ```
  262.  
  263. #### 开启SIP Trace: 日志
  264.  
  265. sofia global siptrace on
  266.  
  267.  
  268. 挂断原因代码表 https://freeswitch.org/confluence/display/FREESWITCH/Hangup+Cause+Code+Table
  269.  
  270.  
  271.  
  272. ### FreeSWITCH核心层定义了以下接口(来自switch_types.h,注释为作者所加):
  273.  
  274. typedef enum {
  275.  
  276. SWITCH_ENDPOINT_INTERFACE, //终点
  277. SWITCH_TIMER_INTERFACE, //定时器
  278. SWITCH_DIALPLAN_INTERFACE, //拨号计划 *
  279. SWITCH_CODEC_INTERFACE, //编码解码
  280. SWITCH_APPLICATION_INTERFACE, //应用程序
  281. SWITCH_API_INTERFACE, //命令
  282. SWITCH_FILE_INTERFACE, //文件
  283. SWITCH_SPEECH_INTERFACE, //语音合成 *
  284. SWITCH_DIRECTORY_INTERFACE, //用户目录
  285. SWITCH_CHAT_INTERFACE, //聊天计划 *
  286. SWITCH_SAY_INTERFACE, //分词短语 *
  287. SWITCH_ASR_INTERFACE, //语音识别 *
  288. SWITCH_MANAGEMENT_INTERFACE, //网管接口
  289. SWITCH_LIMIT_INTERFACE, //资源接口
  290. SWITCH_CHAT_APPLICATION_INTERFACE //聊天应用程序接口 *
  291.  
  292. } switch_module_interface_name_t;
  293.  
  294.  
  295.  
  296.  
  297. git clone –b release-1.6 https://freeswitch.org/stash/scm/sd/libvpx.git
  298. git clone -b v1.6 https://freeswitch.org/stash/scm/fs/freeswitch.git
  299.  
  300. ### libvpx-1.7.0
  301. https://github.com/webmproject/libvpx/archive/v1.7.0/libvpx-1.7.0.tar.gz
  302. sed -i 's/cp -p/cp/' build/make/Makefile && mkdir libvpx-build && cd libvpx-build && ../configure --prefix=/usr --enable-shared --disable-static && make
  303.  
  304.  
  305. sed -i 's/cp -p/cp/' build/make/Makefile && mkdir libvpx-build && cd libvpx-build && ../configure --prefix=/usr --enable-pic --disable-static --enable-shared && make
  306.  
  307.  
  308.  
  309. ### yasm-1.3.0
  310. http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
  311. sed -i 's#) ytasm.*#)#' Makefile.in && ./configure --prefix=/usr && make
  312.  
  313.  
  314. ### Which-2.21 and Alternatives
  315. https://ftp.gnu.org/gnu/which/which-2.21.tar.gz
  316. ./configure --prefix=/usr && make
  317.  
  318. ### NASM-2.13.03
  319. http://www.nasm.us/pub/nasm/releasebuilds/2.13.03/nasm-2.13.03.tar.xz
  320. tar -xf nasm-2.13.03.tar.xz --strip-components=1
  321.  
  322.  
  323. <include>
  324. <extension name="callout mjoys3h">
  325. <condition field="destination_number" expression="^0(\d+)$">
  326. <action application="bridge" data="sofia/gateway/mjoys3h/$1"/>
  327. </condition>
  328. </extension>
  329. </include>
  330.  
  331.  
  332.  
  333. <include>
  334.  
  335. <extension name="public_did">
  336.  
  337.  
  338.  
  339. 192.168.1.120
  340. 192.168.1.28 00:0C:29:5E:44:DB
  341.  
  342. ```
  343. [root@highsea-macos-vmware-centos6 ~]# tree ./freeswitch/ -L 4
  344. ./freeswitch/
  345. ├── bin # 可执行程序
  346. │   ├── freeswitch
  347. │   ├── fs_cli
  348. │   ├── fs_encode
  349. │   ├── fs_ivrd
  350. │   ├── fsxs
  351. │   ├── gentls_cert
  352. │   └── tone2wav
  353. ├── etc # 配置文件 (老版本 是 conf 目录)
  354. │   └── freeswitch # 配置conf 拨号dianplan 聊天chatplan 用户directory 分词phrase
  355. │   ├── autoload_configs # 模块级的配置文件,在系统启动时装入
  356. │   │   ├── abstraction.conf.xml
  357. │   │   ├── acl.conf.xml
  358. │   │   ├── alsa.conf.xml
  359. │   │   ├── amqp.conf.xml
  360. │   │   ├── avmd.conf.xml
  361. │   │   ├── blacklist.conf.xml
  362. │   │   ├── callcenter.conf.xml
  363. │   │   ├── cdr_csv.conf.xml
  364. │   │   ├── cdr_mongodb.conf.xml
  365. │   │   ├── cdr_pg_csv.conf.xml
  366. │   │   ├── cdr_sqlite.conf.xml
  367. │   │   ├── cepstral.conf.xml
  368. │   │   ├── cidlookup.conf.xml
  369. │   │   ├── conference.conf.xml
  370. │   │   ├── conference_layouts.conf.xml
  371. │   │   ├── console.conf.xml
  372. │   │   ├── db.conf.xml
  373. │   │   ├── dialplan_directory.conf.xml
  374. │   │   ├── dingaling.conf.xml
  375. │   │   ├── directory.conf.xml
  376. │   │   ├── distributor.conf.xml
  377. │   │   ├── easyroute.conf.xml
  378. │   │   ├── enum.conf.xml
  379. │   │   ├── erlang_event.conf.xml
  380. │   │   ├── event_multicast.conf.xml
  381. │   │   ├── event_socket.conf.xml
  382. │   │   ├── fax.conf.xml
  383. │   │   ├── fifo.conf.xml
  384. │   │   ├── format_cdr.conf.xml
  385. │   │   ├── graylog2.conf.xml
  386. │   │   ├── hash.conf.xml
  387. │   │   ├── hiredis.conf.xml
  388. │   │   ├── httapi.conf.xml
  389. │   │   ├── http_cache.conf.xml
  390. │   │   ├── ivr.conf.xml
  391. │   │   ├── java.conf.xml
  392. │   │   ├── kazoo.conf.xml
  393. │   │   ├── lcr.conf.xml
  394. │   │   ├── local_stream.conf.xml
  395. │   │   ├── logfile.conf.xml
  396. │   │   ├── lua.conf.xml
  397. │   │   ├── memcache.conf.xml
  398. │   │   ├── modules.conf.xml
  399. │   │   ├── mongo.conf.xml
  400. │   │   ├── nibblebill.conf.xml
  401. │   │   ├── opal.conf.xml
  402. │   │   ├── opus.conf.xml
  403. │   │   ├── oreka.conf.xml
  404. │   │   ├── osp.conf.xml
  405. │   │   ├── perl.conf.xml
  406. │   │   ├── pocketsphinx.conf.xml
  407. │   │   ├── portaudio.conf.xml
  408. │   │   ├── post_load_modules.conf.xml
  409. │   │   ├── presence_map.conf.xml
  410. │   │   ├── python.conf.xml
  411. │   │   ├── redis.conf.xml
  412. │   │   ├── rss.conf.xml
  413. │   │   ├── rtmp.conf.xml
  414. │   │   ├── sangoma_codec.conf.xml
  415. │   │   ├── shout.conf.xml
  416. │   │   ├── skinny.conf.xml
  417. │   │   ├── smpp.conf.xml
  418. │   │   ├── sms_flowroute.conf.xml
  419. │   │   ├── sofia.conf.xml
  420. │   │   ├── spandsp.conf.xml
  421. │   │   ├── switch.conf.xml
  422. │   │   ├── syslog.conf.xml
  423. │   │   ├── timezones.conf.xml
  424. │   │   ├── translate.conf.xml
  425. │   │   ├── tts_commandline.conf.xml
  426. │   │   ├── unicall.conf.xml
  427. │   │   ├── unimrcp.conf.xml
  428. │   │   ├── v8.conf.xml
  429. │   │   ├── verto.conf.xml
  430. │   │   ├── voicemail.conf.xml
  431. │   │   ├── voicemail_ivr.conf.xml
  432. │   │   ├── xml_cdr.conf.xml
  433. │   │   ├── xml_curl.conf.xml
  434. │   │   ├── xml_rpc.conf.xml
  435. │   │   ├── xml_scgi.conf.xml
  436. │   │   └── zeroconf.conf.xml
  437. │   ├── chatplan # 聊天计划
  438. │   │   └── default.xml
  439. │   ├── dialplan # 拨号计划
  440. │   │   ├── default
  441. │   │   ├── default.xml
  442. │   │   ├── features.xml
  443. │   │   ├── public
  444. │   │   ├── public.xml
  445. │   │   ├── skinny-patterns
  446. │   │   └── skinny-patterns.xml
  447. │   ├── directory # 用户目录 默认定义了 1000 ~ 1019 一共 20 个用户
  448. │   │   ├── default
  449. │   │   └── default.xml
  450. │   ├── extensions.conf
  451. │   ├── freeswitch.xml # 将所有配置文件“粘”到一起 | X-PRE-PROCESS 预处理指令
  452. │   ├── fur_elise.ttml
  453. │   ├── ivr_menus
  454. │   │   ├── demo_ivr.xml
  455. │   │   └── new_demo_ivr.xml
  456. │   ├── jingle_profiles
  457. │   │   ├── client.xml
  458. │   │   └── server.xml
  459. │   ├── lang
  460. │   │   ├── de
  461. │   │   ├── en
  462. │   │   ├── es
  463. │   │   ├── fr
  464. │   │   ├── he
  465. │   │   ├── pt
  466. │   │   ├── ru
  467. │   │   └── sv
  468. │   ├── mime.types
  469. │   ├── mrcp_profiles
  470. │   │   ├── loquendo-7-mrcp-v2.xml
  471. │   │   ├── nuance-1.0.0-mrcp-v1.xml
  472. │   │   ├── nuance-5.0-mrcp-v1.xml
  473. │   │   ├── nuance-5.0-mrcp-v2.xml
  474. │   │   ├── unimrcpserver-mrcp-v1.xml
  475. │   │   ├── vestec-mrcp-v1.xml
  476. │   │   └── voxeo-prophecy-8.0-mrcp-v1.xml
  477. │   ├── notify-voicemail.tpl
  478. │   ├── sip_profiles # SIP 配置文件
  479. │   │   ├── external
  480. │   │   ├── external-ipv6
  481. │   │   ├── external-ipv6.xml
  482. │   │   ├── external.xml
  483. │   │   ├── internal-ipv6.xml
  484. │   │   └── internal.xml
  485. │   ├── skinny_profiles
  486. │   │   └── internal.xml
  487. │   ├── tetris.ttml
  488. │   ├── tls
  489. │   │   ├── dtls-srtp.pem
  490. │   │   └── wss.pem
  491. │   ├── vars.xml # 通过 X-PRE-PROCESS 指令定义了全局变量
  492. │   ├── voicemail.tpl
  493. │   └── web-vm.tpl
  494. ├── include # 头文件
  495. │   └── freeswitch
  496. │   ├── libteletone_detect.h
  497. │   ├── libteletone_generate.h
  498. │   ├── libteletone.h
  499. │   ├── switch_am_config.h
  500. │   ├── switch_apr.h
  501. │   ├── switch_buffer.h
  502. │   ├── switch_caller.h
  503. │   ├── switch_channel.h
  504. │   ├── switch_config.h
  505. │   ├── switch_console.h
  506. │   ├── switch_core_db.h
  507. │   ├── switch_core_event_hook.h
  508. │   ├── switch_core.h
  509. │   ├── switch_core_media.h
  510. │   ├── switch_core_video.h
  511. │   ├── switch_cpp.h
  512. │   ├── switch_curl.h
  513. │   ├── switch_dso.h
  514. │   ├── switch_estimators.h
  515. │   ├── switch_event.h
  516. │   ├── switch_frame.h
  517. │   ├── switch.h
  518. │   ├── switch_hashtable.h
  519. │   ├── switch_image.h
  520. │   ├── switch_ivr.h
  521. │   ├── switch_jitterbuffer.h
  522. │   ├── switch_json.h
  523. │   ├── switch_limit.h
  524. │   ├── switch_loadable_module.h
  525. │   ├── switch_log.h
  526. │   ├── switch_module_interfaces.h
  527. │   ├── switch_mprintf.h
  528. │   ├── switch_nat.h
  529. │   ├── switch_odbc.h
  530. │   ├── switch_pgsql.h
  531. │   ├── switch_platform.h
  532. │   ├── switch_regex.h
  533. │   ├── switch_resample.h
  534. │   ├── switch_rtcp_frame.h
  535. │   ├── switch_rtp.h
  536. │   ├── switch_scheduler.h
  537. │   ├── switch_stun.h
  538. │   ├── switch_types.h
  539. │   ├── switch_utf8.h
  540. │   ├── switch_utils.h
  541. │   ├── switch_vpx.h
  542. │   ├── switch_xml_config.h
  543. │   ├── switch_xml.h
  544. │   └── tpl.h
  545. ├── lib # 库文件
  546. │   ├── freeswitch
  547. │   │   └── mod # 可加载 模块
  548. │   │   ├── mod_amr.la
  549. │   │   ├── mod_amr.so
  550. │   │   ├── mod_b64.la
  551. │   │   ├── mod_b64.so
  552. │   │   ├── mod_cdr_csv.la
  553. │   │   ├── mod_cdr_csv.so
  554. │   │   ├── mod_cdr_sqlite.la
  555. │   │   ├── mod_cdr_sqlite.so
  556. │   │   ├── mod_commands.la
  557. │   │   ├── mod_commands.so
  558. │   │   ├── mod_conference.la
  559. │   │   ├── mod_conference.so
  560. │   │   ├── mod_console.la
  561. │   │   ├── mod_console.so
  562. │   │   ├── mod_db.la
  563. │   │   ├── mod_db.so
  564. │   │   ├── mod_dialplan_asterisk.la
  565. │   │   ├── mod_dialplan_asterisk.so
  566. │   │   ├── mod_dialplan_xml.la
  567. │   │   ├── mod_dialplan_xml.so
  568. │   │   ├── mod_dptools.la
  569. │   │   ├── mod_dptools.so
  570. │   │   ├── mod_esf.la
  571. │   │   ├── mod_esf.so
  572. │   │   ├── mod_event_socket.la
  573. │   │   ├── mod_event_socket.so
  574. │   │   ├── mod_expr.la
  575. │   │   ├── mod_expr.so
  576. │   │   ├── mod_fifo.la
  577. │   │   ├── mod_fifo.so
  578. │   │   ├── mod_fsv.la
  579. │   │   ├── mod_fsv.so
  580. │   │   ├── mod_g723_1.la
  581. │   │   ├── mod_g723_1.so
  582. │   │   ├── mod_g729.la
  583. │   │   ├── mod_g729.so
  584. │   │   ├── mod_h26x.la
  585. │   │   ├── mod_h26x.so
  586. │   │   ├── mod_hash.la
  587. │   │   ├── mod_hash.so
  588. │   │   ├── mod_httapi.la
  589. │   │   ├── mod_httapi.so
  590. │   │   ├── mod_local_stream.la
  591. │   │   ├── mod_local_stream.so
  592. │   │   ├── mod_logfile.la
  593. │   │   ├── mod_logfile.so
  594. │   │   ├── mod_loopback.la
  595. │   │   ├── mod_loopback.so
  596. │   │   ├── mod_lua.la
  597. │   │   ├── mod_lua.so
  598. │   │   ├── mod_native_file.la
  599. │   │   ├── mod_native_file.so
  600. │   │   ├── mod_opus.la
  601. │   │   ├── mod_opus.so
  602. │   │   ├── mod_png.la
  603. │   │   ├── mod_png.so
  604. │   │   ├── mod_rtc.la
  605. │   │   ├── mod_rtc.so
  606. │   │   ├── mod_say_en.la
  607. │   │   ├── mod_say_en.so
  608. │   │   ├── mod_skinny.la
  609. │   │   ├── mod_skinny.so
  610. │   │   ├── mod_sms.la
  611. │   │   ├── mod_sms.so
  612. │   │   ├── mod_sndfile.la
  613. │   │   ├── mod_sndfile.so
  614. │   │   ├── mod_sofia.la
  615. │   │   ├── mod_sofia.so
  616. │   │   ├── mod_spandsp.la
  617. │   │   ├── mod_spandsp.so
  618. │   │   ├── mod_syslog.la
  619. │   │   ├── mod_syslog.so
  620. │   │   ├── mod_tone_stream.la
  621. │   │   ├── mod_tone_stream.so
  622. │   │   ├── mod_valet_parking.la
  623. │   │   ├── mod_valet_parking.so
  624. │   │   ├── mod_verto.la
  625. │   │   ├── mod_verto.so
  626. │   │   ├── mod_voicemail.la
  627. │   │   ├── mod_voicemail.so
  628. │   │   ├── mod_xml_cdr.la
  629. │   │   ├── mod_xml_cdr.so
  630. │   │   ├── mod_xml_rpc.la
  631. │   │   ├── mod_xml_rpc.so
  632. │   │   ├── mod_xml_scgi.la
  633. │   │   └── mod_xml_scgi.so
  634. │   ├── libfreeswitch.a
  635. │   ├── libfreeswitch.la
  636. │   ├── libfreeswitch.so -> libfreeswitch.so.1.0.0
  637. │   ├── libfreeswitch.so.1 -> libfreeswitch.so.1.0.0
  638. │   ├── libfreeswitch.so.1.0.0
  639. │   └── pkgconfig
  640. │   └── freeswitch.pc
  641. ├── share
  642. │   └── freeswitch
  643. │   ├── fonts
  644. │   │   ├── FreeMonoBoldOblique.ttf
  645. │   │   ├── FreeMonoBold.ttf
  646. │   │   ├── FreeMonoOblique.ttf
  647. │   │   ├── FreeMono.ttf
  648. │   │   ├── FreeSansBoldOblique.ttf
  649. │   │   ├── FreeSansBold.ttf
  650. │   │   ├── FreeSansOblique.ttf
  651. │   │   ├── FreeSans.ttf
  652. │   │   ├── FreeSerifBoldItalic.ttf
  653. │   │   ├── FreeSerifBold.ttf
  654. │   │   ├── FreeSerifItalic.ttf
  655. │   │   ├── FreeSerif.ttf
  656. │   │   ├── OFL.txt
  657. │   │   └── README.fonts
  658. │   ├── grammar # 语法 用于 ASR
  659. │   ├── htdocs # HTTP Server 根目录
  660. │   │   ├── license.txt
  661. │   │   ├── portal
  662. │   │   ├── slim.swf
  663. │   │   └── slimtest.htm
  664. │   ├── scripts # 嵌入式语音写脚本,如使用 lua() luarun() jsrun 等默认寻找路径
  665. │   └── sounds # 声音文件
  666. │   ├── en
  667. │   └── music
  668. └── var
  669. ├── lib
  670. │   └── freeswitch
  671. │   ├── db # 系统数据库(sqlite)呼叫信息存放(方便查询无需对核心数据加锁)
  672. │   ├── images
  673. │   ├── recordings # 录音 使用 record() 时 默认的存放路径
  674. │   └── storage # 语音留言 Voiceemail 录音,下载缓存 http_file_cache
  675. ├── log # 日志 CDR
  676. │   └── freeswitch
  677. │   ├── cdr-csv
  678. │   ├── freeswitch.history
  679. │   ├── freeswitch.log
  680. │   ├── freeswitch.log.1
  681. │   ├── freeswitch.log.2
  682. │   ├── freeswitch.xml.fsxml # 是FreeSWITCH内部XML内存镜像,动态生成 调试 reloadxml
  683. │   └── xml_cdr
  684. └── run # 运行目录 存放 FS 运行时的 PID
  685. └── freeswitch
  686. └── freeswitch.pid
  687.  
  688. 57 directories, 285 files
  689.  
  690. [root@highsea-macos-vmware-centos6 ~]# tree ./freeswitch/share/freeswitch/sounds/ -L 4
  691. ./freeswitch/share/freeswitch/sounds/
  692. ├── en # en(英文) 【中文目录也类似】
  693. │   └── us # 美式英文
  694. │   └── callie # 嗓音 (不同人 音调 音色 不同)
  695. │   ├── ascii
  696. │   ├── base256
  697. │   ├── conference
  698. │   ├── currency
  699. │   ├── digits
  700. │   ├── directory
  701. │   ├── ivr
  702. │   ├── misc
  703. │   ├── phonetic-ascii
  704. │   ├── time
  705. │   ├── voicemail
  706. │   └── zrtp
  707. └── music # 保持音乐
  708. ├── 16000
  709. │   └── suite-espanola-op-47-leyenda.wav
  710. ├── 32000
  711. │   └── suite-espanola-op-47-leyenda.wav
  712. ├── 48000
  713. │   └── suite-espanola-op-47-leyenda.wav
  714. └── 8000
  715. └── suite-espanola-op-47-leyenda.wav
  716.  
  717. 20 directories, 4 files
  718.  
  719.  
  720. [root@highsea-macos-vmware-centos6 ~]# tree ./freeswitch/var/lib/freeswitch/storage/
  721. ./freeswitch/var/lib/freeswitch/storage/
  722. ├── http_file_cache # 从其他HTTP服务器下载过来的语音文件缓存
  723. └── voicemail # 分层级存放
  724. └── default # default | domain
  725. ├── 192.168.1.28
  726. │   ├── 1003
  727. │   └── 1004
  728. └── 192.168.199.209
  729. ├── 1000
  730. │   └── msg_746b8d72-1c83-11e8-b7cf-1f706e5b1202.wav
  731. └── 1001
  732. ├── msg_16df1586-1c59-11e8-a529-8b3c11f45198.wav
  733. ├── msg_527ff080-1c57-11e8-a3d5-fb5cd572174a.wav
  734. ├── msg_54fe15e2-1c59-11e8-a564-8b3c11f45198.wav
  735. ├── msg_807f9aa0-1c4b-11e8-a322-9784cd23ef5e.wav
  736. ├── msg_817835c2-1c99-11e8-b8d0-1f706e5b1202.wav
  737. ├── msg_ab140ae4-1c50-11e8-a357-9784cd23ef5e.wav
  738. ├── msg_c0c74cf2-1c50-11e8-a38d-9784cd23ef5e.wav
  739. └── msg_f349a476-1c83-11e8-b808-1f706e5b1202.wav
  740.  
  741. 9 directories, 9 files
  742.  
  743. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement