ssl - 错误 488 此处 Not Acceptable

标签 ssl asterisk sip rtp

你好,我知道已经有很多关于这个错误的话题(或者也许我没有遇到同样的问题)但是没有一个回答了我的问题,我在一个本地网络中,我的 PC 和我的 Asterisk 服务器上闪烁位于由 ovh 托管的外部服务器上(所以没有什么可做的)。我通过加密的 ssh session ofc 控制服务器。 只要调用未加密,一切都很好,我可以调用任何我想要的用户。但是当我开始加密我的流量时,一切都出错了,我找不到原因。我已经为客户端和服务器生成了证书,流量是加密的,因为我在 wireshark 中看不到任何东西(我看不到加密流量,但我看到未加密的流量)。 Blink 已正确配置 SDES 强制、.pem 文件、car.crt、端口 5061 tls 上的代理,但我认为错误出在其他地方。 sip.conf 的 Myconig 是这样的:

[general]
udpbindaddr=0.0.0.0
tcpenable=yes                    ; Enable server for incoming TCP connections (default is no)
tcpbindaddr=0.0.0.0             ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces)                                ; Optionally add a port number, 192.168.1.1:5062 (default is port 5060)
tlsenable=yes               ; Enable server for incoming TLS (secure) connections (default is no)
tlsbindaddr=0.0.0.0   
transport=udp
disallow=all       
allow=ulaw                     ; Allow codecs in order of preference
allow=alaw
dtmfmode = rfc2833
tlscertfile=/etc/asterisk/keys/asterisk.pem
tlscafile=/etc/asterisk/keys/ca.crt
tlscipher=ALL
tlsclientmethod=tlsv1 
[201](can't communicate instant 488 error)
type=friend
username=vincent
context=from-sip
host=dynamic
secret=not4usry
callerid=vincent<201>
mailbox=201@default
nat=comedia
transport=tls
encryption=yes
[203](no tls user and can communicate with the ones who don't use tls)
type=friend
username=antoine
context=from-sip
host=dynamic
secret=not4usry
callerid=antoine<203>
mailbox=203@default
nat=comedia

证书已使用 ./ast_tls_cert.... 生成。

RTP 日志

== Using SIP RTP CoS mark 5 [May 11 15:34:33] WARNING[21893][C-00000d0e]: chan_sip.c:10803 process_sdp: Rejecting secure audio stream without encryption details: audio 50026 RTP/SAVP 113 9 0 8 101

SIP 日志

INVITE sip:203@vps466556.ovh.net SIP/2.0

Via: SIP/2.0/TLS 192.168.1.35:53076;rport;branch=z9hG4bKPj275105fe6a304b89b2b18ee5186b5085;alias

Max-Forwards: 70

From: "Vincent" ;tag=523fe49e3a8646608481fbac0801b605

To:

Contact:

Call-ID: 0fb841de523e4ff0a74514247bb3445a

CSeq: 4966 INVITE

Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE, REFER

Supported: replaces, norefersub, gruu

User-Agent: Blink 3.0.0 (Windows)

Content-Type: application/sdp

Content-Length: 425

v=0

o=- 3735043210 3735043210 IN IP4 192.168.1.35

s=Blink 3.0.0 (Windows)

t=0 0

m=audio 50004 RTP/AVP 113 9 0 8 101

c=IN IP4 192.168.1.35

a=rtcp:50005

a=rtpmap:113 opus/48000/2

a=fmtp:113 useinbandfec=1

a=rtpmap:9 G722/8000

a=rtpmap:0 PCMU/8000

a=rtpmap:8 PCMA/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=zrtp-hash:1.10 af10bf32a78e03147ffbf2859f96cc8d401048ee46a1f2cb961c20139b219913

a=sendrecv

-- 2018-05-11 16:00:11.003276 [blink.exe 3320]: RECEIVED: Packet 136, +0:06:21.266013 54.37.8.124:5061 -(SIP over TLS)-> 192.168.1.35:53076 SIP/2.0 401 Unauthorized

Via: SIP/2.0/TLS 192.168.1.35:53076;branch=z9hG4bKPj275105fe6a304b89b2b18ee5186b5085;alias;received=90.112.223.194;rport=53076

From: "Vincent" ;tag=523fe49e3a8646608481fbac0801b605

To: ;tag=as50eb1885

Call-ID: 0fb841de523e4ff0a74514247bb3445a

CSeq: 4966 INVITE

Server: Asterisk PBX 13.21.0

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE

Supported: replaces, timer

-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="6650a402"

Content-Length: 0

-- 2018-05-11 16:00:11.004276 [blink.exe 3320]: SENDING: Packet 137, +0:06:21.267013 192.168.1.35:53076 -(SIP over TLS)-> 54.37.8.124:5061 ACK sip:203@vps466556.ovh.net SIP/2.0

Via: SIP/2.0/TLS 192.168.1.35:53076;rport;branch=z9hG4bKPj275105fe6a304b89b2b18ee5186b5085;alias

Max-Forwards: 70

From: "Vincent" ;tag=523fe49e3a8646608481fbac0801b605

To: ;tag=as50eb1885

Call-ID: 0fb841de523e4ff0a74514247bb3445a

CSeq: 4966 ACK

User-Agent: Blink 3.0.0 (Windows)

Content-Length: 0

-- 2018-05-11 16:00:11.005276 [blink.exe 3320]: SENDING: Packet 138, +0:06:21.268013 192.168.1.35:53076 -(SIP over TLS)-> 54.37.8.124:5061 INVITE sip:203@vps466556.ovh.net SIP/2.0

Via: SIP/2.0/TLS 192.168.1.35:53076;rport;branch=z9hG4bKPj3e8da342afaa41a385d9989648fd069f;alias

Max-Forwards: 70

From: "Vincent" ;tag=523fe49e3a8646608481fbac0801b605

To:

Contact:

Call-ID: 0fb841de523e4ff0a74514247bb3445a

CSeq: 4967 INVITE

Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE, REFER

Supported: replaces, norefersub, gruu

User-Agent: Blink 3.0.0 (Windows)

Authorization: Digest username="201", realm="asterisk", nonce="6650a402", uri="sip:203@vps466556.ovh.net", response="dcd6fcd9d8b7381f86f07e1326aa9134", algorithm=MD5

Content-Type: application/sdp

Content-Length: 425

v=0

o=- 3735043210 3735043210 IN IP4 192.168.1.35

s=Blink 3.0.0 (Windows)

t=0 0

m=audio 50004 RTP/AVP 113 9 0 8 101

c=IN IP4 192.168.1.35

a=rtcp:50005

a=rtpmap:113 opus/48000/2

a=fmtp:113 useinbandfec=1

a=rtpmap:9 G722/8000

a=rtpmap:0 PCMU/8000

a=rtpmap:8 PCMA/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=zrtp-hash:1.10 af10bf32a78e03147ffbf2859f96cc8d401048ee46a1f2cb961c20139b219913

a=sendrecv

-- 2018-05-11 16:00:11.087226 [blink.exe 3320]: RECEIVED: Packet 139, +0:06:21.349963 54.37.8.124:5061 -(SIP over TLS)-> 192.168.1.35:53076 SIP/2.0 488 Not acceptable here

Via: SIP/2.0/TLS 192.168.1.35:53076;branch=z9hG4bKPj3e8da342afaa41a385d9989648fd069f;alias;received=90.112.223.194;rport=53076

From: "Vincent" ;tag=523fe49e3a8646608481fbac0801b605

To: ;tag=as50eb1885

Call-ID: 0fb841de523e4ff0a74514247bb3445a

CSeq: 4967 INVITE

Server: Asterisk PBX 13.21.0

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE

Supported: replaces, timer

Content-Length: 0

-- 2018-05-11 16:00:11.088227 [blink.exe 3320]: SENDING: Packet 140, +0:06:21.350964 192.168.1.35:53076 -(SIP over TLS)-> 54.37.8.124:5061 ACK sip:203@vps466556.ovh.net SIP/2.0

Via: SIP/2.0/TLS 192.168.1.35:53076;rport;branch=z9hG4bKPj3e8da342afaa41a385d9989648fd069f;alias

Max-Forwards: 70

From: "Vincent" ;tag=523fe49e3a8646608481fbac0801b605

To: ;tag=as50eb1885

Call-ID: 0fb841de523e4ff0a74514247bb3445a

CSeq: 4967 ACK

User-Agent: Blink 3.0.0 (Windows)

Content-Length: 0

谢谢你的帮助,文斯

最佳答案

您的 SIP 端点指定了 encryption=yes,但是来自您客户端的 INVITE 指定了 RTP/AVP,而不是 RTP/SAVP。 iirc,Blink 有乐观或强制加密的选项;您需要将其更改为强制性的。

关于ssl - 错误 488 此处 Not Acceptable ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50294395/

相关文章:

java - 有没有好的Java跨平台SIP/VOIP开发包?

android - android 是否支持 .jks keystore 类型?

eclipse - j2me 中的 HTTP/1.1 502 代理错误

ios - 如何在不将 NSAllowsArbitraryLoads 设置为 yes 的情况下处理自签名证书?

asterisk - 调用 Asterisk 后立即挂断电话

port - 如何更改linphone-iphone服务器端口5060

Asterisk 13.4 cdr 引擎为每个调用创建 2 条记录

python - 如何使用扭曲的 sip 协议(protocol)进行 sip 调用?

java - 如何调用 SIP 电话

java - 证书未知错误--Java使用的是trustStore