别人打入电话,通过GV -->SG -->SS -->ATA,在ATA上显示的是SG的号码,而不是真正打入者的CID。看了看之前fitwxc的帖子,可能我没找对,没找到答案。
google搜了一下,发现可以解决这个问题,但涉及ruby plan,不知道怎么改。
http://www.mysipswitch.com/forum/viewtopic.php?t=1799
关键就是不知道该怎么套用下面这段
name = req.Header.from.FromURI.User.to_s ## if name =~ /^$|\D/
下面是我目前的dial plan
#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.FromURI.ToString()} to #{req.URI.User}.")
if sys.In then
# 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