This plugin aims to provide a basic fax implementation.
- Asterisk - no
- FS/Event Socket - no
- FS/mod_rayo - yes
To use currently, you'll have to specify a feature branch of punchblock in your Gemfile:
gem 'punchblock', github: "adhearsion/punchblock", branch: "feature/cpa_fax"
To send a fax:
send_fax "http://foo.com/a_fax.tiff", identity: '1112223333', header: 'Hello!', pages: 1..4
To send multiple faxes with a common header and unique pages:
send_fax({
'http://example.com/fax.tiff' => {pages: 1..2},
'http://example.com/fax2.tiff' => {pages: 3..4}},
header: "Same for both"
)
To receive a fax (presumably after knowing you're getting a fax tone due to adhearsion-cpa):
response = receive_fax
url = response.fax.url #=> "http://some_fax.com/some_fax.tiff"
metadata = response.metadata #=> { "fax-transfer-rate" => "10000"...}
Specification: rayo-fax
Original author: Justin Aiken
Developed by Mojo Lingo in partnership with Grasshopper. Thanks to Grasshopper for sponsorship of Adhearsion Fax.
- Fork the project.
- Make your feature addition or bug fix.
- Add tests for it. This is important so I don't break it in a future version unintentionally.
- Commit, do not mess with rakefile, version, or history.
- If you want to have your own version, that is fine but bump version in a commit by itself so I can ignore when I pull
- Send me a pull request. Bonus points for topic branches.
Copyright (c) 2013 Adhearsion Foundation Inc. MIT license (see LICENSE for details).