abelbeck, thank you for reporting that issue with crypto_get_random. It got its own issue report. Therefore, please, continue with
A. Sresnewsky, the attached patch targeted the master branch at that time, which created Asterisk 13. If you are looking for a backport of AES-GCM for Asterisk 11, please, do give a rationale why you cannot update to Asterisk 13 and why you want AES-GCM. That raises motivation and might help to find an Asterisk team member or a community member, to create such a patch.
In December 2015, that draft matured to RFC 7714. However in June 2014 with draft revision 13, the crypto suite AEAD_AES_128_GCM_8 got dropped. Furthermore even back than, there was a bug in libSRTP because the key length (actually the master salt) was too long. This patch here relied on the fact that the key length was the same as for AES_CM_128_HMAC_SHA1_80. This is not the case anymore. Therefore, please, let us continue with