Include ${HANGUPCAUSE} in CDR

Home » Asterisk Users » Include ${HANGUPCAUSE} in CDR
Asterisk Users No Comments

I am trying to include the ${HANGUPCAUSE} in my mySQL cdr tables. I have a
field called cause_code but it won’t write. I belive it is because the
record has already been written by the time I hit the h section of the
code. How might I get this info into the CDR. I need this info for Quality
of Service as well as route checking. Any ideas would be apperciated.

Here is my dial line and my h lines. I also use the g option so if the
other party hangs up and that is not working either.

exten =>
doDialStd,n,Dial(${siteDefaultOutboundTrunk}/${c_DialArg}${c_DialExten},120,
ge)

exten => h,n,Set(CDR(cause_code)=${HANGUPCAUSE})

Bryant exten => h,n,Set(CDR(cause_code)=${HANGUPCAUSE})Bryant