A teeny tiny enhancement to your code...
From:
Code: Select all
2.times { |x| gvcall num,r+x }
Code: Select all
GVaccounts.length.times { |x| gvcall num,r+x }
Ron
Code: Select all
2.times { |x| gvcall num,r+x }
Code: Select all
GVaccounts.length.times { |x| gvcall num,r+x }
Hi Mike, you make it sound so easy. I added sys.Dial("Localphone") after the GVcall line and simulated a GVcallback failure but when it gets to the Localphone provider, I get a PSTN routing error. The console shows that the num reverts back to the number you dialed, not the processed num that supports 7/10 digit.MikeTelis wrote:Of course there's a way! If sys.GoogleVoiceCall failed to connect the call it would return control to your dialplan. Then you can use sys.Dial to switch it over to a paid provider.Also, is there a way to add to the failover DP so that if GV is down/not working and it times out on every GV callback provider, it finally dials to a paid provider (i.e. Localphone)?
Code: Select all
GVaccounts = [
["Sipgate",GV_email,GV_pwd,SIPnumSG,GV_num,'.*',1,10],
["Gizmo",GV_email,GV_pwd,SIPnumG5,'.*',7,10]
]
Code: Select all
def googleVoice(acnt)
a = GVaccounts[acnt] # fetch params
sys.Log("*** Calling GOOGLEVOICE USING #{a[0]} ***")
sys.GoogleVoiceCall(*((a[1,3] << @num) + a[4,4]))
end