Res_rtp_asterisk.c: Failed to setup RTCP on RTP instance '0x7f1b3400a1a0'

Hi,

We have Asterisk 13.16 running without problems most of the time. The system is OpenSUSE 42.1 with linux kernel 4.1.39-56.

About once every 500 calls it refuses a call attempt of one our operators. SIP status 488 “Not acceptable here” is returned. The operator will then retry and mostly the 2nd try will be successful. I’ve compared the two INVITE messages, but the only differences are obvious ones like Call-ID and port numbers.

When such a call is refused, the following message always comes in the messages log:
chan_sip.c: Rejecting secure audio stream without encryption details: audio 25416 RTP/SAVP 106 9 112 8 0 96

To further investigate the problem i’ve set the debug level to 5. In the debug output i noticed that when the problem occurs the following line is always there:

[Jun 6 11:38:42] DEBUG[2636][C-00000132] res_rtp_asterisk.c: Failed to setup RTCP on RTP instance ‘0x7f1b3400a1a0’

In case of a successful call the line reads:
[Jun 6 11:38:53] DEBUG[2636][C-00000133] res_rtp_asterisk.c: Setup RTCP on RTP instance ‘0x7f1b3400a1a0’

Another difference in the debug output between the failed and the successful call:
failed call:
[Jun 6 11:38:42] DEBUG[2636][C-00000132] sdp_srtp.c: local_key64 T6LTbkSf28dV8uAtUD4ZZH9kgZMFvDwBISdYWhUA len 40
[Jun 6 11:38:42] DEBUG[2636][C-00000132] chan_sip.c: Processing media-level (audio) SDP a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:pKFDVv2SoojBTVOOumoyrQRine30Qrdt5cWPnUoz… UNSUPPORTED OR FAILED.
[Jun 6 11:38:42] WARNING[2636][C-00000132] chan_sip.c: Rejecting secure audio stream without encryption details: audio 25416 RTP/SAVP 106 9 112 8 0 96

successful call:
[Jun 6 11:38:53] DEBUG[2636][C-00000133] sdp_srtp.c: local_key64 rwN7po7ksEjDp+eITt2lPu2YDBw1VS6OTfEvpmf/ len 40
[Jun 6 11:38:53] DEBUG[2636][C-00000133] res_srtp.c: Adding new policy for SSRC 1340389802
[Jun 6 11:38:53] DEBUG[2636][C-00000133] sdp_srtp.c: SRTP policy activated
[Jun 6 11:38:53] DEBUG[2636][C-00000133] sdp_srtp.c: Crypto line: a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:rwN7po7ksEjDp+eITt2lPu2YDBw1VS6OTfEvpmf/
[Jun 6 11:38:53] DEBUG[2636][C-00000133] chan_sip.c: Processing media-level (audio) SDP a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:pKFDVv2SoojBTVOOumoyrcRECq1F0LtbFP8p0fWK… OK.

If anyone knows what could be causing the “Failed to setup RTCP on RTP instance” error, that would be great.

Thx.