A friend of mine K0KN has a ton of information related to asterisk and interfacing All Starlink. There are some very handy scripts also on his site that can be used for many things. Check it out at http://www.qsl.net/k0kn/. Once there click on Linux Scripts.
I will be adding more to this in the future...