[asterisk-users] 1.6, CDR and h extension

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Mon Dec 29 12:01:26 CST 2008


On Monday 29 December 2008 08:57:19 am Benny Amorsen wrote:
> I have two version 1.6 Asterisks running. One is a small hobbyist
> thing just at home, and the other is handling calls for several
> customers.
>
> On both, I have added the line
>
> exten => h,1,Set(CDR(hangupcause)=${HANGUPCAUSE})
>
> to all relevant contexts.
>
> On my little hobbyist box this works perfectly; all calls have their
> hangupcauses recorded with cdr_adaptive_odbc and cdr_custom. On the
> production server, it only works sporadically; for 4 out of 5 calls
> the hangupcause field is empty. If I look at the Asterisk console, I
> see a message like this for every call:
>
> -- Executing [h at CallToVPBX:1] Set("DAHDI/49-1", "CDR(hangupcause)=16")
>    in new stack
>
> Unfortunately hangupcause doesn't actually make it to the database or
> the csv file, despite that message.
>
> My cdr.conf on both servers:
>
> [general]
> enable=yes
> batch=yes
> size=10
> time=60
> scheduleronly=no
> safeshutdown=yes
> endbeforehexten=no
>
> I am probably just being stupid somehow, but I cannot figure out what
> is wrong. Both asterisks are 1.6.0.1-2.fc10.

The only thing that occurs to me is that you might be using ForkCDR on your
production machine, in which case, you might want:
Set(CDR(hangupcause,r)=${HANGUPCAUSE})
for recursive setting of the hangupcause.

-- 
Tilghman



More information about the asterisk-users mailing list