Pjsua(pjsip客户端)不想使用TCP

问题描述 投票:1回答:1

[我正在尝试使用pjsip(版本2.10,2020-02-14,使用pjsip的SIP客户端)向SIP服务器发出SIP请求。以这种方式启动客户端:

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发送的。谁能告诉我我在做什么错?

sip pjsip
1个回答
0
投票

您应该每次将;transport=tcp添加到您的请求URI。

您可以在此处阅读更多信息(link

© www.soinside.com 2019 - 2024. All rights reserved.