H extension not executed

Hi, I know that this topic is disscussed there many times, but I havent found the answer…

I want to store HANGUPCAUSE in cdr_custom,i have this extension:

exten =>_0X.,1,Dial(IAX2/****/${EXTEN:1},g)

and this in same context

exten => h,1,Set(CDR(userfield)=Hangupcause:${HANGUPCAUSE})

cdr is set correctly… but the “h” extension is never triggered when I call from asterisk to phone…
I’m I missing something important?

h is only run on the A channel unless you specifically set the option to also run it on the B channel.

Manipulating CDRs can have strange effects when done in h, as the CDR that actually gets output is not the one that is current when h is running.