Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. IVR menu example:
  2.  
  3. [default]
  4. exten => steve,1,Dial(SIP/steve);
  5. exten => mark,2,Dial(SIP/mark);
  6.  
  7. [mainmenu]
  8. exten => s,1,Answer
  9. exten => s,n,Background(thanks) ; "Thanks for calling press 1 for sales, 2 for support, ..."
  10. exten => s,n,WaitExten
  11. exten => 1,1,Goto(submenu,s,1)
  12. exten => 2,1,Hangup
  13.  
  14. [submenu]
  15. exten => s,1,Ringing ; Make them comfortable with 2 seconds of ringback
  16. exten => s,n,Wait,2
  17. exten => s,n,Background(submenuopts) ; "Thanks for calling the sales ;department. Press 1 for steve, 2 for..."
  18. exten => s,n,WaitExten
  19. exten => 1,1,Goto(default,steve,1)
  20. exten => 2,1,Goto(default,mark,2)
  21.  
  22. Lets have a closer look at what the lines above do exactly.
  23.  
  24. Any call arriving in the mainmenu context, will first go to the s extension. (why ? Read on and you will find the answer below in the predefined extensions section)
  25.  
  26. exten => s,1,Ringing:
  27. The first priority in this s extension is extension 1, this will just provide some ringing sound to the caller.
  28.  
  29.  
  30. exten => s,n,Wait,2:
  31. The second priority in extension s, is the wait application with parameter 2, which would just wait for 2 seconds, and as a result give ringing for 2 seconds before playing the audio file "submenuopts" to the caller as defined in the 3rd priority. (exten => s,n,Background(submenuopts))
  32.  
  33.  
  34. exten => s,n,WaitExten:
  35. The 4th priority will wait for the caller to enter some digits, (such as press 1 for steve, press 2 for mark), the keys pressed by the caller will be the new extension. (if the person presses 1, the call will go to extension 1, priority 1, if the person presses 2, the call would go to extension 2, priority 2)
  36.  
  37.  
  38. Lets assume the caller pressed 2:
  39.  
  40. exten => 2,1,Goto(default,mark,2):
  41. The caller pressed 2 and the call flow will now go to the default context, extension mark, priority 2.
  42.  
  43.  
  44. exten => mark,2,Dial(SIP/mark);
  45. In this last step, it would dial the sip user mark. (as defined in sip.conf)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement