Telnet

Greetings!

I am developing application which will automatically show phone number on users desktop. Since I couldn’t find any better solution (free, or cheap, of course), I started parsing messages which I get from Asterisk via telnet.

I almost finnished application, but I stucked with one thing. When user call, no one answers, and user give up, is it possible to determine that user hanged up?

Also, where I can find more detailed informations about Asteriss events? For example:

Event: Hangup
Privilege: call,all
Channel: SIP/245-098b1010
Uniqueid: 1213025921.15449
Cause: 16
Cause-txt: Normal Clearing

Where to find out what is cause, and what is it mean? Privilege?

Thank you in advance,
Stanko.