Hello
I want to change the “stage” field in the cdr table with the dialplan below. However, the field value is not as I expected.
[from-inside]
exten => _[-+*#0-9a-zA-Z].,1,Verbose(4,"Dial from inside: from ${CALLERID(num)} to ${EXTEN}")
same => n,Gosub(func-set-cdr-stage,s,1(entry(${EXTEN})))
same => n,Gosub(func-set-cdr-stage,s,1(dial(${EXTEN})))
...
[func-set-cdr-stage]
exten => s,1,Verbose(4,"func set cdr stage: stage=${ARG1}")
same => n,Set(stage=${CDR(stage)}\n${EPOCH} | ${ARG1})
same => n,Set(CDR(stage)=${stage})
same => n,Return()
Current “stage” value from the CDR table;
\\n1731339898 | entry(XXXXXX)\\n1731339898 | dial(XXXXXX)
Expected;
1731339898 | entry(XXXXXX)
1731339898 | dial(XXXXXX)
The NewLine escape character “\n” is not working correctly. What could I have missed?