Install the Certificate into FreeSWITCHweb
Replace sipjs.com with the domain name that you used to generate the certificate.chrome
其余还有配置在本文档的 《Freeswitch/wss》的章节。websocket
echo '' >> /usr/local/freeswitch/certs/wss.pem &&app
cat cert.pem >> /usr/local/freeswitch/certs/wss.pem &&dom
cat privkey.pem >> /usr/local/freeswitch/certs/wss.pem &&socket
cat chain.pem >> /usr/local/freeswitch/certs/wss.pem网站
240(139)上放了我申请的 gt.hhxx.com 的数字证书。.net
https://blog.csdn.net/ererfei/article/details/783309733d
由于webRTC须要https,因此对应的FreeSWITCH提供WebSocket服务也要wssserver
conf/var.xml中有两个开关,要设置true
<X-PRE-PROCESS cmd="set" data="internal_ssl_enable=true"/>
<X-PRE-PROCESS cmd="set" data="external_ssl_enable=true"/>
conf/sip_profiles/internal.xml 中确保wss配置打开(SIP 服务的端口是 5060 ,默认ws端口是5066,而wss的默认端口是7443):
<!-- for sip over websocket support -->
<param name="ws-binding" value=":5066"/>
<!-- for sip over secure websocket support -->
<!-- You need wss.pem in $${certs_dir} for wss or one will be created for you -->
<param name="wss-binding" value=":7443"/>
配置完成以后,重启freeswitch生效。
https://my.oschina.net/andywang1988/blog/1928391
这里有个关于 apply-candidate-acl
如今有几个疑点:
1 chrome只容许https的网站使用摄像头和mic,因此咱们的web须要用https(也要申请一张数字证书, 最好是用子域名申请而不是用ip申请)
2 freeswitch端须要用wss协议,也须要一张数字证书; (备注:若是freeswitch和web server放在同一台机,可能能够公用一张数字证书;)
3 防火墙须要容许一些端口,好比7443, 5060, 5066等等 还有一些动态的udp端口;
4 要确保演示用的主机上安装了摄像头和mic,而且容许chrome使用摄像头和mic;
5 若是内网不能上外网而致使dns没法解析, 能够经过增长host文件的方式指定域名/ip映射关系。