| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Controlling call flow

Page history last edited by jay@... 16 years ago

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

// do something

when 2000

// do someting else

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

// do something

else if user_value == 2

// do something else

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.