한국어

IPPBX/GW

온누리070 플레이스토어 다운로드
    acrobits softphone
     온누리 070 카카오 프러스 친구추가온누리 070 카카오 프러스 친구추가친추
     카카오톡 채팅 상담 카카오톡 채팅 상담카톡
    
     라인상담
     라인으로 공유

     페북공유

   ◎위챗 : speedseoul


  
     PAYPAL
     
     PRICE
     

pixel.gif

    before pay call 0088 from app


http://www.voip-info.org/wiki/view/Asterisk+tips+ivr+menu


Asterisk tips ivr menu

Interactive voice response menus


Implementing a simple 'push-1, push-2' menu structure

The key to creating this menu is to create an Extension (defined as 205 below) to record your menu prompts. This will put the sound file in/tmp/asterisk-recording.gsm. You'll have to move that file each time its created to /var/lib/asterisk/sounds and rename it to something pertinent to your design so it can be called from the dial-plan. Notice the line under [mainmenu] exten => s,5,Background(sai-welcome). The
sai-welcome is one of those .gsm sound files. The rest of the dial-plan just defines what happens when each option is pushed. If you want to be able to have regular users update the voice prompts, see asterisk tips phrase recording menu.

extensions.conf



[mainmenu]
  exten => s,1,Answer
  exten => s,2,SetMusicOnHold(default)
  exten => s,3,DigitTimeout,5
  exten => s,4,ResponseTimeout,10
  ;SAI menu - 1 for tech support, 2 for voicemail, 3 for echo test
  exten => s,5,Background(sai-welcome)
  exten => s,6,Background(sai-choose)

  ; Tech Support
  exten => 1,1,AGI(dima-test.agi)
  exten => 1,2,SetGlobalVar(ACCOUNTCODE=${callerid})
  exten => 1,3,SetVar(testcallerid=${callerid})
  exten => 1,4,Background(sai-reptech-welcome)
  exten => 1,5,Queue(rep-tech)

  ; Leave Voicemail
  exten => 2,1,VoicemailMain()
  exten => 2,2,Hangup

  ; Echo Test
  exten => 3,1,Playback(demo-echotest)
  exten => 3,2,Echo
  exten => 3,3,Playback(demo-echodone)
  exten => 3,4,Goto(mainmenu,s,6)

  ; EAGI Test
  exten => 4,1,Answer()
  exten => 4,2,Wait(1)
  exten => 4,3,AGI(sai-repid.agi)
  exten => 4,4,Wait(1)
  exten => 4,5,Hangup

  ; Play Music-on-Hold
  exten => 5,1,MusicOnHold(default)
  exten => 5,2,Goto(mainmenu,s,6)
  ; #=hangup
  exten => #,1,Playback(sai-thanks)
  exten => #,2,Hangup

  exten => t,1,Goto(#,1)         ; If they take too long, give up
  exten => i,1,Playback(invalid) ; "That's not valid, try again"

 [default]
  include => mainmenu
  include => local
  include => longdistance
  include => joe-iax
  include => npi-iax

  ; Record voice file to /tmp directory
  exten => 205,1,Wait(2) ; Call 205 to Record new Sound Files
  exten => 205,2,Record(/tmp/asterisk-recording:gsm) ; Press # to stop recording
  exten => 205,3,Wait(2)
  exten => 205,4,Playback(/tmp/asterisk-recording) ; Listen to your voice
  exten => 205,5,wait(2)
  exten => 205,6,Hangup


Example menu with timeout and invalid option. Works with Asterisk 1.6 

exten => s,1,Set(NUMINVALID=0)
exten => s,2,Set(NUMTIMEOUTS=0)
exten => s,3,Background(thank-you-for-calling)
exten => s,4,Set(TIMEOUT(digit)=5)
exten => s,5,Set(TIMEOUT(response)=10)
exten => s,6,WaitExten(5)

exten => t,1,Set(NUMTIMEOUTS=$[${NUMTIMEOUTS}+1]})
exten => t,2,Gotoif($["${NUMTIMEOUTS}" < "3"]?s,3)
exten => t,3,Background(vm-goodbye)
exten => t,4,Hangup()

