1
votes

Hello I know there are already lot of topics about this error (or perhaps I don't have the same problem) but none of them answered my question, I am in a local network with blink on my PC and my asterisk server is on an external server hosted by ovh (so there is nat to do). I control the server via encrypted ssh session ofc. As long as the call is not encrypted, everything is fine, I can call any user I want. But when I started to encrypt my traffic everything went wrong and I can't find why.I've generated certficate for both client and server, the traffic is encrypted because I can't see anything in wireshark(I can't see encrypted traffic but I see non-encrypted traffic). Blink is configured correctly with SDES mandatory, .pem file, car.crt , proxy on port 5061 tls, but I think the error is somewhere else. Myconig for sip.conf is like this:

[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

Certificates have been generated using ./ast_tls_cert....

RTP logs

== 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 LOGS

INVITE sip:[email protected] 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:[email protected] 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:[email protected] 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:[email protected]", 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:[email protected] 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

Thanks for your help, Vince

2
488 usualy mean no acceptable codec. Sorry, not gooing read 10 pages of text.arheops
Looks like you're using zrtp. Does your Asterisk server support it?1.618

2 Answers

1
votes

Your SIP endpoint specifies encryption=yes, but the INVITE from your client specifies RTP/AVP, not RTP/SAVP. iirc, Blink has an option for optimistic or mandatory encryption; you'll need to change it to mandatory.

1
votes

If you have the same problem as me, reinstall the Srtp library and asterisk, also log sip request because I had a bug where Blink didn't send register request anymore (even when pushing that register button 1000times) so I downloaded PhonerLite and everything worked perfectly