freeswitch verto communicator客户端

概述
我们在web客户端使用sip协议时用的比较多的是sipml5库和jssip库。
但是sip协议比较重,又复杂,所以freeswitch内部就自定义了一个verto协议,方便在web页面上使用音视频服务。
verto协议通过websocket传输信令,协议内部数据格式为json,这样比较符合互联网开发人员的习惯,同时比sip协议更加轻量化。
freeswitch有一个endpoint模块叫做mod_verto,是用来作为服务端的协议适配器。
freeswitch的源码中有几个支持verto协议的web客户端实现,分别是verto demo、video_demo和verto communicator等,都是基于js实现的。
verto客户端的源码在freeswitch-1.8.7_master\html5\verto目录下,用户可以自行查看。
今天我们主要介绍一下verto communicator的安装部署过程。
verto communicator
verto communicator的官方介绍页面:https://freeswitch.org/confluence/display/FREESWITCH/Verto+Communicator 。
verto communicator是基于nodejs安装部署的,源代码目录中已经有nodejs相关的工具配置文件,可以快速的安装、部署、构建和运行verto communicator客户端。
但是呵呵,这玩意用的人少,所以维护更新也少,安装过程中大坑小坑很多。
坑一,nodejs不熟悉。先去学习nodejs的教程和基本使用方法。
坑二,npm的包安装要区分全局和本地。先去学习npm工具的基本教程。
坑三,bower安装依赖库时,git链接各种问题。拆分命令,多次尝试。
坑四,grunt对nodejs版本有要求。centos7默认的nodejs版本最高只有6.17,需要使用至少8+的版本。
唯一欣慰的一点就是,在verto communicator目录下安装成功过一次,再把整个目录拷贝到其他地方,就可以直接使用了。
环境
centos:CentOS release 7.0 (Final)或以上版本
freeswitch:v1.8.7
GCC:4.8.5
安装部署
进入verto communicator目录
cd /root/freeswitch-1.8.7_master/html5/verto/verto_communicator
安装npm工具
yum install npm
安装nodejs版本管理工具n,安装nodejs的8+版本并选定
npm install -g n
n 8
n lts
n
使用n选定nodejs8版本后,重启ssh终端
安装工具bower和grunt
npm install -g bower grunt
使用npm安装依赖库
npm install
使用bower安装依赖库,这一步巨坑无比
方法一,默认方法,但是无限失败
bower --allow-root install
方法二,拆分依赖库安装步骤,最后再合并
诀窍是。。。多试几次,然后祈祷。。。因为我第2次重装的时候,怎么都是失败
mv bower.json bower.json.back
bower --allow-root init
bower install --allow-root moment/moment@~2.9.0 --save
bower install --allow-root jquery@~2.1.4 --save
bower install --allow-root js-cookie/js-cookie@~1.4.1 --save
bower install --allow-root jquery-json@~2.5.1 --save
bower install --allow-root angular@~1.3.15 --save
bower install --allow-root angular-gravatar@~0.4.1 --save
bower install --allow-root bootstrap@~3.3.4 --save
bower install --allow-root angular-toastr@~1.4.1 --save
bower install --allow-root angular-sanitize@~1.3.15 --save
bower install --allow-root angular-route@~1.3.15 --save
bower install --allow-root bower-angular@~1.2.16 --save
bower install --allow-root angular-prompt@~1.1.1 --save
bower install --allow-root angular-animate@~1.3.15 --save
bower install --allow-root angular-cookies@~1.3.15 --save
bower install --allow-root angular-directive.g-signin@~0.1.2 --save
bower install --allow-root angular-fullscreen@~1.0.1 --save
bower install --allow-root ngstorage@~0.3.9 --save
bower install --allow-root humanize-duration#~3.10.0 --save
bower install --allow-root angular-timer@~1.3.3 --save
bower install --allow-root angular-tooltips@~0.1.21 --save
bower install --allow-root datatables@~1.10.8 --save
bower install --allow-root angular-bootstrap@~0.14.3 --save
bower install --allow-root mdbootstrap/bootstrap-material-design@~0.3.0 --save
bower install --allow-root angular-translate@~2.10.0 --save
bower install --allow-root angular-translate-loader-static-files@~2.10.0 --save
bower install --allow-root angular-click-outside@~2.9.2 --save
mv bower.json.back bower.json
修改bower.json文件:
"bootstrap-material-design": "~0.3.0"修改为 "bootstrap-material-design": "mdbootstrap/bootstrap-material-design#~0.3.0"
bower --allow-root install
使用grunt构建
grunt build --force
配置启动
在安装部署的所有步骤都成功的情况下,直接启动
[root@localhost verto_communicator]# grunt serve
Running "serve" task
Running "wiredep:app" (wiredep) task
Running "concurrent:server" (concurrent) task
Running "copy:styles" (copy) task
Copied 1 file
Done, without errors.
Execution Time (2021-09-16 09:19:36 UTC+8)
loading tasks 372ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 95%
loading grunt-contrib-copy 6ms ▇ 2%
copy:styles 13ms ▇▇ 3%
Total 391ms
Running "postcss:dist" (postcss) task
>> 1 processed stylesheet created.
Running "browserSync:livereload" (browserSync) task
[Browsersync] Access URLs:
------------------------------------
Local: https://localhost:9001
External: https://192.168.0.152:9001
------------------------------------
[Browsersync] Serving files from: ../js/src/
[Browsersync] Serving files from: ./js
[Browsersync] Serving files from: .
[Browsersync] Watching files...
Running "watch" task
Waiting...
测试
浏览器打开URL:https://192.168.0.152:9001

