你这个太深奥了,会把菜鸟搞蒙。我前面的那个比较容易一瓢画葫芦
fitwxc
2011-08-16 18:07:31
( reads)
nb = req.URI.User
sys.Log("call from #{req.Header.From.FromURI.ToString()} to #{nb}.")
case nb
when /^1?\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d$/ then
sys.GoogleVoiceCall("johnsmith@gmail.com","gv_password","ipkall_or_sipgate_#","#{nb}",".*",3)
sys.Respond(480, "#{sys.Username} Not available")
when /^\\+\\d{3,}/,/^00\\d{3,}/,/^011\\d{3,}/ then
sys.Dial("VoipDiscount")
sys.Respond(480, "#{sys.Username} Not available")
else
sys.Respond(480, "#{sys.Username} Not available")
end
mc3361
2011-08-16 21:10:24精简版