我原帖的ruby plan按你说的改了以后,还是显示的sipgate的号码。我又看了一下链接的内容,更改如下,但也不行
这是更改后的
#Ruby
# Dial Plan Generated by Rubyzard v0.1
# If you need help, please post in our forum
# http://www.mysipswitch.com
# SIP tracing : true or false
sys.Trace = false
sys.Log("** Call from #{req.Header.From.ToString()} to #{req.URI.User} **")
if sys.In
name = req.Header.from.FromURI.User.to_s
sys.Log("FromName: '#{name}'")
req.Header.From.FromName = name
req.Header.from.FromURI.User = name
# Do your INCOMING call processing customisations here.
if sys.IsAvailable() then
sys.Dial("#{sys.Username}@local",30)
sys.Dial("Enter Number@SG",30)
sys.Respond(480, "#{sys.Username} Not available")
else
sys.Dial("Enter Number@SG",30)
sys.Respond(480, "#{sys.Username} Not available")
end
else
# Do your OUTGOING call processing customisations here.
case req.URI.User
when /^011/ then sys.Dial("nonoh")
#when /^1/ then sys.Dial("SG")
when /^1/ then sys.GoogleVoiceCall("full gail address", "GV password", "SG #", "#{req.URI.user}","GV#")
else sys.Dial("SG")
end
end
这是更改后的
#Ruby
# Dial Plan Generated by Rubyzard v0.1
# If you need help, please post in our forum
# http://www.mysipswitch.com
# SIP tracing : true or false
sys.Trace = false
sys.Log("** Call from #{req.Header.From.ToString()} to #{req.URI.User} **")
if sys.In
name = req.Header.from.FromURI.User.to_s
sys.Log("FromName: '#{name}'")
req.Header.From.FromName = name
req.Header.from.FromURI.User = name
# Do your INCOMING call processing customisations here.
if sys.IsAvailable() then
sys.Dial("#{sys.Username}@local",30)
sys.Dial("Enter Number@SG",30)
sys.Respond(480, "#{sys.Username} Not available")
else
sys.Dial("Enter Number@SG",30)
sys.Respond(480, "#{sys.Username} Not available")
end
else
# Do your OUTGOING call processing customisations here.
case req.URI.User
when /^011/ then sys.Dial("nonoh")
#when /^1/ then sys.Dial("SG")
when /^1/ then sys.GoogleVoiceCall("full gail address", "GV password", "SG #", "#{req.URI.user}","GV#")
else sys.Dial("SG")
end
end