中虾2011-08-21 22:17:35

我试了您介绍用Sipsorcery+ipkall+GV+voipdiscount的方法,其他都没有问题,只是不知用什么GV call back number,我用了我家里的电话号码,结果每次家里的电话响了并接通后才能再接通想要拨打的号码,如果家里的电话没有人接,根本就打不出去。30秒后说无人接听。

不知是什么地方的设定出了问题?

下面是我借用您的Dial Plan. 谢谢。

sys.Log("Log message from default dialplan.")
sys.Log("call from #{req.Header.From.FromURI.ToString()} to #{req.URI.User}.")

AREA_code = "206" # your area code for 7 digits dialling
GV_name = "myemail" # google voice account name
GV_pass = "mypassword" # google voice account password
GV_callback = "homephonenumber" # google voice call back number
SIP_provider = "default" # SIP provider name for international calling

num = req.URI.User.to_s

# re-format telephone number ###

num = num.sub(/^011/,'+') # 011 86 xxx to +86 xxx
num = num.sub(/^00/, '+') # 001 206 xxx to +1 206 xxx

case num
when /^[2-9]d{6}$/ # 7 digits number, add area code
num = "+1" + AREA_code + num
when /^[1]d{10}$/ # 1 206 555 1212, add +
num = "+" + num
when /^d{10}$/ # 206 555 1212, add +1
num = "+1" + num
end

# end of re-format ###

sys.Log ("Final Dial Number = " + num)

case num
# Use Voipdiscount for non US/Canadian numbers
when /^\+[^1]/,/^\+1684/,/^\+1264/,/^\+1268/,/^\+1242/,
/^\+1246/,/^\+1441/,/^\+1284/,/^\+1345/,/^\+1767/,
/^\+1809/,/^\+1473/,/^\+1671/,/^\+1876/,/^\+1664/,
/^\+1670/,/^\+1869/,/^\+1758/,/^\+1599/,/^\+1784/,
/^\+1868/,/^\+1649/,/^\+1340/
sys.Dial(num + "@" + SIP_provider)
else
sys.GoogleVoiceCall(GV_name,GV_pass,GV_callback, num, ".*",1,30)
end

中虾2011-08-21 22:23:46
对不起,是请教mc3361
mc33612011-08-22 02:30:30
GV回拨要用ipkall的号码,因为sipsorcery在等待回拨,你用家里的号码不灵
mc33612011-08-22 02:34:12
ipkall设置成转接到sipsorcery
中虾2011-08-22 07:01:33
谢谢你mc3361,设置成功,测试成功。