Dial and options h/H and cause end of call

I make call : Dial(SIP/user,,H)

How to find out the cause end of call ? The call end by a remote party or by pressing a button * ?