XMPP and Presence

Hello everybody,
I have a Question to the XMPP Protocol and the Presence!
Is it possible to send the presence Status of an Asterisk Phone to any Application (maybe WebApplication, Java etc.) ?
Or is it possible to get this Information over the AMI ?
Could I write maybe a Webapplication which gets from the AMI an “XMPP or XML” File and evaluates is, that I could get the Presence Status ?
Or Are their other Possibilities to get the Presence from an Asterisk ?