Ozeki Phone System

Ruby SDK Commands

You are able to use the following commands through the ozeki_sms.gem and voip.gem, after you downloaded, and installed these gems.

Ruby SDK commands

These commands are called using HTTP requests (HTTP GET or HTTP POST requests) initiated by the Business Application.

Element Description
Class NG Requires Ozeki NG SMS Gateway
initialize Creates a new NG object.
send_sms Instance method to send an SMS message.
self.send_sms Class method to send an SMS message.
Class OPS Requires Ozeki Phone System
initialize Creates a new OPS object.
make_call Instance method to make a call.
send_sms Instance method to send an SMS message.
send_email Instance method to send an e-mail message.
list_active_calls Instance method to retrieve the list of active calls.
self.make_call Class method to make a call.
self.send_sms Class method to send an SMS message.
self.send_email Class method to send an e-mail message.
self.list_active_calls Class method to retrieve the list of active calls.
Class Response
Class Call Requires Ozeki Phone System
attended_transfer If getting a call, you can put it on hold and call a 2nd number, then connect the call with the 2nd number using AttendedTransfer.
blind_transfer_callee Transfer the call during the conversation, and the callee will leave the conversation.
blind_transfer_caller Transfer the call during the conversation, and the caller will leave the conversation.
forward Forward a call by ID to another number if it can't be answered.
hangup Terminates a call in progress by ID.
hold Puts both legs of the call from InCall state to Hold state by ID.
play_file Plays an audio file (local or downloaded from URL) in an existing call for both party.
play_file_to_callee Plays an audio file (local or downloaded from URL) in an existing call for the callee.
play_file_to_caller Plays an audio file (local or downloaded from URL) in an existing call for the caller.
record_mp3 Records a call in mp3 format.
record_wav Records a call in wav format.
dtmf Sends a DTMF message for both party.
dtmf_to_callee Sends a DTMF message for the callee.
dtmf_to_caller Sends a DTMF message for the caller.
speak Reads a text for both party using the text to speech engine into a call in progress.
speak_to_callee Reads a text for callee using the text to speech engine into a call in progress.
speak_to_caller Reads a text for caller using the text to speech engine into a call in progress.
unhold Puts both legs of the call to InCall state by ID.
Class SMS
self.ng_send_sms Class method to send an SMS message through Ozeki NG SMS Gateway.
self.ops_send_sms Class method to send an SMS message through Ozeki Phone System.

If you don't want unauthenticated users to give commands to the Ozeki Phone System using the HTTP API then you can ask for their username and password. A user can give his/her username and password as parameter in every command. Find out more about user authentication.

The following example projects were written in Ruby. Feel free to use them:

More information