How to capture the useragent

Hello comrads,

I noticed that with 1.4+ you can see the useragent of connected devices appear in the log once you enable rtp and sip presence.

I want to know how i can capture the useragent in realtime so it updates a column…I purely want to implement this for statistics purposes to see how many clients are using asterisk.