freeswitch

第三篇:断路器(Hystrix)(Feign中使用断路器)

不羁岁月 提交于 2020-01-01 01:57:08
在微服务架构中,根据业务来拆分成一个个的服务,服务与服务之间可以相互调用(RPC),在Spring Cloud可以用RestTemplate+Ribbon和Feign来调用。为了保证其高可用,单个服务通常会集群部署。由于网络原因或者自身的原因,服务并不能保证100%可用,如果单个服务出现问题,调用这个服务就会出现线程阻塞,此时若有大量的请求涌入,Servlet容器的线程资源会被消耗完毕,导致服务瘫痪。服务与服务之间的依赖性,故障会传播,会对整个微服务系统造成灾难性的严重后果,这就是服务故障的“雪崩”效应。 为了解决这个问题,业界提出了断路器模型。 一 断路器简介 Netflix开源了Hystrix组件,实现了断路器模式,SpringCloud对这一组件进行了整合。 在微服务架构中,一个请求需要调用多个服务是非常常见的,如下图: 较底层的服务如果出现故障,会导致连锁故障。当对特定的服务的调用的不可用达到一个阀值(Hystric 是5秒20次) 断路器将会被打开。 断路打开后,可用避免连锁故障,fallback方法可以直接返回一个固定值。 二 准备工作 继续上一章的工程,启动eureka-server,callcenter-freeswitch 三 Feign中使用断路器 Feign是自带断路器的,在D版本的Spring Cloud之后,它没有默认打开。需要在配置文件中配置打开它

SIP trunk config文件

