[Home]

Summary:ASTERISK-22717: SRTP audio stream rejected, 'Could not set SRTP policies'
Reporter:Martin (mscian)Labels:
Date Opened:2013-10-16 06:57:57Date Closed:2014-12-03 16:55:13.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_crypto Resources/res_srtp
Versions:1.8.23.1 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Attachments:( 0) issue_22717_full_log
( 1) sip.conf
Description:Hello, good morning. Can you help me? Upgrade asterisk to 1.8.23.1 and i have errors in srtp policies negotiation. The error is the following:

2013-10-14 13:01:58] WARNING[28065]: sip/sdp_crypto.c:173 sdp_crypto_activate: Could not set SRTP policies
[2013-10-14 13:01:58] WARNING[28065]: sip/sdp_crypto.c:173 sdp_crypto_activate: Could not set SRTP policies
[2013-10-14 13:01:58] WARNING[28065]: chan_sip.c:9622 process_sdp: Rejecting secure audio stream without encryption details: audio 4002 RTP/SAVP 18 0 8 9 101

The version library srtp is 1.4.4 and the operaron system y debian.

Thanks you
Regards
Comments:By: David Woolley (davidw) 2013-10-17 05:04:05.402-0500

Please provide the information specified in https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information, in particular, the SIP debug information.

Actually my guess is that is either a fault in the peer or a configuration error, so I would suggest you use the end user support forum or mailing list to try to, help you get enough information to submit a bug report and obtain consensus that it is actually a bug, before taking it further here.

By: Martin (mscian) 2013-10-18 09:09:50.545-0500

Davis, thank you for your comments. I attach the log files with the debug. The line with the error is 869. if you need anything, you say me.
thank you
Regards

By: Matt Jordan (mjordan) 2013-10-18 09:31:57.399-0500

Are you sure you have res_srtp compiled and loaded?

This WARNING message implies that either {{res_srtp}} is not loaded, or {{libsrtp}} rejected creation of the security policy:

{noformat}
[2013-10-18 10:38:11] DEBUG[9655] sip/sdp_crypto.c: local_key64 ro1ZxO7b1bZyMSBq3b7600oGxh8IICcMYPF5vwcm len 40
[2013-10-18 10:38:11] WARNING[9655] sip/sdp_crypto.c: Could not set SRTP policies
{noformat}

Given that I've never seen creation of a key policy fail in {{libsrtp}}, I would suspect that {{res_srtp}} is not loaded or otherwise not available.

By: Martin (mscian) 2013-10-18 09:52:31.944-0500

Yes. maybe the libsrtp have an compilation error, but the res_module module is loaded.
Maybe, I need re compile de libsrtp and the asterisk. I upgraded the linux kernel the last week.
what do you think?

publicasterisk*CLI> module unload res_srtp.so
Unloaded res_srtp.so
publicasterisk*CLI> module load res_srtp.so
Loaded res_srtp.so
Loaded res_srtp.so => (Secure RTP (SRTP))


By: Martin (mscian) 2013-10-18 10:35:15.124-0500

Matt, I have recompiled the libsrtp0 1.4.4, libsrtp0-dev and asterisk, but i have the same error.
thank you for your help
Regards

publicasterisk*CLI> module show like srtp
Module                         Description                              Use Count
res_srtp.so                    Secure RTP (SRTP)                        0


By: Matt Jordan (mjordan) 2013-11-01 10:44:16.008-0500

What is the configuration of the SIP peer in question? Does it support encryption?

By: Martin (mscian) 2013-11-01 13:59:53.456-0500

Matt, hello, yes, the peer supports encryption. I attach the sip config
Thanks

Peer Config

[ZZZZ]
type=friend
secret=ZZZZZZZZ
host=dynamic
canreinvite=no
context=contexto-privado
callerid="Movil Martin" <ZZZZ>
dtmfmode=rfc2833
qualify=yes
callgroup=1
pickupgroup=1,2
mailbox=ZZZZ@contexto-privado
amaflags=billing
accountcode=Publico
nat=yes
disallow=all
allow=g729
allow=h263
allow=h263p
allow=h264
encryption=yes
transport=tcp,udp


