Force IVR to ignore invalid user entries

Hello everyone!

I am a beginner with FreePBX and I have my first setup almost complete, I have a problem with IVR settings. Right now, incoming call goes to IVR, hears the announcement and when he enters an invalid entry, announcement stops and depending on the settings goes to ring group or replays the message or goes to invalid entry announcement.

I need for the IVR to ignore the invalid entries that the user enters and continue the announcement waiting for a valid entry from the user or for the timeout. Tried all the options in IVR settings, but nothing worked…Any ideas?

Each IVR has an “invalid destination” (and a timeout destination), just send it back to the same IVR

But what I want is for the announcement to continue not stop and start again. Basically what I need is:

Caller calls - IVR starts announcement - Caller enters wrong extension - IVR continues like nothing happened - Caller enters correct extension - IVR transfers the call to the extension

Now, the last 2 parts I know how to do. The problem is in the first 3 parts

You would have to rewrite that part of the logic in the dialplan that currently returns an invalid entry to the IVR’s invalid destination. Likely a ‘gosub’ routine could do that, but human engineering would require you to let the caller know he ‘effed up’ and to retry , you would need to reset the timeout counter also.

When you say “rewrite that part of the logic in the dialplan” what do you mean?

You can rewrite any context of the dial plan as it comes from FreePBX and put that context in

/etc/asterisk/extensions_override_freepbx.conf

This is not trivial and takes quite a lot of RTFM’ing I suggest you start with

http://asterisk-service.com/downloads/Asterisk-%20The%20Definitive%20Guide,%204th%20Edition.pdf

the context you might want to override would start with

[ivr-n] ; yourivrname

and ends with

;--== end of [ivr-n] ==--;

in the /etc/asterisk/extensions_additional.conf file

The bits you need to rewrite are the ones that start with

exten => i,1 . . . . .

most folks are happy with appropriate settings for the

Invalid Retries 

Invalid Retry Recording 

fields in the IVR

If I change it, won’t it change back when I save something in the GUI?

No that’s why you put it in the override file

/etc/asterisk/extensions.conf

;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make    ;
; custom modifications, details at: http://freepbx.org/configuration_files       ;
;--------------------------------------------------------------------------------;

;*******************************************************************************
; AUTO-GENERATED AND CUSOTM USER DIALPLAN INCLUDED HERE                        *
;*******************************************************************************

;--------------------------------------------------------------------------------;
; Customizations to this dialplan should be made in extensions_custom.conf
; See extensions_custom.conf.sample for an example.
;
; If you need to use [macro-dialout-trunk-predial-hook], [ext-did-custom], or
; [from-internal-custom] for example, place these in this file or they will get overwritten.
;
; WARNING ABOUT: #include extensions_override_freepbx.conf
;
;  This include file is put first to allow the auto-generated dialplan in FreePBX
;  to be overwritten if necessary. Overriding auto-generated dialplan should be done
;  with extreme caution. In almost all cases any custom dialplan SHOULD be put in
;  extensions_custom.conf which will not hurt a FreePBX generated dialplan. In some
;  very rare and custom situations users may have a need to override what FreePBX
;  automatically generates. If so anything in this file will do that.  If you come up
;  with situations where you need to modify the existing dialplan or macros, put it
;  here.
;
#include extensions_override_freepbx.conf
#include extensions_additional.conf
#include extensions_custom.conf

(and yes , yours is indeed a ‘very rare case’)
.
.
.
.

I think that if you use 0 in the invalid retries, it means infinite retries

From the dialplan’s ‘invalid’ extension (where the loop count was 5 and failover destination was rg 600)

exten => i,1,Set(INVALID_LOOPCOUNT=$[${INVALID_LOOPCOUNT}+1])
exten => i,n,GotoIf($[${INVALID_LOOPCOUNT} > 5]?final)
exten => i,n,Set(IVR_MSG=no-valid-responce-pls-try-again)
exten => i,n,Goto(s,start)
exten => i,n(final),Playback(no-valid-responce-transfering)
exten => i,n,Goto(ext-group,600,1)

so likely ${INVALID_LOOPCOUNT} would always be > 0 resulting in ‘once around the block’

I stand to be corrected of course.

Actually, that will just stop the announcement (it won’t play even once)…

Set your inbound route(s) to answer the call with an Announcement.
Then set the Announcement to the IVR as destination after playback.
To force the caller to listen, set Allow Skip to NO

You cannot have your cake and eat it too with this. You have two options 1) Set the invalid destination timeouts really high. You won’t get the announcement but the IVR will just continue to wait for valid entries until that very high limit is reached. 2) You set the invalid retry to 1 and the invalid destination to the IVR itself. This will mean that every invalid entry gets the invalid entry playback and will restart the IVR at the greeting again to let them choose other options.

You’re not going to get the invalid announcement just to play and not do anything else. Just not going to happen.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.