freeswitch sofia协议栈调试
概述
freeswitch是一款简单好用的VOIP开源软交换平台。
fs内部使用sofia的sip协议栈,本文介绍如何调试跟踪sofia协议栈。
环境
centos:CentOS release 7.0 (Final)或以上版本
freeswitch:v1.10.7
GCC:4.8.5
调试接口
sofia loglevel <all|default|tport|iptsec|nea|nta|nth_client|nth_server|nua|soa|sresolv|stun> [0-9]
mod_sofia模块接口设置sofia sip协议栈的日志级别,0关闭调试日志,9最高包括函数调用退出流程的日志打印。
all会影响所有模块的日志级别。
tport Transport event
iptsec HTTP/SIP authentication module
nea Event engine
nta Transaction engine
nth_client HTTP Transactions Module
nth_server HTTP Transactions Module
nua User Agent engine
soa SDP Offer/Answer engine
sresolv Asynchronous DNS Resolver
stun STUN Client and Server Module
关闭sofia调试日志。
sofia loglevel all 0
测试
首先设置loglevel的级别,然后发起呼叫。
freeswitch@localhost.localdomain> fsctl loglevel 6
+OK log level: INFO [6]
freeswitch@localhost.localdomain> sofia loglevel all 9
Sofia log level for component [all] has been set to [9]
freeswitch@localhost.localdomain> tport.c:2749 tport_wakeup_pri() tport_wakeup_pri(0x7faf98004280): events IN
tport.c:2864 tport_recv_event() tport_recv_event(0x7faf98004280)
tport.c:3205 tport_recv_iovec() tport_recv_iovec(0x7faf98004280) msg 0x7faf98009370 from (udp/10.55.55.137:5080) has 1071 bytes, veclen = 1
tport.c:3023 tport_deliver() tport_deliver(0x7faf98004280): msg 0x7faf98009370 (1071 bytes) from udp/10.55.55.138:5080/sip next=(nil)
nta.c:2880 agent_recv_request() nta: received INVITE sip:13712345678@10.55.55.137:5080 SIP/2.0 (CSeq 72472902)
nta.c:3248 agent_aliases() nta: canonizing sip:13712345678@10.55.55.137:5080 with contact
nta.c:3085 agent_recv_request() nta: INVITE (72472902) going to a default leg
nta.c:1348 set_timeout() nta: timer shortened to 200 ms
nua_server.c:102 nua_stack_process_request() nua: nua_stack_process_request: entering
nua_stack.c:899 nh_create() nua: nh_create: entering
nua_common.c:108 nh_create_handle() nua: nh_create_handle: entering
nua_params.c:480 nua_stack_set_params() nua: nua_stack_set_params: entering
soa.c:280 soa_clone() soa_clone(static::0x7faf98001930, 0x7faf98001130, 0x7faf9800c640) called
soa.c:403 soa_set_params() soa_set_params(static::0x7faf9800ce00, ...) called
nta.c:4417 nta_leg_tcreate() nta_leg_tcreate(0x7faf9800b180)
soa.c:1302 soa_init_offer_answer() soa_init_offer_answer(static::0x7faf9800ce00) called
soa.c:1171 soa_set_remote_sdp() soa_set_remote_sdp(static::0x7faf9800ce00, (nil), 0x7faf98009c99, 246) called
nua_dialog.c:338 nua_dialog_usage_add() nua(0x7faf9800c640): adding session usage
tport.c:3257 tport_tsend() tport_tsend(0x7faf98004280) tpn = UDP/10.55.55.138:5080
tport.c:4046 tport_resolve() tport_resolve addrinfo = 10.55.55.138:5080
tport.c:4680 tport_by_addrinfo() tport_by_addrinfo(0x7faf98004280): not found by name UDP/10.55.55.138:5080
tport.c:3594 tport_vsend() tport_vsend(0x7faf98004280): 346 bytes of 346 to udp/10.55.55.138:5080
tport.c:3492 tport_send_msg() tport_vsend returned 346
nta.c:6791 incoming_reply() nta: sent 100 Trying for INVITE (72472902)
nua_stack.c:271 nua_stack_event() nua(0x7faf9800c640): event i_invite 100 Trying
nua_session.c:4139 signal_call_state_change() nua(0x7faf9800c640): call state changed: init -> received, received offer
soa.c:1098 soa_get_remote_sdp() soa_get_remote_sdp(static::0x7faf9800ce00, [0x7faf9fffe558], [0x7faf9fffe560], [(nil)]) called
nua_stack.c:271 nua_stack_event() nua(0x7faf9800c640): event i_state 100 Trying
nua_stack.c:359 nua_application_event() nua: nua_application_event: entering
nua.c:342 nua_handle_bind() nua: nua_handle_bind: entering
2023-09-07 10:23:08.958941 [NOTICE] switch_channel.c:1104 New Channel sofia/external/10011@10.55.55.138 [7c4e6e50-4d25-11ee-ac94-4570ec2ca497]
nua_stack.c:359 nua_application_event() nua: nua_application_event: entering
nua.c:366 nua_handle_magic() nua: nua_handle_magic: entering
nua.c:366 nua_handle_magic() nua: nua_handle_magic: entering
nua.c:366 nua_handle_magic() nua: nua_handle_magic: entering
nua.c:366 nua_handle_magic() nua: nua_handle_magic: entering
2023-09-07 10:23:08.958941 [INFO] mod_dialplan_xml.c:637 Processing 10011 <10011>->13712345678 in context public
2023-09-07 10:23:08.958941 [NOTICE] switch_channel.c:1104 New Channel sofia/external/13712345678@10.55.55.138:5090 [7c4ed764-4d25-11ee-ac9a-4570ec2ca497]
nua_common.c:108 nh_create_handle() nua: nh_create_handle: entering
…
tport.c:3257 tport_tsend() tport_tsend(0x7faf98004280) tpn = UDP/10.55.55.138:6080
tport.c:4046 tport_resolve() tport_resolve addrinfo = 10.55.55.138:6080
tport.c:4680 tport_by_addrinfo() tport_by_addrinfo(0x7faf98004280): not found by name UDP/10.55.55.138:6080
tport.c:3594 tport_vsend() tport_vsend(0x7faf98004280): 594 bytes of 594 to udp/10.55.55.138:6080
tport.c:3492 tport_send_msg() tport_vsend returned 594
nta.c:6791 incoming_reply() nta: sent 200 OK for OPTIONS (14)
nta.c:1350 set_timeout() nta: timer set to 32000 ms
nua_stack.c:569 nua_stack_signal() nua(0x7faf98011a70): recv signal r_destroy
nta.c:4470 nta_leg_destroy() nta_leg_destroy((nil))
soa.c:356 soa_destroy() soa_destroy(static::0x7faf98012400) called
freeswitch@localhost.localdomain>
总结
freeswitch使用sofia sip协议栈,有需要关注sip协议栈的同学可以通过debug模式调试sip处理流程。
空空如常
求真得真
freeswitch sofia协议栈调试的更多相关文章
- FreeSWITCH 学习笔记
[1]FreeSWITCH学习笔记 1.Windows安装包下载地址:http://files.freeswitch.org/windows/installer/ 2.源码下载地址:http://fi ...
- freeswitch注册过程分析
操作系统:debian8.5_x64freeswitch 版本 : 1.6.8 本文仅描述sip注册的简单场景,即话机直接向处于同一个局域网的fs进行注册. SIP协议的消息结构 消息框架 SIP协议 ...
- freeswitch呼叫流程分析
今天翻文档时发现之前整理的关于freeswitch呼叫相关的内容,写成博文分享出来也方便我以后查阅. 整体结构图 FreeswitchCore 模块加载过程 freeswitch主程序初始化时会从mo ...
- 【安富莱专题教程第7期】终极调试组件Event Recorder,各种Link通吃,支持时间和功耗测量,printf打印,RTX5及中间件调试
说明:1.继前面的专题教程推出SEGGER的RTT,JScope,Micrium的uC/Probe之后,再出一期终极调试方案Event Recoder,之所以叫终极解决方案,是因为所有Link通吃. ...
- FreeSwitch 终端命令详细介绍
FreeSwitch版本:1.6.9 以下为部分终端命令 alias 语法: alias [add|stickyadd] <alias> <command> | del [&l ...
- FreeSWITCH的安装与使用
FreeSWITCH
- Freeswitch配置之sofia
SIP模块 - mod_sofia SIP 模块是 FreeSWITCH的主要模块. 在 FreeSWITCH中,实现一些互联协议接口的模块称为 Endpoint.FreeSWITH支持很多的 End ...
- 利用ZYNQ SOC快速打开算法验证通路(2)——数据传输最简方案:网络调试助手+W5500协议栈芯片
在上一篇该系列博文中讲解了MATLAB待处理数据写入.bin二进制数据文件的过程,接下来需要将数据通过以太网发送到ZYNQ验证平台.之前了解过Xilinx公司面向DSP开发的System Genera ...
- 用virtualbox+模拟串口+CDT调试linux内核 TCP/IP协议栈-起步
经常有人问一台机器如何将hello经网络发送给另一台机器,我确实是不知道,只能看代码了. 说明:本人对内核的研究学习也是刚刚起步,有很多不了解的,所以文中可能会有一些"一本正经的胡扯&quo ...
- sipp模拟freeswitch分机测试(SIP协议调试)
1.freeswitch安装 1) 网上很多安装方法都不靠谱,系统版本,各种依赖库一堆问题,下面是验证的可行的. yum install -y http://files.freeswitch.org/ ...
随机推荐
- props传值遇Cannot read property getAttribute of undefined异常
今有一个echarts 图标的子组件使用watch 监听接受父组件传入的data,而在父组件页面再次根据日期筛选数据,重新传入子组件进行图表重绘时老实会提示报错 vue.runtime.esm.js? ...
- flutter填坑之旅(配置本地资源文件)
一.添加单个资源文件 项目下创建一个assets目录,在该目录下存放对应的资源文件(json.image.-) pubspec.yaml文件中配置资源文件路径(注意缩进要与上下文一直) assets: ...
- 代码随想录算法训练营Day21 二叉树
代码随想录算法训练营 代码随想录算法训练营Day21 二叉树| 530.二叉搜索树的最小绝对差 501.二叉搜索树中的众数 236. 二叉树的最近公共祖先 530.二叉搜索树的最小绝对差 题目链接:5 ...
- JavaCV的摄像头实战之十三:年龄检测
欢迎访问我的GitHub 这里分类和汇总了欣宸的全部原创(含配套源码):https://github.com/zq2599/blog_demos 本篇概览 本文是<JavaCV的摄像头实战> ...
- 我用numpy实现了GPT-2,GPT-2源码,GPT-2模型加速推理,并且可以在树莓派上运行,读了不少hungging face源码,手动实现了numpy的GPT2模型
之前分别用numpy实现了mlp,cnn,lstm和bert模型,这周顺带搞一下GPT-2,纯numpy实现,最重要的是可在树莓派上或其他不能安装pytorch的板子上运行,生成数据 gpt-2的ma ...
- H5 WebGL实现水波特效
前言 零几年刚开始玩电脑的时候,经常在安装程序上看到一种水波特效,鼠标划过去的时候,就像用手在水面划过一样,感觉特别有意思.但是后来,就慢慢很少见过这种特效了.最近突然又想起了这种特效,于是开始折磨怎 ...
- LEA: Improving Sentence Similarity Robustness to Typos Using Lexical Attention Bias 论文阅读
LEA: Improving Sentence Similarity Robustness to Typos Using Lexical Attention Bias 论文阅读 KDD 2023 原文 ...
- springboot下使用rabbitMQ之开发配置方式(一)
springboot下使用rabbitMQ之开发配置方式(一) 距离上次发布博客已经小一年了,这次...嗯,没错,我又回来啦... 本次结合着B站某MQ视频以及最近在MQ上的实践聊一聊个人在使用rab ...
- Nginx获取用户真实IP
Nginx获取用户真实IP地址 本人在一次项目中,使用Nginx需要获取到用户IP,本来可以很常规的获取的,可现实往往不常规,项目是前后端分离的,部署时,前端使用了Nginx进行了代理并转发,后端也使 ...
- python3 使用位图排序
代码 from bitmap import BitMap a=[1,5,3,4,7,8,15,6,9] print(a) bm=BitMap(max(a)) #print(dir(bm)) print ...