sip - Pjsua(pjsip 客户端)不想使用 TCP
问题描述
我正在尝试使用 pjsua 向 SIP 服务器发出 SIP 请求,pjsua 是 pjsip 的 SIP 客户端(版本 2.10,2020-02-14)。以这种方式启动客户端:
pjsua-x86_64-apple-darwin19.4.0 --id sip:addreessee@sever_host_name:5061;transport=tcp --no-udp
使用“S”命令发送任意请求,键入要在请求中使用的 SIP 方法(我尝试使用 MESSAGE 和其他方法),然后添加为目标 URI“sip:sever_host_name:5061”
结果是:
Destination URI: sip:addreessee@sever_host_name:5061
13:48:02.121 pjsua_core.c .TX 342 bytes Request msg MESSAGE/cseq=53264 (tdta0x7f96c501cca8) to UDP sever_host_name:5061:
MESSAGE sip:addresse@sever_host_name:5061 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.15:5060;rport;branch=z9hG4bKPjI-s3KUBrnruOqLAKEtCOLnJ.jJPKmoDe
Max-Forwards: 70
From: <sip:addreessee@server_host_name>;tag=1lsf1PY19Qc4fk-8IhoqTV9plx3kX0yC
To: <sip:addreessee@server_host_name>
Call-ID: -X2iZRlerEaevvVvOZlAX5STQnBaGuN2
CSeq: 53264 MESSAGE
Content-Length: 0
所以请求是通过 UDP 传输层发送的,而不是 TCP。谁能告诉我我做错了什么?
解决方案
;transport=tcp
您应该每次都添加到您的请求 URI。
你可以在这里阅读更多(链接)
推荐阅读
- php - “请求的未知参数”数据表错误将数据从 PHP 传递到 JS
- javascript - 第一次访问组件时 Location.state 未定义?
- variables - 如何为 VS 代码片段定义和使用自定义变量
- sapui5 - 来自关联/导航的 createEntry()
- javascript - 赛普拉斯 javascript 访问 ::after DOM 元素
- sql - 如何让我的存储过程在正确执行时停止生成错误消息?
- arrays - 断言列表
使用 JUnit 5 - python - PyTorch 中批量张量的索引元素
- ios - “图纸计数不匹配!” PencilKit canvasViewDidEndUsingTool 委托中的错误
- git - 如何恢复过滤存储库中的 HEAD 问题?