Messaging and answering service question

I have a friend that is going to be an owner of his grand mothers answering service (that’s run out of a house). Currently they are using an old old old old system from the 80’s that’s running on SCO unix. So I need to know if this can be done (I have a lot of experiance with PHP/MySQL and have setup up Astrisk@home/trixxbox’s before with t1’s and such):

Support for telnet (ssh) / rs232 (digiboard breakout board) that will log me into a system with a ascii gui that has cntrl short cuts and arrow support (like the old bbs and some routers and switches do) and identify the phone they are sitting at as them.

Support for when a call comes in - identify for whom its for (i.e. Dr. Whatever - becuase it’s a fowarded call) (also I want it for the POTS and VOIP stuff - trunking)

Support for when the employee picks up a call in it will put the client information up on the screen and allow you start enterting in the call notes…

Support to do alpha numeric paging, normal paging, SMS and email… (Ok the last two are easy - there are sms gateways and email… that’s reallllllly easy).

Yes Yes Yes and Yes.

SSh can be done with a script using an AGI or the system command.

Email can be done as well with sendmail. SMS messages can be done with an SMS gateway or with most US providers you can send it to an email address from the provider (i.e. with sprint 3335551212@messaging.sprintpcs.com).

Well the last 2 I should have left out - But how do I script something like that?

its already been done… asterisk integrates with SugarCRM as well as others.

Asterisk has something called the Manager interface, you can connect to it via telnet and see everything going on inside *. From there you can route calls around, or get info on a call that is being delivered to a particular exten. From there you know what to pop up on the screen.

I’ve played with Sugar - but didn’t get it to work like that - maybe I need to look back over it.

As for SSH/Telnet/RS-232 - I want it to be the front end like Sugar… Maybe I should be look around at the API and do more diging for a VT-100 like interface howto.

Never mind - figured out how to do it to a point - need to figure out VT100 thou.