The 7945 has a web interface that permits execution of commands, including a "Dial" command, by authenticated users.
Your rails app would connect to the phone at http://phone-ip-address/CGI/Execute
and POST
some XML that looks like this:
<CiscoIPPhoneExecute>
<ExecuteItem URL="Dial:12345" />
</CiscoIPPhoneExecute>
The authentication is done with HTTP Basic Auth and the back-end authenticator is determined by what phone system your 7945 is connected to. If Cisco Call Manager, it uses the assigned Call Manager user information.
Look for the IP Phone Services guides on cisco.com for details. Quick links:
Short answer: it's not a CLI but it is straightforward to program a dialer by interacting with the phone over HTTP.