按照freeswitch server的注册信息配置字段。
其中,websocket URL地址必须使用域名方式才能正常登陆,可以通过修改本地host,将域名直接指向fs注册服务器地址的方式来实现。
总结
verto协议是基于json的轻量化协议,在web应用中使用和实现都非常方便。
其中verto communicator在nodejs环境的安装部署过程中问题太多,而且难以解决,不推荐使用。(也可能是因为本人对nodejs不熟悉,如果有更好的解决方案,请留言,多谢)
空空如常
求真得真
freeswitch verto communicator客户端的更多相关文章
- FreeSWITCH 1.2.5.3 Step by Step Install
Ubuntu: apt-get -y install build-essential automake autoconf git-core wget libtool apt-get -y instal ...
- freeswitch与外部网关链接
我建了一个 Freeswitch 内核研究 交流群, 45211986, 欢迎加入, 另外,提供基于SIP的通信服务器及客户端解决方案, 承接 sip/ims 视频客户端开发,支持接入sip软交换,i ...
- FreeSWITCH 学习笔记
[1]FreeSWITCH学习笔记 1.Windows安装包下载地址:http://files.freeswitch.org/windows/installer/ 2.源码下载地址:http://fi ...
- PKI系统深入介绍
公钥基础设施(Public Key Infrastructure,简称PKI)是目前网络安全建设的基础与核心,是电子商务安全实施的基本保障,因 此,对PKI技术的研究和开发成为目前信息安全领域的热点. ...
- [转帖]PKI系统深入介绍
PKI系统深入介绍 https://blog.csdn.net/liuhuiyi/article/details/7776825 2012年07月23日 20:17:01 liuhuiyi 阅读数 4 ...
- FreeSWITCH 客户端fs_cli连接设置(acl)
FreeSWITCH 默认配置只能 在本机连接, 要从 外面连接, 就要配置: acl.conf.xml::network-lists/list event_socket.conf.xml::appl ...
- [原创]如何让freeswitch转发客户端自定义的INFO消息
如何让freeswitch转发客户端自定义的INFO消息 英文概述: this article is about how to configure freeswitch to forward self ...
- FreeSWITCH视频直播
大家都知道,如今,视频直播比较火啊. 今天,在FreeSWITCH精英群里分享了FreeSWITCH做视频直播相关的技术. 首先,要做直播就得有好机器.笔者买了一台阿里云的主机,买的是按量付费的,4核 ...
- freeswitch注册过程分析
操作系统:debian8.5_x64freeswitch 版本 : 1.6.8 本文仅描述sip注册的简单场景,即话机直接向处于同一个局域网的fs进行注册. SIP协议的消息结构 消息框架 SIP协议 ...
随机推荐
- 阿里云函数计算发布新功能,支持容器镜像,加速应用 Serverless 进程
我们先通过一段视频来看看函数计算和容器相结合后,在视频转码场景下的优秀表现.点击观看视频 >> FaaS 的门槛 Serverless 形态的云服务帮助开发者承担了大量复杂的扩缩容.运维. ...
- 题解 CF241E Flights
题目传送门 题目大意 给出一个 \(n\) 个点 \(m\) 条边的 \(\texttt{DAG}\) ,给每条边设定边权为 \(1\) 或者 \(2\) ,使得 \(1\to n\) 的每条路径长度 ...
- Linux Manual
man 命令用来访问存储在Linux系统上的手册页面.在想要查找的工具的名称前面输入man命 令,就可以找到那个工具相应的手册条目. 手册页不是唯一的参考资料.还有另一种叫作 info 页面的信息.可 ...
- [no code][scrum meeting] Alpha 11
项目 内容 会议时间 2020-04-17 会议主题 OCR紧急技术风险分析 会议时长 30min 参会人员 PM+OCR组成员 $( "#cnblogs_post_body" ) ...
- hystrix的配置说明
在我们的日常开发中,有些时候需要和第三方系统进行对接操作,或者调用其他系统的 api 接口,但是我们不能保证这些第三方系统的接口一定是稳定的,当系统中产生大量的流量来访问这些第三方接口,这些第三方系统 ...
- python +spatialite + window 解决方案(https://www.jianshu.com/p/5bc7d8b7b429)
运行环境在windows 10 64bit.先将python安装完成.然后,到 spatilite官网 找到MS(即Microsoft)版本,下载64位的mod_spatialite,将其先解压到目标 ...
- 洛谷 P5665 [CSP-S2019] 划分
链接: P5665 题意: 给出 \(n\) 个整数 \(a_i\) ,你需要找到一些分界点 \(1 \leq k_1 \lt k_2 \lt \cdots \lt k_p \lt n\),使得 \( ...
- 21.6.21 test
\(NOI\) 模拟赛 字符串滚出 \(OI\) 看到题目名称,\(T1\) 串,\(T2\) 两个串,\(T3\) K个串,我 \(\cdots\),血压已经上来了. \(T1\) 写了 \(O(n ...
- Huffman算法
一.Huffman算法介绍 霍夫曼编码(英语:Huffman Coding),又译为哈夫曼编码.赫夫曼编码,是一种用于无损数据压缩的熵编码(权编码)算法.在计算机数据处理中,霍夫曼编码使用变长编码表对 ...
- Luogu P1563 [NOIp2016提高组]玩具谜题 | 模拟
题目链接 纯模拟题,没啥好说的,就是要判断地方有点多,一定要注意细节. #include<iostream> #include<cstdio> #include<fstr ...