see my dial plan

回答: 用手機免費打網絡電話思蘆2010-04-20 17:01:43

dial plan for my handset at sipsorcery
#Ruby
sys.Trace = false

AREA_CODE = 'xxx' # my area code

sys.Log("call from #{req.Header.From.FromURI.ToString()} to #{req.URI.User}.")

# Logic

if sys.In then
if sys.IsAvailable() then
sys.Dial("#{sys.Username}@local",30)
sys.Respond(480, "#{sys.Username} Not available")
else
sys.Dial("myhandset@local",30)
sys.Respond(480, "#{sys.Username} Not available")
end
else
case req.URI.User
when /^01$/ then sys.Dial("myhome@local",30) # dial my handset
else
sys.GoogleVoiceCall("GVname", "GVpass", "sipgate#", "#{req.URI.user}",".*",1)
end
end

similar for dialplan of my home phone

請您先登陸,再發跟帖!