[asterisk-users] Modifying CDR values from a hangup extension in Asterisk 13

Filip Jenicek fjenicek at kerio.com
Mon Aug 3 09:29:04 CDT 2015


Hi,

I'm trying to migrate from Asterisk 1.8 to Asterisk 13 and can't figure 
this one out. I'm pretty sure the question has been already asked, but I 
failed to find a solution.

Can you modify CDR values in an h-extension?

My cdr.conf contains:
[general]
enable=yes
unanswered=yes
endbeforehexten=yes
initiatedseconds=no
batch=no

The diaplan contains a simple "h" extension
exten => h,1,NoOp(${CDR(userfield)})
exten => h,n,Set(CDR(userfield)=changed)
exten => h,n,NoOp(${CDR(userfield)})

In the same context I execute:
exten => 10,1,Set(CDR(userfield)=empty)
exten => 10,n,Dial(SIP/10)

The "h" extension outputs two lines with userfield set to "empty". I 
would expect the second one to be "changed". It seems that I can read 
the CDR values, but I can't change them. Is it a bug or a design thing? 
Am I missing something?

Thank you,
Filip






More information about the asterisk-users mailing list