Change handset Screen Text during user login and logout with sipsak

I am trying to come up with a way of updating the Message section of our Snom phones to display the current logged on user details when someone logs into a phone.

I can manually update it using sipsak, but I would like this to happen dynamically, I gather during the execution of the user_login_out.agi.

I would like to do the following kind of thing when someone logs in …

sipsak -M -H asteriskbox -B “Someone logged in as Ext xxx” -r 5060 -s sip:[email protected] of phone

and then when they log out or someone else logs in update it accordingly.

If anyone can give me some pointers on how I might edit the userr_login_out.agi file to do this it would be most appreciated.