The current implementation of all codec_ operations only accept clear text. I think it's very better and useful, if i can use avp variables with codec_ functions. Example scenario to specify allowed codecs and codec preference order per sip clients from database or any other source that can't produce variables.
Hello,
I have just commited a patch which implements the desired functionalities. You can now do something like this in the script :
$var(codec)="speex";
$var(clock)="8000";
if (codec_exists("$var(codec)","$var(clock)"))
xlog("speex/8000 codec detected\n");