Voici mon dial plan. Je voudrais savoir
J'ai deux questions :#Ruby
# Dial Plan Generated by Rubyzard v0.1
# If you need help, please post in our forum under
# the Getting Started section
# 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",20)
sys.Respond(480, "#{sys.Username} Not available")
end
else
# Do your OUTGOING call processing customisations here.
case req.URI.User
when /^028809113$/ then sys.Dial("Voxalot")
when /^5555$/ then sys.Dial("028809113@3stars")
when /^0800/ then sys.Dial("3stars")
when /^04[7-9]/ then sys.Respond(403, "NUMERO #{req.URI.User} REFUSE")
when /^0[1-6]/ then sys.Dial("Voxalot")
when /^07[1-9]/ then sys.Dial("Voxalot")
when /^08/ then sys.Dial("Voxalot")
when /^001/ then sys.Dial("Voxalot")
when /^0033[1-5]/ then sys.Dial("Voxalot")
when /^00339/ then sys.Dial("Voxalot")
when /^\*1/ then sys.Dial("${dst:2}@3stars")
when /^\*2/ then sys.Dial("${dst:2}@Voxalot")
else sys.Respond(403, "NUMERO #{req.URI.User} REFUSE")
end
end
1) Y a-t-il par exemple moyen de concaténer ces deux lignes?
2) Que ce soit les erreurs 403, 480, etc du protocole sip, je constate que j'ai tjs les mêmes messages vocaux. Y a-t-il moyen de personnaliser ceci sur mysipswitch?when /^0[1-6]/ then sys.Dial("Voxalot")
when /^07[1-9]/ then sys.Dial("Voxalot")
Merci,
Lechat