
Freeswitch
okhelper
专注freeswitch软交换开发,三汇,东进设备及网关
展开
-
Docker-Nat后分机无法收到Bye消息
环境说明:分机1004拨打手机189010xxxxx,各种SIP信令和rtp语音流都正常,但是手机挂机后,分机无法挂机。经过抓包发现,在挂机之前,所有的SIP信令都发给了192.168.10.50的出口IP,但是Bye信令却发给了分机的IP地址192.168.31.205,导致分机无法收到bye消息。如果分机再192.168.2.0网段注册,可以正常挂机原因...原创 2020-05-01 18:21:06 · 1123 阅读 · 0 评论 -
CentOS7使用ODBC连接mysql时,程序崩溃
Freeswitch 1.4.26和使用Qt开发的应用程序,在CENTOS7下连接数据库时,都出现崩溃情况处理办法:1、odbc.ini配置在CentOS7中odbc的配置与CentOS6中不同,多了一个Threading参数2、查看unixODBC安装配置信息odbc.ini和odbcinst.ini默认是在/etc目录下,上图可见配置路径有问题export OD...原创 2019-11-04 14:34:55 · 506 阅读 · 0 评论 -
unimrcp配置文件模板-1
/usr/local/unimrcp/conf/unimrcpserver.xml修改配置文件中的IP地址即可<?xml version="1.0" encoding="UTF-8"?><!-- UniMRCP server document --><unimrcpserver xmlns:xsi="http://www.w3.org/2001/XMLS...原创 2019-11-02 23:06:15 · 1216 阅读 · 0 评论 -
freeswitch在通道中添加odbc_dsn
freeswitch原始通道,在mod_sofia中被创建在mod_sofia模块下,sofia.c中找到sofia_glue_attach_private函数的调用,该函数在sofia_glue.c中定义,在该函数的最下面可以找到设置通道名称的代码:if (channame) { sofia_glue_set_name(tech_pvt, channame); }我在该原创 2017-06-27 23:28:41 · 1371 阅读 · 0 评论 -
freeswitch获取SIP客户端IP地址
1)从SIP消息中获取SIP客户端的IP地址和端口信息 一般从mod_sofia模块中使用: char network_ip[80]; int port = 0; sofia_glue_get_addr(de->data->e_msg, network_ip, sizeof(network_ip), &port);原创 2016-12-19 14:58:51 · 3638 阅读 · 0 评论 -
freeswitch函数之switch_separate_string字符串分割
switch_separate_stringswitch_separate_string_string(char *buf, char *delim, _Post_count_(return) char **array, unsigned int arraylen);完成split的功能使用示例:char *params = "param_1=p1,para原创 2017-01-07 15:47:01 · 1713 阅读 · 0 评论 -
freeswitch结构之sip_from_t,sip_to_t
/** @To or @From header. */typedef struct sip_addr_s sip_addr_t;struct sip_addr_s{ sip_common_t a_common[1]; /** sip_error_t *a_next; char const *a_disp原创 2016-12-19 12:50:53 · 1215 阅读 · 0 评论 -
freeswitch结构之sip_t
/** Structure for accessing parsed SIP headers. */typedef struct sip_s sip_t; /**SIP message object. * * This structure contains a parsed SIP message. The struct is usua原创 2016-12-19 12:47:53 · 975 阅读 · 0 评论 -
freeswitch之顺振CDR
在dialplan中使用 来实现顺振 有这么几种情况:1、1001响铃后,接听电话2、1001无应答,1002响铃,1002接电话3、1001无应答,1002无应答 CDR一般保持a-leg第1种情况,CDR正常保存1001 第2种情况,CDR正常保存1002 第3种情况,1001,1002都没有接听电话,那么CDR种,保存的是第一个振铃分机10原创 2016-12-15 11:28:46 · 1838 阅读 · 0 评论 -
freeswitch函数之zstr
zstr 根据源代码中使用情况,可以用于字符串指针是否为空 指针: char* 或const char*const char* uuid;if(!zstr(uuid)){ //uuid不为空}原创 2016-12-14 16:00:35 · 1560 阅读 · 0 评论 -
Freeswitch Api 之uuid_bridge
uuid_bridge uuid_bridge与App的bridge不同,只产生一次CHANNEL_BRIDGE事件,并且只在a-leg上产生CHANNEL_BRIDGE事件原创 2017-02-06 15:58:00 · 5653 阅读 · 0 评论 -
Freeswitch呼叫中心
已经开发完成基于Freeswitch软交换的呼叫中心包含IVR、ACD、录音、播报坐席工号、评分功能坐席迁入、签出,保持、转移、接话、呼出、班长监听、强插、强拆、拦截等功能ACD: 坐席自动分配,分机自动分配转移:转移到坐席,转移到分机,转移到外线原创 2017-01-13 11:16:32 · 9319 阅读 · 12 评论 -
Freeswitch在configure时报错no acceptable C compiler found in $PATH
原因:没有安装gcc原创 2017-03-07 00:22:27 · 597 阅读 · 0 评论 -
switch_caller_profile中的times变量结构
struct switch_channel_timetable *times;SWITCH_BEGIN_EXTERN_C struct switch_channel_timetable { switch_time_t profile_created; switch_time_t created; switch_tim原创 2017-07-30 00:31:16 · 473 阅读 · 0 评论 -
Can't open lib '/usr/lib64/libmyodbc5.so' : file not found
Can't open lib '/usr/lib64/libmyodbc5.so' : file not found原创 2017-06-27 08:15:06 · 11887 阅读 · 0 评论 -
三汇IP卡板卡统一注册后,做被叫时返回USER_BUSY
三汇5.3.40版本驱动,所有通道统一账号注册到软交换(freeswitch,asterisk)后,作为被叫时,返回USER_BUSY。在配置文件的SIP模块添加 SipSearchChInRegisterChannel=1 的配置如下图:原创 2017-08-21 22:13:42 · 1197 阅读 · 1 评论 -
华为IAD设备命令配置IP地址
原创 2017-09-22 11:37:47 · 4384 阅读 · 0 评论 -
freeswitch 编译
安装依赖包yum -y install unixODBC-devel mysql-connector-odbc pcre-devel speex-devel libedit-devel openssl-develpostgresql-devel使用vim工具,打开module.conf注释mod_enum模块取消 mod_ilbc mod_rtmp 注释(可以以略...原创 2014-12-11 17:58:33 · 1197 阅读 · 0 评论 -
mod_xml_curl模块注册成功,呼叫提示未注册
环境描述:双网卡:外网网卡:172.16.1.100/24 网关:172.16.1.254内网网卡:192.168.2.33/24 未配置网关原创 2017-12-27 12:42:48 · 1510 阅读 · 0 评论 -
修改sofia源代码,屏蔽本地网关配置,加载MySQL中的网关配置
啥也不说了,直接上图看效果原创 2018-01-15 00:19:57 · 425 阅读 · 0 评论 -
freeswitch之多分机顺振
顺振,指呼叫一个分机无应答,继续呼叫下一个分机,直到有分机应答为止 originate user/1001|user/1002 &park 两个分机直接使用 | 隔开,freeswitch先呼叫第一个分机,如果无应答,则呼叫第2个分机。 如果第一个分机接听电话,就没有第2个分机什么事了!原创 2016-12-09 17:53:49 · 2112 阅读 · 0 评论 -
freeswitch之多分机同振
同振指多个分机同时振铃例如:客户拨打企业总机时,电话转移到客服部,这时根据考核要求,需要所有电话同时响铃,谁更多的接听电话,谁的业绩就会更加突出。在freeswitch控制台下可以进行如下测试完成要求:originate user/1001,user/1002 &park 两个分机直接用逗号分开,这样,1001和1002会同时响铃,其中一个接听电话,另外一个就会自原创 2016-12-06 22:45:13 · 2785 阅读 · 0 评论 -
根据uuid获取通道session
switch_core_session_t *session = NULL;if (!(session = switch_core_session_locate(channel_uuid))){ return ;}原创 2016-08-11 15:40:11 · 1194 阅读 · 0 评论 -
Freeswitch事件名称
static char *EVENT_NAMES[] = { "CUSTOM", "CLONE", "CHANNEL_CREATE", "CHANNEL_DESTROY", "CHANNEL_STATE", "CHANNEL_CALLSTATE", "CHANNEL_ANSWER", "CHANNEL_HANGUP", "CHANNEL_HANGUP_COMPL原创 2016-08-16 22:15:38 · 5332 阅读 · 0 评论 -
Freeswitch通道变量
2016-07-31 21:16:53.563386 [INFO] mod_dptools.c:1689 CHANNEL_DATA:Channel-State: [CS_EXECUTE]Channel-Call-State: [RINGING]Channel-State-Number: [4]Channel-Name: [sofia/internal/1001@192.16原创 2016-07-31 22:19:17 · 5925 阅读 · 0 评论 -
Freeswitch拨号计划条件
Freeswitch可用内部变量条件 context Why can we use the context as a field? Give us examples of usages please.rdnis Redirected Number, the directory number to which the call was last prese转载 2016-07-31 22:11:24 · 2015 阅读 · 0 评论 -
mod_callcenter坐席不显示来电号码
直接现象:坐席话机来电显示不是实际来电号码环境描述:由于项目实施时,还没有对freeswitch进行呼叫中心应用开发,所以对原有呼叫中心系统进行了改造,使上图中的架构可以应用于项目中继网关将PSTN过来的电话送到Freeswitch上东进keygoe通过SIP注册到Freeswitch上(1000分机),将Freeswitch当做出入局网关电话打进来原创 2016-01-08 13:14:37 · 2790 阅读 · 0 评论 -
Freeswitch订阅CUSTOM事件的问题
之前一直是esl_event(&handle,ESL_EVENT_TYPE_PLAIN,"ALL") 由于压力过大,程序经常崩溃,于是将各种事件分开订阅处理。其他CHANNEL事件都可以正常接收,但是CUSTOM接收不到,测试了好久,才找到问题原本订阅CUSTOM事件,只要这么写就ok,esl_event(&handle,ESL_EVENT_TYPE_PLAIN原创 2015-08-18 00:00:09 · 5410 阅读 · 0 评论 -
switch_call_cause_t
定义于freeswitch/src/include/switch_types.h暂时发现主要用于switch_channel_hangup(switch_channel_t *channel,switch_call_case_t) 将通道挂机typedef enum {SWITCH_CAUSE_NONE = 0,SWITCH_CAUSE_UNALLOCATED_N原创 2015-04-09 17:31:57 · 1315 阅读 · 0 评论 -
freeswitch透传号码
百问和权威指南中,都说明bridge送主叫号码使用origination_caller_id_number或effective_caller_id_number ,我被害了应该用origination_caller_id_name或effective_caller_id_name今天研究freeswitch向外透传号码,账号是sip账号注册到对方的vos平台上原原创 2015-04-07 17:54:20 · 10826 阅读 · 1 评论 -
Freeswitch时间格式化
Freeswitch中对时间进行格式化操作:常用格式:年月日 时分秒%Y 年%m 月 两位%d 日 两位%H 时 两位%M 分 两位%S 秒 两位%T 时间:HH:MM:SS原创 2015-04-01 15:04:31 · 1523 阅读 · 0 评论 -
根据session获取channel
switch_channel_t *channel = switch_core_session_get_channel(session);原创 2016-08-11 15:41:06 · 1041 阅读 · 0 评论 -
Freeswitch单一注册
在分机配置文件中,domain下面的params中添加: 来自百问原创 2016-08-24 11:56:16 · 1474 阅读 · 0 评论 -
freeswitch修改mod_sofia
原创 2016-12-02 11:47:37 · 1604 阅读 · 0 评论 -
freeswitch之顺振不振铃
最近在使用同振,顺振的功能看似简单的功能,却遇到各种各样的问题。 现在说一下我再使用顺振时遇到的问题: 电话呼入,进入dialplan后,我使用bridge顺振一组分机。 这样的!具体到应用中,还有其他更详细的设置。 在测试时,发现如果1001拒绝接电话,那么1002可以振铃问题来了,如果1001没有接听电话,超时应答的情况,则直接结束,1002不振铃。原创 2016-12-11 23:44:50 · 3086 阅读 · 0 评论 -
freeswitch结构之switch_core_session_t
struct switch_core_session { switch_memory_pool_t *pool; switch_thread_t *thread; switch_thread_id_t thread_id; switch_endpoint_interface_t *endpoint_interface; switch_size_t id; switch_se原创 2016-10-13 11:54:02 · 2020 阅读 · 0 评论 -
freeswitch结构之switch_channel_t
struct switch_channel { char *name; switch_call_direction_t direction; switch_call_direction_t logical_direction; switch_queue_t *dtmf_queue; switch_queue_t *dtmf_log_queue; switch_mutex_t原创 2016-10-13 11:59:52 · 1673 阅读 · 0 评论 -
Freeswitch结构之switch_caller_profile_t
struct switch_caller_profile { /*! The Call's User Name */ const char *username; /*! The name of the dialplan */ const char *dialplan; /*! Caller ID Name */ const char *caller_id_name; /原创 2016-10-25 17:43:41 · 811 阅读 · 0 评论 -
freeswitch结构之sofia_profile_t
typedef struct sofia_profile sofia_profile_t;struct sofia_profile { int debug; int parse_invite_tel_params; char *name; char *domain_name; char *dbname; char *dialplan; char *context原创 2016-12-01 15:19:59 · 2489 阅读 · 0 评论 -
freeswitch结构之switch_uuid_t
switch_apr.h typedef struct { unsigned char data[16]; /** } switch_uuid_t;使用说明:switch_uuid_t uuid;switch_uuid_get(&uuid); 获取一个新的UUIDswitch_uuid_format(session->uuid_str, &原创 2016-12-01 22:33:58 · 970 阅读 · 0 评论