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)
?為我正在找的含有主叫用戶信息的一個變量
哪位高手能指點一下,謝謝