Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.
/ rsipgate Public archive
forked from corny/sipgate

send fax through sipgate and check their sending status

License

Notifications You must be signed in to change notification settings

simonoff/rsipgate

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rsipgate

Installation

gem 'rsipgate'

Configuration

Sipgate.user     = "your-account"  # the web user name, not the SIPid
Sipgate.password = "your-password"

If the api hostname differs from samurai.sipgate.net you can set it explicitly. api.sipgate.net is used for team-customers, whereas samurai.sipgate.net is for basic and plus customers.

Sipgate.api_host = "api.sipgate.net"

Usage

Receivers come with national prefix and local code, e.g. 4969xxxxxxxxx, for Germany (+49), Frankfurt (69).

send a pdf

fax      = Sipgate::Fax.new
sender   = '15198765432'     # must be registered as fax device
receiver = '496912345678'
pdf_file = File.read("document.pdf")
result   = fax.send(receiver, pdf_file, sender)
status   = fax.status(result.session_id)

send an sms

sms      = Sipgate::Sms.new
sender   = '15198765432'     # must be validated in web frontend first
receiver = '4917512345678'
text     = "This is a test!" # max. 160 chars
sms.send(receiver, text, sender)

Copyrights

Copyright (c) 2012 Alexander Simonov (http://simonov.me/), released under the MIT license

Copyright (c) 2009 Digineo GmbH (http://www.digineo.de/), released under the MIT license

About

send fax through sipgate and check their sending status

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%