So in very recent published versions of Asterisk 16/18/19 there is the new JSON_DECODE
function. I’ve been meaning to publish a bit of a user guide, but this will do until I get a round tuit. [It’s done now, see it here]
You can store 1D array JSON in the CDR(userfield)
or in a channel var (or in the extension accountcode ahem @billsimon ) something like:
{
"SRCPBX":"${SRCPBX}",
"SRCEXTEN":"${EXTEN}",
"SRCUNIQUEID":"${UNIQUEID}",
"RECFILE":"${CDR(recordingfile)}",
"PLEXOPVAR":"${PLEXOPVAR}",
"INVESUSVAR":"${INVESUSVAR}",
"CDRINFOVAR":"${CDRINFOVAR}",
}
and then later when you need to ref one of those values you can do so using
${JSON_DECODE(CDR(userfield),SRCUNIQUEID)}