Since Adhearsion is written in Ruby, it's very easy to change the flow logic of a phone call as it's processed in the system. You can for example ask what the extension that was called and provide special processing. For example.
case extension
when 1000
when 2000
end
You can ask the user for input an adjust processing based on their entry.
user_value = input(nil, :play => "/tmp/instructions")
if user_value == 1
else if user_value == 2
end
You could even se what time it is and have the system base it's logic on the result from the time.
t = Time.now
hour = t.hour
if hour > 20
// it's too late to receive phone calls. hangup
else
// dial extension passed in
end
Could probably add a number of other examples here showing simple ruby conditionals to control call flow.
Comments (0)
You don't have permission to comment on this page.