|
|
本帖最后由 Test 于 2012-9-25 15:42 编辑
here he how to set up how to link freephoneline , google voice, sipsorcery, and ipkall (optional) to get the following>
Unlimited North america Long Distance (using google voice)
Simultainious forwarding (make multiple sip devices and cell or home phones ring at same time)
Inbound Caller ID name/city/state lookup (using whitpages.com)
Google 411 by dialing 411
How TO
1) set up your http://www.freephoneline.ca account and and pay for your config file
($50 one time fee, worth every penny, Get a Canadian DID number along with free calling to most major cities in canada, no service fees ever. Can also Port in your current number if tyou are local to a free calling area listed on the site)
2) [you can skip this is your FPL is in area code 403]
Set up your http://www.IPkall.com account
Account type: SIP
SIP Phone Number: sipsorceryusername
SIP Proxy: sipsorcery.com
3)
Se up your http://dev.whitepages.comaccount and create application
it will generate a API Key that you need for your dialplan script
4)
Create http://www.sipsorcery.com account
Add sip provider with this information- Provider name = freephoneline
- username = FPLUSERNAME
- Password = FPLPASSWORD
- Server = voip.freephoneline.ca
- Register=checked
- Registercontact=SIPSORCERYUSERNAME@sipsorcery.com
- Register Expiry=600 (its under advanced)
复制代码 Create Dial plan Named Inbound, paste dialplan from below, make sure you edit the appropriate lines (marked with ###)- #psycodialin v 1.0 by psycon psyconpgATgmail.com
- #Check for updates at the freephoneline.ca forums
- if sys.IsAvailable() then # if online
- WP_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' ###### EDIT THIS LINE WITH White Pages API key
- CNAM = {
- '77812345678' => "My Cell",
- '12221231234' => 'Work',
- '12223334444' => 'Your Woman'
- }
- ##################you shouldnt edit anything below this####################
- if sys.In ..
- name = req.Header.from.FromURI.User.to_s
- name = ('1' + name) if name =~ /^[2-9]\d\d[2-9]\d{6}$/
- name.sub!(/^011/,'')
- if !(cname = CNAM[name]) && name =~ /^1([2-9]\d\d[2-9]\d{6})/
- url = "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20xml%20where%20url%3D'http%3A%2F%2Fapi.whitepages.com%2Freverse_phone%2F1.0%2F%3Fphone%3D#{$1}%3Bapi_key%3D#{WP_key}'%20and%20itemPath%3D'wp.listings.listing'&format=json"
- if js = sys.WebGet(url,4).to_s
- if !(js =~ /"businessname":"([^"]+)"/ && cname = $1)
- if !(js =~ /"displayname":"([^"]+)"/ && cname = $1)
- cname = %w(city state).collect {|x| js =~ /"#{x}":"([^"]+)"/; $1}.join(', ')
- end
- end
- end
- end
- name.sub!(/^1/,'')
- sys.Log("Caller's number: '#{name}'"); sys.Log("Caller's name = '#{cname}'") if cname
- # sys.SetFromHeader(formatNum(cname || name), nil, nil)
- sys.SetFromHeader(cname || name, nil, nil)
- # Forward call to bindings. Change FromURI when forwarding to
- # @local, or else Bria won't find contact in its phonebook!
- sys.Dial("#{sys.Username}@local[fu=#{name}]&XXXXXXXXXX@freephoneline[fu=#{name}]") #####HARDCODE XXXXXXXXXX as FORWARD NUMBER
- # sys.Dial("#{sys.Username}@local[fu=#{name}]&XXXXXXXXXX@freephoneline[fu=#{name}]&XXXXXXXXXX@freephoneline[fu=#{name}]"
- ########or you can perform a normal follwme by adding the seconds at the end#####
- # sys.Dial("#{sys.Username}@local[fu=#{name}],20")
- # sys.Dial("FOLLOWNUMBER2@freephoneline[fu=#{name}],10") #HARDCODE A NUMBER IF U WANT TO USE THIS
- # sys.Dial("FOLLOWNUMBER3#freephoneline[fu=#{name}],10") #HARDCODE A NUMBER IF U WANT TO USE THIS
- #######
- sys.Respond(480, "#{sys.Username} Not available")
- sys.Respond(480, "#{sys.Username} Not online") # switch to voice mail
- end
- else # if phone is not online.
- sys.Dial("HARDCODE@freephoneline") #####HARDCODE FORWARD NUMBER
- sys.Respond(480, "#{sys.Username} Not available")
- end
复制代码 Create Dial Plan Named Outbound, make sure you edit the appropriate lines (marked with ###)- #psycodialiout v 1.0 by psycon psyconpgATgmail.com
- #Check for updates at the freephoneline.ca forums
- GV_USER = 'username@gmail.com' ###### your GV e-mail address (user@gmail.com)
- GV_PASS = 'password' ###### my GV password
- CB_NUMBER = 'ipkallnumber' ####### your number that google voice forwards to
- sys.Log "** Call from #{req.Header.From} to #{req.URI.User} **"
- case req.URI.User
- when /^1/ then sys.GoogleVoiceCall(GV_USER,GV_PASS,CB_NUMBER,"#{req.URI.User}") #GV Call Via Callback
- ####
- #when /^1/ then sys.GoogleVoiceCall(GV_USER,GV_PASS,CB_NUMBER,"#{req.URI.User},".*",1") #Direct GV Call NoCallbackl
- ####
- when /^411/ then sys.Dial("8004664411@freephoneline")
- else
- sys.Dial("#{req.URI.User}@freephoneline")
- end
复制代码 Go to sip account page, and apply the dialplans
5)
Set up a http://www.google.com/voice account
IF your in Canada, or anywhere else not in the US see here: http://www.wifitalk.ca/iphone/howto-goo ... in-canada/
register/forward it to your IPKall Number (or direcly to your FPL if it is in area code 403)
and/or use hotspotshield but beware of ASK.COM toolbar options in installation
Done!
Now point your ATA / softphone to your sipsorcery account instead of directly to FPL and your ready to go
Dial 10 digitnumber to use FPL normally
Dial 1+10digitnumber to use google voice
411 will get you Google 411
Note: Disabling follow me settings on the FPL website will ring all phones in the sipsorcery inbound dialplan (simul ring), if forwarding to non sip phones, your FPL number will show as the caller id.
When unavailable will be the same for the first few rings, then normal followme will take place (with proper caller id)
Always forward will be as it normally was
8 devices can log in to the sipsorcery account via SIP and will all ring on incoming calls
------------------------
http://forums.redflagdeals.com/s ... psorcery-856269/14/
|
|