Enum fields not encoded / decoded correctly
Hello,
when I was trying to decode Result-Code / Experimental-Result-Code / Inband-Security-Id I sow that the were not decoded in response as string. They stayed as integer.
The source of that decoding issue is that decoder doesn't recognize AVP fields marked with <avp ... contenttype="Enumerated" ...>
only <avp ... type="Enumerated" ...>
Example:
When setting enum avp value it should be possible to set as enum string like this:
Avp("Inband-Security-Id", "TLS")
<avp code="299" contenttype="Enumerated" mandatory-flag="must" may-encrypt="no" name="Inband-Security-Id" protected-flag="may" sect="RFC 3588 sect 6.10 79f" type="Unsigned32" vendor-flag="mustnot">
<enum value="0">NO_INBAND_SECURITY</enum>
<enum value="1">TLS</enum>
</avp>
**For analysis: **
- to forbid in request
Avp("Inband-Security-Id", 1)
because it should expect enum text, not integer value - or to allow in request
Avp("Inband-Security-Id", 1)
but to internally validate against enum list
- response decoder should always decode as
Avp("Inband-Security-Id", "TLS")