You may be better of checking the license features itself in this case. Meaning use of dev_getLicFeatureData() API which you can get the Basic RTP versus Enhanced RTP ports available which correlate to types of Codecs that can be supported.
Refer to HMP 3.0 SU release updates notes for this section:
1.104 Retrieving FlexLM-based Licensed Feature Data
www.dialogic.com/.../release_update.pdf
Jeff