exten => i,1,Set(NUMINVALID=$[${NUMINVALID}+1]})
exten => i,2,Gotoif($["${NUMINVALID}" < "4"]?:10)
exten => i,3,Background(invalid)
exten => i,4,Goto(s,3)
exten => i,10,Playback(vm-goodbye)
exten => i,11,Hangup()



Implementing a high-density without wearing out your keyboard

Now consider an information delivery IVR, such as a bus schedule. The basic call flow goes something like:

Hear initial greeting
Hear root menu
Descend into to menu 1
Descend into to submenu 2
Play information message at option 4
Return to submenu 2
Descend into to submenu 7
Return to root menu
{and so on...}

The schedule that prompted creation of this code has 136 possible menu/message combinations.



[transit-ivr]
 exten => s,1,Answer
 exten => s,2,SetVar(ivrflag=transit)                                                    ; Unused at the moment
 exten => s,3,Background(transit-ivr/grtg-3)                                             ; Play the initial greeting (interruptable)
 exten => s,4,Goto(transit-ivrmain,s,1)                                                  ; Start the menuing system after the message completes

 exten => _x,1,Goto(transit-ivrmain,s,1)                                                 ; Start the menuing system if the user presses any key during the greeting

[transit-ivrmain]
 exten => s,1,NoOp(s,1 - Has ${digitstack} in the digitstack)
 exten => s,2,GotoIf($[${LEN(${digitstack})} = 0]?s-restart,1)                ; If there is nothing in the stack at all then restart the stack 
 exten => s,3,System(/var/lib/asterisk/sounds/transit-ivr/filexists /var/lib/asterisk/sounds/transit-ivr/${digitstack}.gsm)  ; test for the existance of this path as a recording
 exten => s,4,Background(transit-ivr/${digitstack})
 exten => s,5,NoOp()                                                                     ; insert padding to offset s,9 so it in turn is offset cleanly enough for it's n+101 jump
 exten => s,6,NoOp()
 exten => s,7,NoOp()
 exten => s,8,NoOp()
 exten => s,9,System(/var/lib/asterisk/sounds/transit-ivr/filexists /var/lib/asterisk/sounds/transit-ivr/${digitstack}?.gsm)  ; test for the existance of additional recordings underneath the current path

 exten => s,104,NoOp(we should warn the user they chose an invalid option...)                         ; Relative to s,3
 exten => s,105,SetVar(digitstack=${digitstack:0:$[${LEN(${digitstack})} - 1]})
 exten => s,106,Goto(s,1)

 exten => s,110,NoOp(there aren't any menus below this one, so go back up one level)     ; Relative to s,9
 exten => s,111,SetVar(digitstack=${digitstack:0:$[${LEN(${digitstack})} - 1]})
 exten => s,112,Goto(s,1)

 exten => s-restart,1,SetVar(digitstack=0)
 exten => s-restart,2,Goto(s,1)

 ; Capture keypresses
 exten => _X,1,SetVar(digitstack=${digitstack}${EXTEN})
 exten => _X,2,GotoIf($[${digitstack:$[${LEN(${digitstack})} - 1],1} = 8]?_X,10)
 exten => _X,3,Goto(s,1)
 exten => _X,10,SetVar(digitstack=${digitstack:0:$[${LEN(${digitstack})} - 2]})          ; Eight pops two digit off the stack... (including the 8 itself)
 exten => _X,11,Goto(s,1)



'.../transit-ivr/filexists' is a bash script containing:


 #!/bin/bash
 #  Test for the existance of files based on shell globbing patterns

 for a in $1;
 do
  if [ -f $a ] ; then
        # there are one or more files that match;
        exit;
  else
        # there aren't any files that match;
        exit 1;
 fi;
done;



Finally, the folder '.../transit-ivr/' contains a collection of .gsm recordings named according to their 'dialing path', thus:


 8192 Aug 27 00:53   .
 20480 Aug 27 00:53  ..
 54285 Aug 25 22:46  0.gsm                  This is the root menu
 66429 Aug 25 22:47  01.gsm                This is menu 1 off of the root
 17556 Aug 25 22:46  02.gsm                This is menu 2 off of the root
 17292 Aug 25 22:44  023.gsm               This is informational recording 3 off of menu 2 off of the root
 115533 Aug 25 22:48 03.gsm                This is menu 3 off the root
 {and so on...}



When creating the recordings, any recording that doesn't have another recording 'below' it in 'dialing path' is implicity an informational recording (a leaf on the tree). To work backwards up the tree 8 (or any other key) has to be assigned to 'go back to the previous menu'. Other global keys such as 'exit to operator' and 'end call/hangup' can be assigned similarly using dialplan logic.

The next refinement to this model would be to add a filename suffix parser to be able to embed jumps, transfers and out-dials inside the tree by encoding them into the filenames (ie. 029x1235551212.gsm).

All of this should be painfully familiar if you've worked with Nortel Norstar NAM3 based StarTalk IVRs before.


Advanced IVR Menu


Here is a more advanced IVR application that is assumed you know how it works. I found this example in a newsgroup but I don't have the url to reference. It was very helpful for me to see this type of setup different from the ones provided above.

This shows the flow between multiple IVR menus and how to control and display the information. I will show the basics of the IVR.





 [deeper]
exten => s,1,Background(demo-nomatch)
;exten => s,1,AGI(festival-script.pl|"deeper menu")
exten => s,2,Goto,options|s|1

[options]
exten => s,1,Background(demo-instruct)
;exten => s,1,AGI(festival-script.pl|"options menu")
exten => 1,1,Goto,deeper|s|1
exten => 2,1,Goto,sales|s|1

[sales]
exten => s,1,Background(demo-thanks)
;exten => s,1,AGI(festival-script.pl|"sales menu")
exten => 0,1,Goto,from-sip|1000
exten => 1,1,Goto,Menu|s|1

[Menu]
exten => s,1,Background(demo-congrats)
;exten => s,1,AGI(festival-script.pl|"menu menu")
exten => 1,1,Goto,sales|s|1
exten => 2,1,Goto,options|s|1
exten => i,1,Goto,s
exten => t,1,Goto,s


;The specific method to enter the menu is up to you but I used my sip phone to test.
[from-sip]

exten => 100,1,Answer
exten => 100,2,Goto,Menu|s|1





If you have sip configured this should work out of the box. I am not sure if it requires that you have the sample installed to have the default sound files but this is what i have setup above. If you have festival configured on the box then you can use the commented out lise for the festival-script.pl which does not require the running festival server but rather just have the binaries in the path.

The important piece that I really didn't realize on this site is the Goto that allow you to go to a context which was a simple piece that I was missing"exten => 100,2,Goto,Menu|s|1" or "exten => 100,2,Goto(Menu,s,1)". So each menu is a context and I can move back and forth through each one for a more advanced IVR setup.

Here is a portion of that listed above that accepts the call and plays the message. And accepts a 1 or 2 as menu options to change the option. When the 1 is pressed then the IVR will go to the sales context and when the 2 is pressed then I will go to the options context.



[Menu]
exten => s,1,Background(demo-congrats)
exten => 1,1,Goto,sales|s|1
exten => 2,1,Goto,options|s|1  




This may have been clear but from my reading I missed it and thought it should be added to the site.


IVR Menu with navigation history


Context voicemenu-mymenu_level0 is a top level.

CUR_LEVEL - global variable store current position in menu, with navigation history, items separated by #
For example

voicemenu-mymenu_level0#voicemenu-mysubmenu1_level1#voicemenu-mysubmenu3_level2#


macro-mymenu_addlevel - macros to push level into history stack.
macro-mymenu_prevlevel - macros to pop level from history stack.

user can press * at any level to go into previously visited menu level.

Advantages:
- wen you build menu, you don't care about reverse dependencies.
- don't use any external scripts
- possible to use same context in different branches with correct reverse navigation (look at voicemenu-mysubmenu3_level2 it available from voicemenu-mysubmenu1_level1 and voicemenu-mysubmenu2_level1)




;tested with Asterisk 1.6.2.5

[macro-mymenu_addlevel]
exten = s,1,NoOp(${MACRO_CONTEXT})
exten = s,2,Set(Count=${FIELDQTY(CUR_LEVEL,#)})
exten = s,n,Gotoif($[ "${CUT(CUR_LEVEL,#,$[${Count}])}" = "${MACRO_CONTEXT}" ] ]?s-exit) ;if last level in stack same as current context then exit.
exten = s,n,Set(PREV_LEVEL=${CUR_LEVEL})
exten = s,n,Set(__CUR_LEVEL=${IF($[ "${PREV_LEVEL}" != "" ]?${PREV_LEVEL}#:${PREV_LEVEL})}${MACRO_CONTEXT}); add MACRO_CONTEXT to stack
exten = s,n(s-exit),NoOp(Exit form macro-mymenu_addlevel)

[macro-mymenu_prevlevel]
exten = s,1,Set(Count=${FIELDQTY(CUR_LEVEL,#)})
exten = s,2,Set(TMP=${CUR_LEVEL})
exten = s,n,Set(TOGO=${CUT(TMP,#,$[${Count}-1])});Count alwayse >0
exten = s,n,Set(__CUR_LEVEL=${IF( $[${Count}>1]?${CUT(TMP,#,-$[${Count}-2])}:"")}); if count>1 set CUR_LEVEL, else clear it.
exten = s,n,NoOp(${CUR_LEVEL})
exten = s,n,Goto(${TOGO},s,1)

[voicemenu-mymenu_level0]
exten = s,1,Macro(mymenu_addlevel)
exten = s,n,Answer()
exten = s,n,Set(TIMEOUT(digit)=5)
exten = s,n,Set(TIMEOUT(response)=10)
exten = s,n,Background(greatings_1)
exten = s,n,WaitExten(5)
exten = 0,1,Dial(SIP/6051,300,r); fax
exten = 1,1,Goto(voicemenu-mysubmenu1_level1,s,1)
exten = 2,1,Goto(voicemenu-mysubmenu2_level1,s,1)
exten = i,1,Goto(s,1)
exten = t,1,Goto(voicemenu-mymenu-operator,s,1)

[voicemenu-mysubmenu1_level1]
exten = s,1,Macro(mymenu_addlevel)
exten = s,n,Background(payment_1)
exten = s,n,WaitExten(5)
exten = 0,1,Goto(voicemenu-mymenu-operator,s,1)
exten = 1,1,Goto(voicemenu-mysubmenu3_level2,s,1)
exten = *,1,Macro(mymenu_prevlevel)
exten = i,1,Goto(s,1)
exten = t,1,Goto(voicemenu-mymenu-operator,s,1)

[voicemenu-mysubmenu2_level1]
exten = s,1,Macro(mymenu_addlevel)
exten = s,n,Background(payment_2)
exten = s,n,WaitExten(5)
exten = 0,1,Goto(voicemenu-mymenu-operator2,s,1)
exten = 1,1,Goto(voicemenu-mysubmenu3_level2,s,1)
exten = *,1,Macro(mymenu_prevlevel)
exten = i,1,Goto(s,1)
exten = t,1,Goto(voicemenu-mymenu-operator2,s,1)

[voicemenu-mysubmenu3_level2]
exten = s,1,Macro(mymenu_addlevel)
exten = s,n,Background(howtodosomething)
exten = s,n,WaitExten(5)
exten = *,1,Macro(mymenu_prevlevel)
exten = i,1,Goto(s,1)
exten = t,1,Goto(voicemenu-mymenu-operator1,s,1)





Other way of doing this


The above are great ways to create simple IVR applications using Asterisk. But Asterisk is a PBX system, not a full featured IVR system. Capabilities like database connection, website connection, GUI design environment for IVR call flows are not the strong suite of PBX systems. Here are some of the options which may help with IVR development:


See Also


번호 제목 글쓴이 날짜 조회 수
98 php memory and filesize increase upload wav admin 2019.06.25 5994
97 changing SIP drivers to CHAN_PJSIP Please err 에러 admin 2019.06.21 6977
96 /dev/mapper/ubuntu--vg-root filling up admin 2019.04.08 13313
95 how-to-freepbx-13-firewall-setup admin 2017.08.14 21563
94 Configuring Your PBX admin 2017.08.17 21600
93 Asterisk dialolan detail explan good easy clean admin 2017.08.26 21618
92 RPi Text to Speech (Speech Synthesis) admin 2017.08.24 21689
91 Google letter agi admin 2017.08.26 21763
90 IVR actions asterisk admin 2017.08.31 21770
89 asterisk XactView V3-CRM Widget admin 2017.08.24 21816
88 /sbin/service httpd start stop web start stop admin 2017.08.16 21864
87 download Installing+AsteriskNOW admin 2017.08.25 21868
86 Asterisk 13 Debian 8 admin 2015.11.13 21869
85 NAT 와 VoIP 시그널과 RTP 전송 영향 NAT와 방화벽/STUN/TURN/ICE/SBC admin 2017.08.19 21883
84 User Control Panel (UCP) 14+ admin 2017.08.23 21887
83 AsterSwitchboard CTI Operator Panel for Asterisk admin 2017.08.08 21903
82 asterisk CRM SUGARCRM SuiteCRM admin 2017.08.24 21927
81 asterisk freepbx TTS Engine Custom - Amazon Polly - 24 languages admin 2017.08.24 21930
80 Asterisk/IVR/PBX/VoIP/Contact center/Voicebroadcast engineer admin 2017.08.25 21935
79 FreePBX 12 – Getting Started Guide admin 2017.08.29 21947
78 thirdlane PBX price admin 2017.08.23 21971
77 github A2Billing is commercially supported by Star2Billing admin 2017.08.26 22020
76 SUGAR CRM admin 2017.08.23 22047
75 Text to Speech User Guide admin 2017.08.24 22059
74 asterisk IVR 쉽게 설정하기 admin 2017.08.16 22073
73 Capturing SIP and RTP traffic using tcpdump admin 2017.08.17 22116
72 asterisk Chapter 6. Dialplan Basics admin 2017.08.25 22147
71 FOIP: T.38 Fax Relay vs. G.711 Fax Pass-Through (Fax Over IP) admin 2015.09.24 22174
70 Asterisk based auto dialer test and verified by 300+ concurrent. admin 2017.08.31 22191
69 OPUS and VP9 Bitrates admin 2017.08.17 22192
68 asterisk FreePBX 14, Distro 14 & More! admin 2017.08.16 22208
67 Top 10 greater worker admin 2017.08.26 22220
66 Asterisk Downloads AsteriskNOW Software PBX admin 2015.05.05 22240
65 Configuring an Asterisk server admin 2015.05.05 22259
64 iptables for asterisk simple example configuration admin 2017.08.31 22263
63 TwistedWave Online A browser-based audio editor admin 2017.08.25 22266
62 Insert into dialplan Asterisk admin 2017.08.26 22271
61 Asterisk Freepbx Install Guide (CentOS v7, Asterisk v13, Freepbx v13) admin 2017.08.23 22294
60 Asterisk 설치 준비 admin 2015.11.15 22327
59 Brand New Sealed Sangoma FreePBX 60 - 75 Users or 30 Calls admin 2017.08.05 22334
58 음성통화 서버 Asterisk + FreePBX / 통화 시연해보기 admin 2017.08.18 22361
57 HOW TO INSTALL FREEPBX ON CENTOS 7 admin 2017.08.24 22368
56 fax licenses Asterisk admin 2015.05.05 22401
55 Fax Configuration FREE PBX and asterisk FAX admin 2015.05.05 22414
54 Considerations for Using T.38 versus G.711 for Fax over IP file admin 2015.09.24 22414
53 How to Install Asterisk 13 on Ubuntu 16.04 from Source admin 2017.08.23 22432
52 User Control Panel (UCP) asterisk freepbx admin 2017.08.17 22444
51 FreePBX – Custom FAX to email admin 2015.05.05 22466
50 A simple IVR and Queue example where customer listens to marketing materials .. admin 2015.05.05 22497
49 FaxServer using Asterisk admin 2015.05.05 22506
48 Price ,,Install Commercial Modules on CentOS and RHEL based admin 2017.08.16 22510
47 WombatDialer is highly scalable, multi-server, works with your existing Asterisk PBX. admin 2017.08.31 22551
46 Installing FreePBX 14 on Debian 8.8 These instructions work fine admin 2017.08.29 22563
45 Asterisk A simple IVR admin 2015.05.05 22582
44 초보) Asterisk , AsteriskNow 무엇인가? 무슨차이인가? 시작 배우기 쉽게 이해 공부 사용 admin 2017.08.29 22583
43 Generic Asterisk SIP Configuration Guide admin 2015.05.05 22587
42 Installing SNG7 Official Distro admin 2017.08.17 22600
41 우분투 Mumble VoIP 음성채팅서버 구축 admin 2017.08.18 22623
40 FAX over IP sofware admin 2015.05.05 22638
39 Setup Asterisk 13 with FreePBX 13 in CentOS 7 admin 2017.08.24 22643
38 T.38 Fax Gateway Asterisk admin 2015.05.05 22686
37 Asterisk Answering Machine Detection (AMD) Configuration admin 2017.08.17 22694
36 How to install and setup Asterisk 14 (PBX) on CentOS 7 admin 2017.08.23 22716
35 Incoming Fax Handling admin 2015.05.05 22760
34 Using Asterisk to Detect and Redirect Fax Calls for Communications Server admin 2015.05.05 22895
33 Smart Predictive Auto calling Software System: Automatic Phone Calling admin 2017.08.31 22905
32 Introducing Asterisk Call Distribution ACD asterisk admin 2017.08.31 22913
31 AGI asterisk gateway interface synopsis admin 2017.08.26 22932
30 Dialplan handler routines allow customization admin 2017.08.26 22945
29 Fax For Asterisk download add on 1 port free IVR prompt G.729 admin 2015.05.05 22958
28 MP3 to WAV, WMA to WAV, OGG Convert audio to WAV online admin 2015.05.09 23011
27 Setup FAX on Asterisk with DIDForSale SIP DIDs admin 2015.05.05 23033
26 How to build an outbound Call Center with Newfies-Dialer and Asterisk/FreePBX admin 2017.08.31 23099
25 Playing text to speech inside read function in asterisk admin 2017.08.28 23102
24 asterisk dialplan 설명 admin 2017.08.16 23130
23 Asterisk Answering Machine Detection (AMD) Configuration admin 2017.09.01 23148
22 Automatic Call Distribution (ACD) Asterisk as Call Center admin 2017.08.31 23196
21 Setup install Asterisk PBX telephony system | VOIP Tutorial admin 2015.05.05 23338
20 Text to speech for asterisk using Google Translate admin 2017.08.24 23467
19 VICIdial Scratch Installation CentOS 7 & MariaDB & Asterisk 11 & Latest VICIdial SVN admin 2017.09.02 23469
» Asterisk tips ivr menu Interactive voice response menus admin 2015.05.05 23537
17 Hosting Cheap VPS Hosting that doesn’t feel cheap admin 2017.08.24 23758
16 Installing AsteriskNOW Official Distro admin 2015.05.05 23910
15 Speech Recognition on Asterisk: Getting Started admin 2017.08.28 24021
14 Asterisk 가장쉬운 설치 및 설정 사용 방법 이해 할수있게 배우는 순서 안내 설명 admin 2017.08.16 24160
13 Freepbx on Debian (Debian v7, Asterisk v11, Freepbx v2.11) admin 2015.05.05 24643
12 List of 5 Open Source Call Center Software Programs admin 2017.08.31 24647
11 Asterisk fax Asterisk and fax calls Fax over IP admin 2015.05.05 25066
10 Asterisk Quick Start Guide admin 2015.05.05 25299
9 A2Billing v2.2 Install Guide CentOS v7 Asterisk v11 v13 seems to work FreePBX v13 admin 2017.08.23 25530
8 A2Billing v2 Install Guide admin 2015.05.05 25916
7 Securing Your Asterisk VoIP Server with IPTables admin 2015.05.05 26129
6 Asterisk Freepbx Install Guide (CentOS v6, Asterisk v13, Freepbx v12) admin 2015.05.05 26856
5 Fusionpbx v4 Freeswitch v1.6 CentOS v7 Install Guide admin 2017.08.23 27342
4 How to Install Asterisk on CentOS 7 easy clean explain 깔금한 쉬운 설명 admin 2017.08.23 28682
3 라즈베리파이, 아스타리스크(asterisk) PBX(사설교환기) admin 2017.08.23 29609
2 Asterisk AGI/AMI to ARI Asterisk&FreePbx - IVR setting admin 2015.05.05 31829
1 Make Your Own IVR with Asterisk admin 2017.08.26 36351