CANCEL is not captured on dialplan

When UserA calling UserB Dial in dialplan, CANCEL dialstatus from UserA is ignored:

exten => s,1,Dial(SIP/${ARG1}, 30)
exten => s,n, Verbose(0, “dial status: ${DIALSTATUS}”)
exten => s,n,Goto(${DIALSTATUS})
exten => s,n(CANCEL), Verbose(0, “Call canceled”)

[2012-10-22 15:22:58.521930] DEBUG[28680] app_dial.c: Exiting with DIALSTATUS=CANCEL.
[2012-10-22 15:22:58.521942] DEBUG[28680] app_macro.c: Spawn extension (macro-main,s,3) exited non-zero on ‘SIP/20003537_1-00000001’ in macro ‘main’

Any other way to capture cancel?


I would only expect the H extension to work after a cancel.