Advertisement
oquidave

IVR menu options

Oct 26th, 2012
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 KB | None | 0 0
  1. //CLI-->pressing option "2" doesn't call SIP/40, instead it goes to extension 2 in context local, yet i thought i should go to extension 2 in context senteLtdMenu. How can i achieve that??
  2.  
  3.  
  4. -- Executing [750@local:1] Answer("SIP/50-00000007", "") in new stack
  5. -- Executing [750@local:2] BackGround("SIP/50-00000007", "user_recordings/senteVoiceMenu") in new stack
  6. -- <SIP/50-00000007> Playing 'user_recordings/senteVoiceMenu.slin' (language 'en')
  7. == CDR updated on SIP/50-00000007
  8. -- Executing [2@local:1] BackGround("SIP/50-00000007", "demo-moreinfo") in new stack
  9. -- <SIP/50-00000007> Playing 'demo-moreinfo.gsm' (language 'en')
  10. -- Executing [2@local:2] Goto("SIP/50-00000007", "s,instruct") in new stack
  11. -- Goto (local,s,6)
  12. -- Executing [s@local:6] BackGround("SIP/50-00000007", "demo-instruct") in new stack
  13. -- <SIP/50-00000007> Playing 'demo-instruct.gsm' (language 'en')
  14.  
  15. //sip.conf(part of it)
  16. [50]
  17. ;this user enters local context in extensions.conf
  18. context=local
  19.  
  20. //extensions.conf(just part of it)
  21. [local]
  22. ;include the IVR context
  23. include=>senteLtdMenu
  24.  
  25. //IVR context in extension.conf
  26. [senteLtdMenu]
  27. exten => 750,1,Answer()
  28. same=>n(sente_prompt),Background(user_recordings/senteVoiceMenu);play a sound "main menu" while waiting for user input
  29. same=>n,WaitExten(60);wait for 5 seconds
  30. ;respond to the prompts
  31. exten=>1,1,Dial(SIP/30);say "1" back to the user when they press 1
  32. same=>n,GoSub(subTimeControl,s,1(50))
  33. same=>n,Goto(senteLtdMenu,750,sente_prompt);this is a loop or like a recursive function call
  34. exten=>2,1,Dial(SIP/40);say "2" back to the user whey they press 2
  35. same=>n,Goto(senteLtdMenu,750,sente_prompt);this is a loop or like a recursive function call
  36. exten=>3,1,Dial(SIP/perezdroid);call perez's droid
  37. ;handle invalid inputs
  38. exten=>i,1,Playback(pbx-invalid);invalid inputs are sent to extension i
  39. same=>n,Goto(senteLtdMenu,750,sente_prompt);go back and let the user input correct entries
  40. ;handle timemouts
  41. exten=>t, 1,Playback(vm-goodbye);when system has timed out, dialplan is sent to extension t
  42. same=>n,Hangup();just hangup
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement