Ruby VoIP developers 101
Part 3: Ruby connection with gem library (SMS)
The Ozeki Phone System gives you the opportunity to use its special features. It is possible to use the ozeki_sms.gem library to connect to the Ozeki Phone System. This guide helps you to install, and use this library.
- Download example project (which contains the library): ozeki-voip-ruby-advanced-example-source.zip
- Reference manual: HTTP API Online Manual
This page assumes that you already have some basic knowledge in Ruby programming language. If you don't have these skills, then you should check out our basic examle site at Ruby basic example.
First you should download the Ozeki_VoIP_Ruby_Library.zip (100KB). After unpacking this zip file, you should execute the following command in a command prompt or in a terminal.
gem install ozeki_sms
2. Using the library
In your project after the successful installation, you should include the gem file with the following command.
Now you are ready to call the functions. Here is an example how to send an SMS from the 9999 API extension to the 2000 SIP extension if your Ozeki Phone System XE IP address is 192.168.0.1, the HTTP API service is listening on port 7780, and the authentication is set to Anonymous.
OPS.send_sms '192.168.0.1', '9999', '2000', 'Hello world!' ops = OPS.new '192.168.0.1', '9999' ops.send_sms '2000', 'Hello world!'
To send an SMS through the Ozeki NG - SMS Gateway.
ng = NG.new '192.168.0.1', 'admin', 'password' ng.send_sms '06203105366', 'Hello world', 'admin'
Read more about OzML commands.
If you have any questions or need assistance, please do not hesitate to contact us at email@example.com.