[Home]

Summary:ASTERISK-18201: Asterisk should fall back to AVP when SRTP module is not loaded and both SAVP and AVP have been offered
Reporter:Fabio Torchetti (mrwho)Labels:
Date Opened:2011-07-28 06:26:37Date Closed:2015-03-14 23:59:15
Priority:MajorRegression?
Status:Closed/CompleteComponents:Channels/chan_sip/Interoperability
Versions:1.8.5.0 Frequency of
Occurrence
Constant
Related
Issues:
is duplicated byASTERISK-22675 Asterisk refuses correct RTP/AVP with optional encryption
is duplicated byASTERISK-23989 [patch]SDP offer/answer fails if crypto keys added to non-crypto offer
Environment:Asterisk 1.8.5, Nortel NSRAttachments:( 0) fallback_srtp.patch
Description:  When both SRTP and RTP (RTP/AVP and RTP/SAVP) are offered Asterisk should fall back to the RTP protocol if it fails to load the SRTP module. Up until 1.6 Asterisk ignored the SRTP requests and - if available - would fall back to RTP; this is a regression test failure in an environment where SRTP is not to be used, even if it's offered.

 This is a sample INVITE SDP content of such type:

v=0
o=- 189845755 1 IN IP4 XXX.XXX.XXX.XXX
s=-
t=0 0
m=audio 5262 RTP/AVP 0 8 101 111
c=IN IP4 XXX.XXX.XXX.XXX
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtpmap:111 X-nt-inforeq/8000
a=ptime:20
a=maxptime:20
a=sendrecv
m=audio 5262 RTP/SAVP 8 0 101 111
c=IN IP4 XXX.XXX.XXX.XXX
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:dnUo0FOvQmZF+QJqoT/JlsrcyjFyiDZe5IDM/V                                        6V|2^031|003007014426:004
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtpmap:111 X-nt-inforeq/8000
a=ptime:20
a=maxptime:20
a=sendrecv

Comments:By: Fabio Torchetti (mrwho) 2011-07-28 06:28:03.806-0500


 First approach to solve the issue. Keep track of offered AVP and use that if SAVP fails.

By: Gregory Hinton Nietsky (irroot) 2011-07-29 03:25:33.656-0500

Please see ASTERISK-17895 id like to work this into the patch im busy with there

https://reviewboard.asterisk.org/r/1173/

Thank You

By: Fabio Torchetti (mrwho) 2011-08-08 05:44:55.938-0500

I'm looking into it, it would be good to get your patch resolve both issues at the same time.

By: Tomo Takebe (tomo1657) 2013-04-09 14:59:03.019-0500

By the way, I noticed that the patch checks for

 if ( clear_video_offered )

during the audio part.  This should be:

 if ( clear_audio_offered )

By: Matt Jordan (mjordan) 2015-03-14 23:59:15.193-0500

Closing this out as a duplicate of ASTERISK-23989. The patch on this issue should be compared with Olle's when it is put up for peer review.