Hello, I've been learning about XAVPs recently, they seem to be a perfect PV to return a complex struct-like result from a module. However, it appears there's a limitation regarding accessing nested XAVPs from Kamailio script. For example, consider the following structure:
"result": { "account": { "id": 12345, "country": "es" } } This maps well to a XAVP: $xavp(result) # XAVP value $xavp(result=>account) # XAVP value $xavp(result=>account=>id) # Integer value $xavp(result=>account=>country) # String value Unfortunately this doesn't work, as only values at the first level are accessible. So, these integer and string reads both resolve to $xavp(result=>account) access. As far as I understand, this limitation is due to pv_parse_xavp_name() and pv_get_xavp() functions in pv module (these two seem to be responsible for $xavp(a=>b) syntax in Kamailio script). While sr_xavp_t and pv_xavp_name_t structures are ready to handle arbitrary nesting in XAVPs, these two functions do not try to read anything besides the first level. Is this correct, or am I missing something? Are there some technical reasons for this limitation, or is it simply due to a lack of time or necessity for such a feature? Thanks, _______________________________________________ Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org To unsubscribe send an email to sr-dev-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!