Calling channel status

can anybode tell me how to get calling channel status i.e. ringing , unanswered , busy etc.

voip-info.org/wiki-Asterisk+ … DIALSTATUS