杀马特。学长 韩版系。学妹 提交于 2019-12-25 16:24:43
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> [General Settings]中 Maximum Channels 设置为CTS提供SIP Trunk的并发数量 [Outgoing Settings]中设置 PEER Details 为如下内容: username=12345678 (CTS提供的SIP Trunk配置号码) type=friend secret=xxxxxxxxxxxx (CTS提供的SIP Trunk配置密码) qualify=yes port=5060 nat=yes insecure=very host=voip.cts.sh.cn fromuser=12345678 (CTS提供的SIP Trunk配置号码) fromdomain=voip.cts.sh.cn dtmfmode=rfc2833 disallow=all context=from-trunk canreinvite=yes allow=gsm&ulaw&alaw&g729&ilbc [Incoming Settings]中设置 USER Details 为如下内容:(如果仅申请呼出号码无需填写) username=12345678 (CTS提供的SIP Trunk配置号码) type=friend secret=xxxxxxxxxxxx (CTS提供的SIP

SIP Trunk / SIP 中继服务

风流意气都作罢 提交于 2019-12-25 16:01:35
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> CTS SIP Trunk/SIP中继可以让你现有的IPPBX连接到CTS的平台从而使用VOIP外线落地。享受拨打全国统一资费0.09元,多路中继号码,可接听电话。如果你已经有了IPPBX系统,使用CTS SIP Trunk企业级VOIP中继/SIP中继话务服务,可以让你在外呼电话时节省更多的钱 ,让您的VOIP系统对内对外都实现真正的 Over IP。使用CTS SIP Trunk/SIP中继无需硬件语音板卡,无需电话线路,只需一条网线,架设从内部分机到外呼电话的完全 VOIP 系统。不限企业地域,全国均可使用。如需办理请电话咨询:4008290998. 备注:使用CTS SIP Trunk服务,几乎任何的现有IPPBX均可以直接配置使用,无需任何硬件设备, 仅需支持SIP协议即可。例如:FreePBX,Asterisk,FreeSwitch,Trixbox,PBX IN A Flash,Elastix,3CX,AVAYA,Lync等等。 来源: oschina 链接: https://my.oschina.net/u/1452491/blog/200550

Unable to register to FreeSwitch server & unable to call SIP client (XLite) respectively using SIPml5 client

丶灬走出姿态 提交于 2019-12-25 04:53:11
问题 I am unable to register to FreeSwitch server & unable to call to SIP client (XLite) by using SIPml5 SIP client. Following is my HTML5 code: <!DOCTYPE html> <html> <head> <meta content="charset=utf-8"/> <script type="text/javascript" src="SIPml-api.js"></script> <title>SIP Client 1</title> <script type="text/javascript"> window.onload = function() { var readyCallback = function(e){ createSipStack(); // see next section }; var errorCallback = function(e){ console.error('Failed to initialize the

What is the relation between the Event Socket Library (ESL) and `mod_event_socket`?

主宰稳场 提交于 2019-12-24 19:20:41
问题 Is there any? Based on the ways the Event Socket Library (ESL) documentation (and FreeSWITCH books) refer to mod_event_socket , I was under the impression that mod_event_socket (src) (and derivatives, such as mod_erlang_event , mod_kazoo , etc.) are all built on libesl. As it turns out, only mod_esl (src) uses it. The way I currently understand it, both tap into FreeSWITCH's event system to control it, but ESL is a C library (libesl) that can be used to build external applications, and extend

FreeSwitch - I can't hear sound on Amazon EC2 server

烂漫一生 提交于 2019-12-23 01:28:56
问题 I've successfully installed FreeSwitch on Local Linux Server (CentOS 6.5), and it worked fine. I could make a call and hear sound from other device. I followed exactly same process on Amazon EC2 CentOS server. http://wiki.freeswitch.org/wiki/Linux_Quick_Install_Guide I opened all firewalls in case http://wiki.freeswitch.org/wiki/Firewall I can see that server is running fine. However, I couldn't hear any sound on EC2 Server. Does anyone had this issue? Thank you. 回答1: did you try to catch the

Call Recording in Freeswitch

筅森魡賤 提交于 2019-12-22 13:56:41
问题 I have a freeswitch working on one server and call is working fine. But now i want to record each and every call to some specific format like .wav OR .gsm I already tried with "record_session" application.Record session application Is it right application for record call ? If yes then please suggest me to some example and if not then suggest me other application also. 回答1: This question is old but I'll still answer it for the people who could benefit in future. record_session will record the

error: field 'ctx' has incomplete type EVP_CIPHER_CTX

我的梦境 提交于 2019-12-21 12:32:27
问题 Problem: I need to install Cepstral (tts engine) into Freeswitch running Debian 8. Freeswitch is already up and running, but I needed to build it from source in order for it create the mod_cepstral module. When I run make this is the error I get: In file included from ./crypto/include/prng.h:17:0, from ./crypto/include/crypto_kernel.h:50, from ./include/srtp.h:53, from srtp/srtp.c:46: ./crypto/include/aes_icm_ossl.h:66:20: error: field ‘ctx’ has incomplete type EVP_CIPHER_CTX ctx; ^~~ In file

freeswitch源码阅读 之 sofia模块

北战南征 提交于 2019-12-20 08:50:38
sofia模块在freeswitch中的位置非常重要, 所有的sip通话都和它有关, 那么我们就看一下该模块的执行流程。 一、 实现的功能: 1. sip注册; 2. 呼叫; 3. Presence; 4. SLA, 等。 二、 主要的方法, 有三个, 分别为: [cpp] view plain copy #define SWITCH_MODULE_LOAD_FUNCTION(name) switch_status_t name SWITCH_MODULE_LOAD_ARGS #define SWITCH_MODULE_RUNTIME_FUNCTION(name) switch_status_t name SWITCH_MODULE_RUNTIME_ARGS #define SWITCH_MODULE_SHUTDOWN_FUNCTION(name) switch_status_t name SWITCH_MODULE_SHUTDOWN_ARGS [cpp] view plain copy </pre><pre name= "code" class= "cpp">SWITCH_MODULE_LOAD_FUNCTION(mod_sofia_load); SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_sofia_shutdown); SWITCH_MODULE

freeswitch 呼叫的奥秘

☆樱花仙子☆ 提交于 2019-12-14 05:39:20
以下命令均可以按tap 补全记住开头即可 举个例子来说,杀掉正处于活跃状态、目标号码是1000的通话,命令为: fsctl hupall normal_clearing dialed_ext 1000 加载外部模块 load <mod_name> 检测模块是否存在 module_exists <module> 重载外部模块 reload [-f] <mod_name> 重新加载xml reloadxml 输出多种(模块)状态报告。 show codec - 列出所有编码 show application - 列出所有应用程序 show dialplan - 列出拨号方案涉及的模块 show file - 列出所有支持的文件类型 show calls - 列出当前的通话[count] show channels - 列出当前的通道 [count|like ] show modules - 列出所有模块 show nat_map - 列出地址映射表 show registrations - 列出所有注册用户 status --显示当前FreeSWITCH的运行状态 sofia status --显示注册网关 sofia status profile [ip/注册文件] [reg] 查看freeswitch 配置信息 输出日志等级 sofia tracelevel debug