I’d be curious to know if there is a way to do this inside the asterisk CLI as well. I’ve been pulling it from the http access logs as the firmware version is logged there.
There currently no way to get the SIP useragent string from the Asterisk CLI, but it is hidden in the AstDB. There are likely more elegant ways to get it, but once I have the hash (or the contact URI) from the output above, I will grep it from the DB with:
asterisk -x "database show registrar contact" | grep 408b5c7335