By: Rusty Newton (rnewton) 2013-11-20 13:49:17.193-0600

I noticed you don't have a TLS transport configured. That shouldn't be required for SRTP configuration in Asterisk (Though SRTP is less secure without TLS from my understanding) Out of curiosity, is the behavior any different, when you setup and use a TLS transport for that peer?

By: Rusty Newton (rnewton) 2013-11-20 17:31:01.858-0600

I couldn't reproduce this issue with the [CSIPSimple|http://code.google.com/p/csipsimple/] softphone, and Asterisk (latest SVN of 1.8) configured for SRTP

Please try with a few different phones to see if this is only an issue that occurs with your Bria Android client.



By: Miguel Oyarzo (miguelaustro@gmail.com) 2013-11-23 09:10:42.951-0600

'Could not set SRTP policies' error looks come from the media-level SDP subsystem (audio).

I have compiled asterisk version 1.8, 11.5, 11.6, 11.7 and 12+pjproject (beta), using

./configure --with-crypto --with-ssl=ssl --with-srtp
In all of them I have got the same error.


Here is a comparison between a two asterisk (1st the wrong one and 2nd a good one)


1) debug info for 'Could not set SRTP policies' in v 11.5, 11.6 and 11.7 :
--------------------------------------------------------------------------
{noformat}
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP c=IN IP4 120.151.131.182... OK.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=rtcp:35536 IN IP4 120.151.131.182... UNSUPPORTED OR FAILED.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=candidate:2880323124 1 udp 2113937151 192.168.1.116 35536 typ host generation 0... UNSUPPORTED OR FAILED.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=candidate:2880323124 2 udp 2113937151 192.168.1.116 35536 typ host generation 0... UNSUPPORTED OR FAILED.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=candidate:719730816 1 udp 1845501695 120.151.131.182 35536 typ srflx raddr 192.168.1.116 rport 35536 generation 0... UNSUPPORTED OR FAILED.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=candidate:719730816 2 udp 1845501695 120.151.131.182 35536 typ srflx raddr 192.168.1.116 rport 35536 generation 0... UNSUPPORTED OR FAILED.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=candidate:3844981444 1 tcp 1509957375 192.168.1.116 0 typ host generation 0... UNSUPPORTED OR FAILED.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=candidate:3844981444 2 tcp 1509957375 192.168.1.116 0 typ host generation 0... UNSUPPORTED OR FAILED.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=ice-ufrag:1CP3jxtzuJ2E0abs... UNSUPPORTED OR FAILED.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=ice-pwd:+G+gGovtGtJpvtR7Vwu8rUrR... UNSUPPORTED OR FAILED.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=ice-options:google-ice... UNSUPPORTED OR FAILED.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level... UNSUPPORTED OR FAILED.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=sendrecv... OK.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=mid:audio... UNSUPPORTED OR FAILED.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=rtcp-mux... UNSUPPORTED OR FAILED.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] sip/sdp_crypto.c: local_key64 hk/mNH3lyP3zZdqPcN/baYi0bseGDhxpx7dSU5ym len 40
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=crypto:0 AES_CM_128_HMAC_SHA1_32 inline:cco12sJzvfVhfEH+Zin5D+8gIIh5aGdp6L+EG3KR... UNSUPPORTED OR FAILED.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:iAo1Cwh1p+bbAxcWrptG5//JMOf8Hfla5PZmHRLt... UNSUPPORTED OR FAILED.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] rtp_engine.c: Unsetting payload 111 on 0x7eff3809d5f0
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=rtpmap:111 opus/48000/2... UNSUPPORTED OR FAILED.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=fmtp:111 minptime=10... UNSUPPORTED OR FAILED.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] rtp_engine.c: Unsetting payload 103 on 0x7eff3809d5f0
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=rtpmap:103 ISAC/16000... UNSUPPORTED OR FAILED.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] rtp_engine.c: Unsetting payload 104 on 0x7eff3809d5f0
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=rtpmap:104 ISAC/32000... UNSUPPORTED OR FAILED.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=rtpmap:0 PCMU/8000... OK.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=rtpmap:8 PCMA/8000... OK.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] rtp_engine.c: Unsetting payload 107 on 0x7eff3809d5f0
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=rtpmap:107 CN/48000... UNSUPPORTED OR FAILED.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] rtp_engine.c: Unsetting payload 106 on 0x7eff3809d5f0
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=rtpmap:106 CN/32000... UNSUPPORTED OR FAILED.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] rtp_engine.c: Unsetting payload 105 on 0x7eff3809d5f0
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=rtpmap:105 CN/16000... UNSUPPORTED OR FAILED.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=rtpmap:13 CN/8000... OK.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=rtpmap:126 telephone-event/8000... OK.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=maxptime:60... UNSUPPORTED OR FAILED.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=ssrc:3099275212 cname:KbyN6wgr0l08loow... UNSUPPORTED OR FAILED.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=ssrc:3099275212 msid:9vab82wO7bfv5ZEOebNaBGOcP7gpKoXJIjD8 9vab82wO7bfv5ZEOebNaBGOcP7gpKoXJIjD8a0... UNSUPPORTED OR FAILED.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=ssrc:3099275212 mslabel:9vab82wO7bfv5ZEOebNaBGOcP7gpKoXJIjD8... UNSUPPORTED OR FAILED.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Processing media-level (audio) SDP a=ssrc:3099275212 label:9vab82wO7bfv5ZEOebNaBGOcP7gpKoXJIjD8a0... UNSUPPORTED OR FAILED.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: *** SIP TIMER: Initializing retransmit timer on packet: Id  #530
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: Trying to put 'SIP/2.0 488' onto UDP socket destined for 10.10.1.105:5061
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: No compatible codecs for this SIP call.
[Nov 19 16:31:56] DEBUG[2496][C-00000009] chan_sip.c: SIP message could not be handled, bad request: 46e28c96-b72c-5e45-59c4-44c153800ac0
{noformat}
---------------------------------------------------------------------



