sipwise / rtpengine

The Sipwise media proxy for Kamailio
GNU General Public License v3.0
785 stars 368 forks source link

Reject OSRTP answer when not offered #1854

Closed mtryfoss closed 1 month ago

mtryfoss commented 1 month ago

This issue has been discussed in the mailing list: https://groups.google.com/g/rtpengine/c/pFh2T2Nucnw

You have a call where OSRTP is offered from caller, but rejected/ignored by rtpengine. Later a reINVITE from callee is sent without without crypto attributes towards caller. Caller then responds with crypto attributes and those are accepted by rtpengine. Now RTP will stop since it can not decrypt det non-encrypted traffic from caller and/or crypto attributes are not fully set, so it will fail sending encrypted traffic back.

Behaviour is observed for Aastra/Mitel phones and Baresip with "mediaenc=srtp".

rfuchs commented 1 month ago

Test added as fc84a8003be15be215b996f76be648e8512cae2a

mtryfoss commented 1 month ago

Thank you!