This is a great idea for getting your own landline voip phone with free incoming and outgoing calls within US. Here is a summary of what you need to do: Things you need: 1. SIP ATA devie like a PAP2 NA or a SPA3102 along with ethernet cables (all available at about $30-$70). Or a software SIP Client like Xlite. 2. A normal phone and relevant phone cables if your using a SIP ATA device. 3. A system to do the one time configuration. Summary of accounts you need: 1. Create an account in www.sipcorcery.com 2. Create an account in http:://voice.google.com (currently availble with invites only but will be free soon) 3. Create an account in www.gizmo5.com (not required any more) 4. Create an account in www.sipgate.com and get your free incoming US number. (well you can create as many accounts as numbers you want. Summary of Configuration: 1. Onces you have your googlevoice, sipgate accounts, set it up in www.sipsorcery.com (need details contact me or wait till I put it up). 2. Connect your system to your SPA and after basic configuration, use the admin page to connect to the ATA device and configure it to communicate with www.sipsorcery.com. (again ask me for details) (Make sure you have NAT enabled and Nat Keepalive yes) 3. Connect your phone to the ATA device. 4. Now the final part for the free outgoing call, is the script in the dial plan of sipsorcery, which is Sipsorcery Configuration: 1. Create account using the "Create new Account" link on the home page. 2. Once you login you will see Username, Domain, Password, Owner etc, this is the account information you configure in your sip client. You will need to come back here to choose the dial out plan once your have the below dial out script updated. 3. Go to SIP Providers Link and update all the required information which you gathered from SIP Gate account. You can put as many entries as you want like for multiple incoming numbers. 4. Now go the Dial Plans link Click on the Add button and Give a name for the dial plan and copy paste the below dial out script into the text area. 5. Click on Add and your done with the dial out script. 6. Now go back to the SIP Accounts link and choose the first row entry which you have and from the Dial Out Plan pull down menu choose the name of the dial out plan you created in the above step. 7. Now configure your SIP Client e.g. Xlite or ATA device with the SIP sorcery user name password and SIP details and your all set. sys.GoogleVoiceCall("GVUSER_NAME","GVpassword","SI PGATENumber","#{req.URI.User}","GOOGLEVOICENUMBER" ) Now this will work in most cases but you will have to hang up the phone and wait for googlevoice to call you back for the outgoing call you want to make. This is where Gizmo5 comes in. sys.GoogleVoiceCall("GVUSER_NAME","GVpassword","Gizmo5 Number","#{req.URI.User}","GOOGLEVOICENUMBER" ) Since Gizmo5 is not available, trying using the following script: -------------------------------------------- Area = '408' # Google Voice accounts: login, password, callback number, match, phone type, callback tmo GVaccounts = [ ['email@gmail.com','password','Gizmo Number','.*',7,15], ['email@gmail.com','password','sipgate Number','.*',10], ] def gvcall(num,acnt) a = GVaccounts[acnt % GVaccounts.length] # fetch params sys.GoogleVoiceCall(*((a[0,3] << num) + a[3,10])) # insert number as 4th param end begin sys.Log("** Call from #{req.Header.From.to_s} to #{req.URI.User} **") if sys.Out # if outbound call num = req.URI.User.to_s # Get a string copy of the number to dial case num when /^[2-9]\d{6}$/ # Local call, 7-digit number num = '1'+ Area + num # prefix it with country and area code when /^[01]?([2-9]\d{9})/ # US number with or without "1" country code num = '1' + $1 # add country code and truncate number to 10-digit else sys.Respond(603,'Wrong number, check & dial again') end sys.Log("Calling #{num} via Google Voice") r = Time.now.to_i 2.times { |x| gvcall num,r+x } else # sys.Out sys.Dial("#{sys.Username}@local") end rescue sys.Log("** Error: " + $!) unless $!.to_s =~ /Thread was being aborted./ end -------------------------------------------- Some explanation about the script: Area is your local area code, so to make local calls you need not dial the full number, only rest of the 7 digits is needed. For all other calls to US, use 1 followed by the number. You can make more changes to make international calls using your google voice account. Please update the script with email@gmail.com, password, SIPgate number etc. You can trace how the call is being made and where if any error occurs, using the console in sipsorcery. Now you should be all done. (Feel free to contact me for more details.) Note: I have been getting feedback that users without Gizmo5 are having issues to have a complete system without having to hang up and wait for the callback from GV. I will be updating more scripts with solutions soon. |