2) debug info for Asterisk 11.4 (it accepts the ICE candidates and  SRTP policy are activated accordingly):
--------------------------------------------------------------------------------------------------------------
{noformat}
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP c=IN IP4 120.151.131.182... OK.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=rtcp:41583 IN IP4 120.151.131.182... UNSUPPORTED OR FAILED.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] netsock2.c: Splitting '192.168.1.116' into...
[Nov 21 11:17:03] DEBUG[7790][C-00000003] netsock2.c: ...host '192.168.1.116' and port ''.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] netsock2.c: Splitting '0' into...
[Nov 21 11:17:03] DEBUG[7790][C-00000003] netsock2.c: ...host '0' and port ''.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=candidate:2880323124 1 udp 2113937151 192.168.1.116 41583 typ host generation 0... OK.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] netsock2.c: Splitting '192.168.1.116' into...
[Nov 21 11:17:03] DEBUG[7790][C-00000003] netsock2.c: ...host '192.168.1.116' and port ''.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] netsock2.c: Splitting '0' into...
[Nov 21 11:17:03] DEBUG[7790][C-00000003] netsock2.c: ...host '0' and port ''.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=candidate:2880323124 2 udp 2113937151 192.168.1.116 41583 typ host generation 0... OK.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] netsock2.c: Splitting '120.151.131.182' into...
[Nov 21 11:17:03] DEBUG[7790][C-00000003] netsock2.c: ...host '120.151.131.182' and port ''.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] netsock2.c: Splitting '192.168.1.116' into...
[Nov 21 11:17:03] DEBUG[7790][C-00000003] netsock2.c: ...host '192.168.1.116' and port ''.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=candidate:719730816 1 udp 1845501695 120.151.131.182 41583 typ srflx raddr 192.168.1.116 rport 41583 generation 0... OK.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] netsock2.c: Splitting '120.151.131.182' into...
[Nov 21 11:17:03] DEBUG[7790][C-00000003] netsock2.c: ...host '120.151.131.182' and port ''.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] netsock2.c: Splitting '192.168.1.116' into...
[Nov 21 11:17:03] DEBUG[7790][C-00000003] netsock2.c: ...host '192.168.1.116' and port ''.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=candidate:719730816 2 udp 1845501695 120.151.131.182 41583 typ srflx raddr 192.168.1.116 rport 41583 generation 0... OK.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] netsock2.c: Splitting '192.168.1.116' into...
[Nov 21 11:17:03] DEBUG[7790][C-00000003] netsock2.c: ...host '192.168.1.116' and port ''.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] netsock2.c: Splitting '0' into...
[Nov 21 11:17:03] DEBUG[7790][C-00000003] netsock2.c: ...host '0' and port ''.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=candidate:3844981444 1 tcp 1509957375 192.168.1.116 0 typ host generation 0... OK.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] netsock2.c: Splitting '192.168.1.116' into...
[Nov 21 11:17:03] DEBUG[7790][C-00000003] netsock2.c: ...host '192.168.1.116' and port ''.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] netsock2.c: Splitting '0' into...
[Nov 21 11:17:03] DEBUG[7790][C-00000003] netsock2.c: ...host '0' and port ''.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=candidate:3844981444 2 tcp 1509957375 192.168.1.116 0 typ host generation 0... OK.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=ice-ufrag:p6+x8ZINjVEiN1gY... OK.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=ice-pwd:thFN7SEmQFzz0uVZqvKzV2R5... OK.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=ice-options:google-ice... UNSUPPORTED OR FAILED.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level... UNSUPPORTED OR FAILED.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=sendrecv... OK.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=mid:audio... UNSUPPORTED OR FAILED.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=rtcp-mux... UNSUPPORTED OR FAILED.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] sip/sdp_crypto.c: local_key64 jExVjMeWdFO1mMwtXmELA0jPcdJiDFnteK/KzlHz len 40
[Nov 21 11:17:03] DEBUG[7790][C-00000003] res_srtp.c: Adding new policy for SSRC 573868301
[Nov 21 11:17:03] DEBUG[7790][C-00000003] sip/sdp_crypto.c: SRTP policy activated
[Nov 21 11:17:03] DEBUG[7790][C-00000003] sip/sdp_crypto.c: Accepting crypto tag 0
[Nov 21 11:17:03] DEBUG[7790][C-00000003] sip/sdp_crypto.c: Crypto line: a=crypto:0 AES_CM_128_HMAC_SHA1_32 inline:jExVjMeWdFO1mMwtXmELA0jPcdJiDFnteK/KzlHz^M
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=crypto:0 AES_CM_128_HMAC_SHA1_32 inline:jZwYmXv9hmzMmJVXWH1ZxEgwMv9DTizTvKcvn40x... OK.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:bsfQzcYvK3fInZvOvEpqa4XU5cERdNTLojrY7tZz... UNSUPPORTED OR FAILED.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] rtp_engine.c: Unsetting payload 111 on 0x7ff7a0156860
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=rtpmap:111 opus/48000/2... UNSUPPORTED OR FAILED.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=fmtp:111 minptime=10... UNSUPPORTED OR FAILED.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] rtp_engine.c: Unsetting payload 103 on 0x7ff7a0156860
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=rtpmap:103 ISAC/16000... UNSUPPORTED OR FAILED.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] rtp_engine.c: Unsetting payload 104 on 0x7ff7a0156860
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=rtpmap:104 ISAC/32000... UNSUPPORTED OR FAILED.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=rtpmap:0 PCMU/8000... OK.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=rtpmap:8 PCMA/8000... OK.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] rtp_engine.c: Unsetting payload 107 on 0x7ff7a0156860
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=rtpmap:107 CN/48000... UNSUPPORTED OR FAILED.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] rtp_engine.c: Unsetting payload 106 on 0x7ff7a0156860
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=rtpmap:106 CN/32000... UNSUPPORTED OR FAILED.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] rtp_engine.c: Unsetting payload 105 on 0x7ff7a0156860
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=rtpmap:105 CN/16000... UNSUPPORTED OR FAILED.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=rtpmap:13 CN/8000... OK.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=rtpmap:126 telephone-event/8000... OK.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=maxptime:60... UNSUPPORTED OR FAILED.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=ssrc:2569575276 cname:DICVzLXRWD606Mrk... UNSUPPORTED OR FAILED.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=ssrc:2569575276 msid:TfuATdIY3b0t4LNqjoLwwFwKdaxNQHvgtCUg TfuATdIY3b0t4LNqjoLwwFwKdaxNQHvgtCUga0... UNSUPPORTED OR FAILED.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=ssrc:2569575276 mslabel:TfuATdIY3b0t4LNqjoLwwFwKdaxNQHvgtCUg... UNSUPPORTED OR FAILED.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Processing media-level (audio) SDP a=ssrc:2569575276 label:TfuATdIY3b0t4LNqjoLwwFwKdaxNQHvgtCUga0... UNSUPPORTED OR FAILED.
[Nov 21 11:17:03] DEBUG[7790][C-00000003] res_rtp_asterisk.c: Setting RTCP address on RTP instance '0x7ff79801e678'
[Nov 21 11:17:03] DEBUG[7790][C-00000003] rtp_engine.c: Copying payload 0 from 0x7ff7a0156860 to 0x7ff79801e840
[Nov 21 11:17:03] DEBUG[7790][C-00000003] rtp_engine.c: Copying payload 8 from 0x7ff7a0156860 to 0x7ff79801e840
[Nov 21 11:17:03] DEBUG[7790][C-00000003] rtp_engine.c: Copying payload 13 from 0x7ff7a0156860 to 0x7ff79801e840
[Nov 21 11:17:03] DEBUG[7790][C-00000003] rtp_engine.c: Copying payload 126 from 0x7ff7a0156860 to 0x7ff79801e840
[Nov 21 11:17:03] DEBUG[7790][C-00000003] res_rtp_asterisk.c: Ignoring duplicate RTCP property on RTP instance '0x7ff79801e678'
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: We're settling with these formats: (ulaw|alaw)
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Checking SIP call limits for device
[Nov 21 11:17:03] DEBUG[7790][C-00000003] chan_sip.c: Updating call counter for incoming call
{noformat}
--------------------------------------------------------------------------------


