chan_iax2: Fix a crash that occurs when using allow=all for an IAX2 peer

Or any combination of codecs that includes Opus.

ASTERISK-24107 #close
Review: https://reviewboard.asterisk.org/r/3885/


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