Fix an issue where an incompatible audio format may be added to SDP.

If preferred codecs included any non-audio format the code would
mistakenly add the audio format, even if it was not a joint capability
with the remote side.

(closes issue ASTERISK-21131)
Reported by: nbougues
Patches:
	patch_unsupported_codec_1.8.patch uploaded by nbougues (license 6470)
........

Merged revisions 401497 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 401498 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 401499 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@401500 f38db490-d61c-443f-a65b-d21fe96a405b