Main differences:

a) In (1) Asterisk doesn't seem to parse "a=candidates" lines reported by the WebRTC client (sipML5 in my case). (UNSUPPORTED OR FAILED)
b) In (1) this files related to SRTP policies are not called/processed:

- res_srtp.c: Adding new policy for SSRC
- sip/sdp_crypto.c: SRTP policy activated
- sip/sdp_crypto.c: Accepting crypto tag 0


c) In (2) ICE candidate is accepted (OK), unlike (1)


Not sure, but it seems 'UNSUPPORTED OR FAILED' ICE candidates implies -> 'Could not set SRTP policies'


In adition, asterisk12 is able to process 'a=candidates' without problem, but still show the same error "Could not set SRTP policies"


Should I provide more parameters than "./configure --with-crypto --with-ssl=ssl --with-srtp" ?


BTW: module res_srtp was always loaded at the start without errors.


Any suggestion?



Miguel Oyarzo,
Melbourne


By: Martin (mscian) 2013-11-23 17:02:13.812-0600

Hello, I tested CSipSimple and got the same error, even with TLS configured.
I attached the error.

[2013-11-23 19:55:28] WARNING[17942]: sip/sdp_crypto.c:173 sdp_crypto_activate: Could not set SRTP policies
[2013-11-23 19:55:28] WARNING[17942]: sip/sdp_crypto.c:173 sdp_crypto_activate: Could not set SRTP policies
[2013-11-23 19:55:28] WARNING[17942]: chan_sip.c:9622 process_sdp: Rejecting secure audio stream without encryption details: audio 4006 RTP/SAVP 99 0 8 101

