Warning message about crypto [SOLVED]

Hi, I’m getting an annoyng warning message on CLI: “WARNING[11281][C-00000012]: chan_sip.c:33879 process_crypto: Ignoring crypto attribute in SDP because RTP transport is insecure”

I unloaded the res_srtp.so module and removed the module from /usr/lib/asterisk/modules. I commented the line number 33879 inside chan_sip.c but it didn’t work. After that I switched the option dontwarn = yes inside /etc/asterisk.conf, even so I still getting this specific warning message. I just want a way to hidden these messages or don’t receive this specific warning, however I don’t want to disable warning messages inside logger.conf.

I know of no mechanism currently in Asterisk that allows you to filter out individual log messages. You’ll have to alter/remove (comment out/delete/change to another level like debug) that log message within chan_sip itself.

Commenting out should have worked. I am not sure why it did not. Did you make sure you commented out the correct line? Lines may shift if you have a different version of the source vs what you are running. The line you are looking for is:

ast_log(LOG_WARNING, "Ignoring crypto attribute in SDP because RTP transport is insecure\n");

You can search for that text, “Ignoring crypto”, within chan_sip.c to find it. After modifying the line did you rebuild Asterisk from the same source from which you changed the code? Then you have to also reinstall, and reload chan_sip or restart Asterisk.

Thanks for response Kharwell. I’m sure I commented the correct line, however I didn’t rebuild Asterisk, just restarted. Asterisk is running in production, then it may be risk, I don’t know. I’ll run a test in another environment. I’ll let you know if it worked!

Kharwell, I made exactly what you said. It worked!
I commented the line, after that I rebuilded and reinstalled Asterisk. That warning vanished!
Thanks a lot!

The issue tracker contains another approach for this issue, see ASTERISK-20234 and its change in Gerrit-3234. That change backported for Asterisk 13 can be found as patch here…

That way, you do not only avoid that warning but allow sRTP for those users. I am using this in my Asterisk 13 quite happily. Another alternative: You configure Asterisk not to link to libSRTP: ./configure --without srtp
Then, this warning should not happen, everything else would be a bug worth to be reported.