3 examples using CDR()

Comment on Asterisk func cdr
baji
Joined: Tue 17 of Apr, 2007

3 examples using CDR()

Posted:Fri 13 of Jul, 2007 (03:19 UTC)
;
; -------- (examples from use in asterisk version 1.4.7) -------------
;
; Initialize two vars
;
exten => s,1,Set(Var_1=foo)
exten => s,n,Set(Var_2=bar)
;
; Remember "userfield" is not a token that you can replace with an identifier of your choice
; it is a constant.
;
exten => s,n,Set(CDR(userfield)=bling blong blang)
;
; Stores "bling blong blang" in untagged field at the end of the CDR in
; /var/log/asterisk/cdr-csv/Master.csv
; Not a very useful form
;
exten => s,n,Set(CDR(userfield)=${Var_1}_${Var_2})
;
; Stores "foo_bar" in the same field at the end of the CDR
;
exten => s,n,Set(CDR(userfield)=At ${CDR(start)} From callerID ${CDR(clid)} eat your ${CDR()} )
;
At 2007-07-12 22
56:44 From callerID guest eat your foo_bar
;
; ---------------------------------------------