Subscribe

The Playback() and Background() Functions

These two functions are going to be commonly used in your dial plan. They are virtually the same thing with the exception of one detail, interactivity. First of all, let me share with you a piece of my dial plan that I am currently using on this computer.

[incoming]
exten => 866*******,1,Answer()
exten => 866*******,2,AGI(call_log.agi)
exten => 866*******,3,Wait(2)
exten => 866*******,4,Background(main)
exten => 866*******,5,Wait(15)
exten => 866*******,6,Hangup()

Let me share with you what all of that does. First of all, every line in the dial plan starts with “exten =>” then the incoming DTMF tone, then the priority of which the call will flow, and lastly the program to run. So, First it answers from the toll free number I have set up, it runs a call logging script, waits for 2 seconds, then plays a background file, waits again, and hangs up.

Ok, so you now see a background file in use, lets discuss it. Basically it will play a file and lets the user select something from a menu that you provide. Typically background files will say things like “If you would like to… press 1” and so on.

On the other hand, the playback function will not let the user press any buttons. the function ignores any DTMF that comes through the line.

(Visited 79 times, 1 visits today)

Don't miss a post! Subscribe to the RSS feed or by email today!

AddThis Social Bookmark Button
Related posts:
    No related posts

Comments are closed.



© 2007 Asterisk VOIP Tips | Powered by WordPress | Theme originally by Bob, heavily tweaked.