[Asterisk-Users] SetCDRUserField not working in A@H?

Michael Collins mcollins at fcnetwork.com
Wed Feb 1 01:54:35 MST 2006


I have A at H 2.1, running * 1.2.1.  I am trying to put information into the
userfield with SetCDRUserField and AppendCDRUserField.  However, the field
is never populated in the cdr - I've checked the csv files and the MySQL
asteriskcdrdb table.  The field is defined in the MySQL table, but is always
empty.  The csv files that get created don't have a userfield at all, that
is, there isn't an empty string (like "" ) but rather there is nothing.
Here's a sample:

 

"5017999","5597337550","s","outboundmsg1","5597337550","Zap/1-1","","BackGro
und","1-yes-2-no","2006-02-01 00:47:18","2006-02-01 00:47:18","2006-02-01
00:47:23",5,5,"ANSWERED","DOCUMENTATION"

 

My dialplan looks like this:

<snip>

exten => s,n,SetCDRUserField(${dnum})

exten => s,n,Noop(cdr user field is '${CDR(userfield)')

exten => s,n,AppendCDRUserField( ${cdn})

exten => s,n,Noop(cdr user field is '${CDR(userfield)')

exten => s,n,AppendCDRUserField( ${dialednum})

exten => s,n,Noop(cdr user field is '${CDR(userfield)')

;exten => s,n,Set(CDR(userfield)=${dnum}|${cdn}|${dialednum})

;exten => s,n,Noop(cdr user field is '${CDR(userfield)')

</snip>

 

I get the Noop lines logged at the CLI:

<snip>

    -- Executing SetCDRUserField("Zap/1-1", "data1") in new stack

    -- Executing NoOp("Zap/1-1", "cdr user field is data1") in new stack

    -- Executing AppendCDRUserField("Zap/1-1", " data2") in new stack

    -- Executing NoOp("Zap/1-1", "cdr user field is data1 data2") in new
stack

    -- Executing AppendCDRUserField("Zap/1-1", " data3") in new stack

    -- Executing NoOp("Zap/1-1", "cdr user field is data1 data2 data3") in
new stack

</snip>

 

Unfortunately I don't get a cdr with the userfield populated.  Has anyone
conquered this challenge before?  I saw a few old threads from 2004 but
there wasn't a conclusive answer.  Thanks!

 

-Michael

 

P.S. - this occurs in all contexts in the dialplan, in or out bound calls.
I've experimented with ResetCDR(w) and I still get the same symptoms

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060201/ab4096aa/attachment.htm


More information about the asterisk-users mailing list