thank you very much
regards
Martín


By: Rusty Newton (rnewton) 2013-12-09 18:37:01.996-0600

@Martin, can you provide the sip.conf configuration used for your test with CSipSimple, as well as verify the version of asterisk, version libsrtp libraries used so that I can compare them to my test?

@Miguel, can you provide the complete DEBUG logs that you pulled the excerpts from? Especially if they include the SIP traces.

By: Rusty Newton (rnewton) 2014-01-03 18:32:20.015-0600

Martin or Miguel, does the issue still occur? Can you provide the information required? If not I'll go close this out since it has become inactive and I cannot reproduce.

By: Rusty Newton (rnewton) 2014-01-21 09:15:35.148-0600

Suspended due to lack of activity. Please request a bug marshal in #asterisk-bugs on the IRC network irc.freenode.net to reopen the issue should you have the additional information requested.  Further information can be found at http://www.asterisk.org/developers/bug-guidelines



By: Martin (mscian) 2014-02-10 08:33:50.611-0600

Rusty, sorry for the delay, I attach the sip.conf. asterisk version is Asterisk 11.6-cert1,
libsrtp0es the version 1.4.4 ~ dfsg-2 +20100615.

the error is as follows

   == Using SIP RTP CoS mark 5
[February 10 11:34:43] WARNING [4324] [C-00000004]: sip / sdp_crypto.c: sdp_crypto_activate 173: Could not set SRTP policies
[February 10 11:34:43] WARNING [4324] [C-00000004]: sip / sdp_crypto.c: sdp_crypto_activate 173: Could not set SRTP policies
[February 10 11:34:43] WARNING [4324] [C-00000004]: chan_sip.c: 10455 process_sdp: Rejecting secure audio stream without encryption details: audio 4002 RTP / SAVP 0 8101

