E1 pri hangupcause help

Action: Originate
Channel: dahdi/g0/XXX
Context: fax
Exten: 999
Priority: 1
Timeout: 30000

dahdi/g0/ is E1 pri.
How can i get channel Channel: dahdi/g0/XXX’s dialstatus from AMI?
Why it’s hangup event cause is always 19 when channel is busy or noanswer or cannel,or chanunavail?
Thanks !!!

DIALSTATUS is only set when using the Dial application. Most of the statuses you mention would have no meaning for originate.

Either decode HANGUPCAUSE, or use a local channel.