Introduction

This is a Ruby API Wrapper for the RouteNGN SIP routing platform. For more information about RouteNGN, see www.routengn.com.

  • Note: This is not the RouteNGN API itself. This a wrapper designed to make it easier to integrate with the RouteNGN API.

Installation

Install the “routengn” gem by typing

$ sudo gem sources -a http://gemcutter.org
$ sudo gem install routengn

The first line tells RubyGems to add the GitHub gem repository. You only need to run this command once.

Examples

Using irb:

klarrimore@calculatorwristwatch:~$ irb
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'routengn'
=> true
irb(main):003:0> RouteNGN.connect! "http://routengn.net", "qcuL3YAw9ZXdmSdqprBw", "LDI2rgxIhJlNu5FBXh0UvtxJRtpr1OgnCIQ8Mpk"
=> #<RouteNGN::Connection:0x7ffaadc3f578 @access_token=#<OAuth::AccessToken:0x....
irb(main):004:0> Carrier.all
=> [#<Carrier:0x7f1c6e36ce28 @id=152, @saved=true, @name="test">]
irb(main):005:0> Carrier.first.groups
=> [#<Group:0x7f1c6e335c70 @active_end_day=nil, @id=103, @add_type=nil, @carrier_id=152, @strip_digits=nil,
@active_begin_day=nil, @add_field=nil, @saved=true, @active_end_time=nil, @margin=0, @trunkgroup=nil,
@add_digits=nil, @active_begin_time=nil, @direction="in", @name="test2", @remove_rn=nil, @prefix=nil,
@rn_prefix=nil>, #<Group:0x7f1c6e335c48 @active_end_day=nil, @id=102, @add_type=nil, @carrier_id=152,
@strip_digits=nil, @active_begin_day=nil, @add_field=nil, @saved=true, @active_end_time=nil, @margin=0, @trunkgroup=nil,
@add_digits=nil, @active_begin_time=nil, @direction="out", @name="test", @remove_rn=nil, @prefix=nil, @rn_prefix=nil>]
irb(main):006:0> Carrier.first.groups.first.endpoints
=> [#<Endpoint:0x7f1c6e2f21c8 @id=39, @saved=true, @ip="65.200.189.134">]

Credits

klarrimore@gentel.net
qhoxie@gentel.net

License

Copyright 2008-2009 GT3 HOLDINGS, LLC

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.