if sys.In then
# Do your INCOMING call processing customizations here.
if sys.IsAvailable("#{req.URI.User}","sipsorcery.com") then #这儿的#{req.URI.User}看起来是我的GV号码
sys.Dial("#{req.URI.User}@local",30)
sys.Respond(480, "#{req.URI.User} Not available")
else
sys.Respond(480, "#{req.URI.User} Not available")
end
else
case req.URI.User #这儿的 req.URI.User看起来像是要呼叫的号码
when /^011/ then sys.Dial("VD" )
else
sys.GoogleVoiceCall("username@gmail.com", "password", "1206xxxxxxx","#{req.URI.User}",".*",1,30) #这儿的 #{req.URI.User}看起来像是要呼叫的号码
end
end
我有两个sip account,需要两个单独的dialplan。按照sipsorcery的新政只能有一个,正在研究怎么加一个case的选择。比如:
case ?
when GVnumber1 then
sys.GoogleVoiceCall("username1@gmail.com", "password1", "1206xxxxxx1","#{req.URI.User}","?",1,30)
when GVnumber1 then
sys.GoogleVoiceCall("username2@gmail.com", "password2", "1206xxxxxx2","#{req.URI.User}","?",1,30)
?为我正在找的含有主叫用户信息的一个变量
哪位高手能指点一下,谢谢