____________

Package: libsrtp0
Source: srtp
Version: 1.4.4 +20100615 ~ dfsg-2
Installed-Size: 161
Maintainer: Jonas Smedegaard <dr@jones.dk>
Architecture: i386
Depends: libc6 (> = 2.4)
Suggests: srtp-utils

Regards, Martin

By: Michael L. Young (elguero) 2014-07-08 15:53:59.746-0500

Re-opened this for dwayne on IRC.  He says he is having the same issue with the latest Zoiper.  Also, I noticed that the reporter provided the requested information after the issue had been suspended but the issue was never re-opened.

{quote}
<dwayne> looks like ASTERISK-22717 was closed due to inactivity.  This issue has an issue using softphone CSIPSimple.  I'm seeing the same thing with the latest Zoiper.  Is there anything I can do to help move this issue forward ?
<elguero> dwayne: It looks like the reporter provided the requested information but then the issue was never re-opened... I have re-opened the issue for you.  Any extra information that you could add to the issue (debug logs) to help with replicating this easily so that a developer can look at it would be helpful
{quote}


By: Matt Jordan (mjordan) 2014-10-30 09:43:32.924-0500

I know there were some issues with {{libsrtp}} that - after a large number of calls - would result in this error. See ASTERISK-24291. This problem was actually a bug in {{libsrtp}} and was fixed when updating the library to 1.5.0.

Can you please upgrade to that version and re-test?

By: Rusty Newton (rnewton) 2014-11-13 17:30:53.687-0600

Another ping for someone to test with libsrtp 1.5.0.  I was never able to reproduce... so I can't test.

By: Rusty Newton (rnewton) 2014-12-03 16:54:23.861-0600

Going to close this out again as "Cannot Reproduce". We don't have anyone reporting or responding to this issue since early July 2014.

If someone finds the same issue again with libsrtp 1.5.0 then please comment and request that a bug marshal reopen the issue. Bug marshals can be contacted in irc.freenode.net #asterisk-bugs and #asterisk-dev.