SRTP audio unprotect failed with code 7

Hi. I'm trying to config my Akuvox R50 with to use SRTP. When I call my phone from anther line everything is fine. But when I call another number with my phone after 1-2 seconds ringing, call fails with SRTP_READ_ERROR message. If the other party answers the call within 1-2 secs, call will be successful! I see a lot of 'SRTP audio unprotect failed with code 7' messages in logs. Can anybody figure this out? logs attached.
my phone: 1111@192.168.1.51
another phone: 2222@192.168.1.50
fusionpbx: 192.168.2.60
 

Attached Files:

  • File size
    78.7 KB
    Views
    1
Thank you. I have this problem with every b-log not one. Setting rtp_secure_media=mandatory has no effect.
I also find another problem with DTMF signals. FS doesn't capture DTMF keys when using SRTP. Could be something wrong Akuvox phone?

I tried Jitsi client and everything was fine.
 
in your log, I see:
Code:
c3a98802-156a-4775-82d3-05e047b6e64e 2019-06-11 15:51:13.718681 [DEBUG] switch_channel.c:1250 sofia/internal/1111@pbx.example.com EXPORTING[export_vars] [rtp_secure_media]=[optional] to event
That's why the SDP sent to B-leg looks like this:
Code:
50a7babc-e191-4438-a7ce-b728b8bdadc3 Local SDP:
50a7babc-e191-4438-a7ce-b728b8bdadc3 v=0
50a7babc-e191-4438-a7ce-b728b8bdadc3 o=FreeSWITCH 1560220177 1560220178 IN IP4 192.168.2.60
50a7babc-e191-4438-a7ce-b728b8bdadc3 s=FreeSWITCH
50a7babc-e191-4438-a7ce-b728b8bdadc3 c=IN IP4 192.168.2.60
50a7babc-e191-4438-a7ce-b728b8bdadc3 t=0 0
50a7babc-e191-4438-a7ce-b728b8bdadc3 m=audio 31896 RTP/SAVP 0 9 8 101 13
50a7babc-e191-4438-a7ce-b728b8bdadc3 a=rtpmap:0 PCMU/8000
50a7babc-e191-4438-a7ce-b728b8bdadc3 a=rtpmap:9 G722/8000
50a7babc-e191-4438-a7ce-b728b8bdadc3 a=rtpmap:8 PCMA/8000
50a7babc-e191-4438-a7ce-b728b8bdadc3 a=rtpmap:101 telephone-event/8000
50a7babc-e191-4438-a7ce-b728b8bdadc3 a=fmtp:101 0-16
50a7babc-e191-4438-a7ce-b728b8bdadc3 a=crypto:1 AEAD_AES_256_GCM_8 inline:ao2iMa6ENwfLJ3Nk4Bm3Gf/fDYwIaOphk6Jtz97B/p2tc9XgvomApGEgwgE=
50a7babc-e191-4438-a7ce-b728b8bdadc3 a=crypto:2 AEAD_AES_128_GCM_8 inline:2CJt/jOn3ahLc9Jt7QFniWssxu+bCk/Ou9Envw==
50a7babc-e191-4438-a7ce-b728b8bdadc3 a=crypto:3 AES_256_CM_HMAC_SHA1_80 inline:AEjw1n6L1N4R1Yp7DF8qTSpuMbaEOH6SmYwLoPMczGtA+qHThPa0EJeCCRFLMQ==
50a7babc-e191-4438-a7ce-b728b8bdadc3 a=crypto:4 AES_192_CM_HMAC_SHA1_80 inline:5BzMfpK8avh00nKUKm8VUu9EeUAwhSzmmpX8nU56FR0f2xEVGtY=
50a7babc-e191-4438-a7ce-b728b8bdadc3 a=crypto:5 AES_CM_128_HMAC_SHA1_80 inline:zvdPR7BuShMFMI0OPZRAQGatnVhU7PuLugtA/6tR
50a7babc-e191-4438-a7ce-b728b8bdadc3 a=crypto:6 AES_256_CM_HMAC_SHA1_32 inline:eeSYzva2bxY/og5L24H6iFepyeryC1AZCdlPmeQbWOnP28pJHXW7T6RU1YjbMA==
50a7babc-e191-4438-a7ce-b728b8bdadc3 a=crypto:7 AES_192_CM_HMAC_SHA1_32 inline:zjKtg7D+0zqSS037JFstMbXgsIxOLWW4YR70kiNbneL/z/7WtH0=
50a7babc-e191-4438-a7ce-b728b8bdadc3 a=crypto:8 AES_CM_128_HMAC_SHA1_32 inline:BpDzWYW+dDhb8G/K8rtBP7Zt0RIMGOLkFVU+AnUC
50a7babc-e191-4438-a7ce-b728b8bdadc3 a=crypto:9 AES_CM_128_NULL_AUTH inline:v0vbj+01K4rEgK0paRLyQ96fCeDsp4eZS6yxjCv/
50a7babc-e191-4438-a7ce-b728b8bdadc3 a=rtpmap:13 CN/8000
50a7babc-e191-4438-a7ce-b728b8bdadc3 a=ptime:20
50a7babc-e191-4438-a7ce-b728b8bdadc3 a=sendrecv
50a7babc-e191-4438-a7ce-b728b8bdadc3 m=audio 31896 RTP/AVP 0 9 8 101 13
50a7babc-e191-4438-a7ce-b728b8bdadc3 a=rtpmap:0 PCMU/8000
50a7babc-e191-4438-a7ce-b728b8bdadc3 a=rtpmap:9 G722/8000
50a7babc-e191-4438-a7ce-b728b8bdadc3 a=rtpmap:8 PCMA/8000
50a7babc-e191-4438-a7ce-b728b8bdadc3 a=rtpmap:101 telephone-event/8000
50a7babc-e191-4438-a7ce-b728b8bdadc3 a=fmtp:101 0-16
50a7babc-e191-4438-a7ce-b728b8bdadc3 a=rtpmap:13 CN/8000
50a7babc-e191-4438-a7ce-b728b8bdadc3 a=ptime:20
50a7babc-e191-4438-a7ce-b728b8bdadc3 a=sendrecv
When you change rtp_secure_media to mandatory, does this parts of log change? You shouldn't see the bold part above.