Project

rsipgate

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
send fax through sipgate and check their sending status
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

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