This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'simple-rss' | |
require 'open-uri' | |
require 'hpricot' | |
require 'couchrest' | |
require 'xmlsimple' | |
BASE_URI = 'http://www.sec.gov' | |
#Connect to our document database |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT PRS_REGION_ID, ENABLED FROM PRS_NPANXX_LOCATIONS WHERE NAME = :vLocalNPANXX | |
SELECT M.ANNOUNCEMENT, R.ENABLED FROM PRS_MESSAGES M, PRS_REGIONS R WHERE R.ID = :vREGION and R.PRS_MESSAGE_ID = M.ID | |
select name,phone from PRS_VIP where phone = :phone |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[11/18/2008 02:20:24:791 PM] TID:[4152] | |
ENTER FUNCTION | |
TAction.DoSQLAction :: = | |
{ | |
StrategyId: 39, | |
CallId: 3422, | |
QueryName: SelNPANXX, | |
ConnectionName: dbOraclePTools, | |
SQL: SELECT&bs;PRS_REGION_ID&cm;&bs;ENABLED&bs;FROM&bs;PRS_NPANXX_LOCATIONS&bs;WHERE&bs;NAME&bs;&is;&bs;&eq;vLocalNPANXX, | |
Params: vLocalNPANXX&is;vNPANXX, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tue Nov 18 14:05:53 -0600 2008 | |
Tue Nov 18 14:05:54 -0600 2008 | |
GET /lookup_type=callerid&db=stjoe&callerid=unknown | Status: 200 | Params: {:database=>"db=stjoe", :lookup_key=>"callerid=unknown", :lookup_type=>"lookup_type=callerid", :format=>"html"} | |
Tue Nov 18 14:06:00 -0600 2008 | |
Tue Nov 18 14:06:01 -0600 2008 | |
GET /lookup_type=callerid&db=stjoe&callerid=unknown | Status: 200 | Params: {:database=>"db=stjoe", :lookup_key=>"callerid=unknown", :lookup_type=>"lookup_type=callerid", :format=>"html"} | |
Tue Nov 18 14:06:05 -0600 2008 | |
Tue Nov 18 14:06:06 -0600 2008 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'simple-rss' | |
require 'open-uri' | |
require 'hpricot' | |
require 'couchrest' | |
require 'xmlsimple' | |
BASE_URI = 'http://www.sec.gov' | |
#Connect to our document database |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"npanxx": { | |
"map": "function(doc) { emit(doc.npanxx, doc) }" | |
}, | |
"all": { | |
"map": "function(doc) { emit(null, doc) }" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##Model | |
class NpaNxx | |
include DataMapper::Resource | |
property :id, String, :key => true, :field => :_id, :serial => true | |
property :rev, String, :field => :_rev | |
property :npanxx, String, :view => true | |
property :region, String | |
property :ocn, String | |
property :ratecenter, String |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
raw_response("EXEC SipAddHeader " + | |
"P-Asserted-Identity:" + | |
"#{service[:callerid_name]}<sip:#{service[:callerid_number]}@#{$config["from_domain"]}>") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'net/http' | |
http = Net::HTTP.new('localhost', 4567) | |
path = '/call' | |
data = 'destination=14155551212&source=9998' | |
response, body = http.post(path, data) | |
puts response.inspect | |
puts body.inspect |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'digest' | |
require 'net/http' | |
require 'net/https' | |
require 'uri' | |
USER = '[email protected]' | |
PASS = 'test1234' | |
SECRET = 'supersecret' | |
CLIENT = 'MyClient' |