IVR, Custom Directory

I have an IVR that uses a custom directory that I created with the directories module.

It generally works in that you can only dial extensions within this directory directly.

However, the issue arises when someone tries to dial an extension not in the directory. When this happens the IVR picks up digits that are within the extension to be dialed.

I.E. I have options 1,2,3 for the IVR and have direct dial to my custom directory enabled.

If 8213 is in the directory you can dial it fine.
If 8211 is not in the directory and someone tries to dial this, the IVR intercepts the 2 and places them into that IVR entry.

How can I avoid this? It seems that there needs to be some detection of if the other end dialed a single digit or an actual 4 digit extension? Not sure what to do to fix this.

Any ideas?

Rick

I dialed the IVR.
We have the direct dial limited to a list of extensions.
We have 9 set up as our dial by name/directory.

the extension 8999 is not in the directory I use for allowing directdial.

Instead of responding with invalid entry, the system picks up the second digit and sends me to the dial by name.
I have another PBXIAF server that does not exhibit this behavior. Very frustrating as this is a show stopper for our current project.
Verbosity was 5 and is now 7
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [[email protected]:1] Goto(“SIP/8999-0000000c”, “from-pstn,7777,1”) in new stack
– Goto (from-pstn,7777,1)
– Executing [[email protected]:1] NoOp(“SIP/8999-0000000c”, “Catch-All DID Match - Found 7777 - You probably want a DID for this.”) in new stack
– Executing [[email protected]:2] Goto(“SIP/8999-0000000c”, “ext-did,s,1”) in new stack
– Goto (ext-did,s,1)
– Executing [[email protected]:1] ExecIf(“SIP/8999-0000000c”, “1?Set(__FROM_DID=s)”) in new stack
– Executing [[email protected]:2] Gosub(“SIP/8999-0000000c”, “app-blacklist-check,s,1()”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/8999-0000000c”, “0?blacklisted”) in new stack
– Executing [[email protected]:2] Set(“SIP/8999-0000000c”, “CALLED_BLACKLIST=1”) in new stack
– Executing [[email protected]:3] Return(“SIP/8999-0000000c”, “”) in new stack
– Executing [[email protected]:3] Set(“SIP/8999-0000000c”, “CDR(did)=s”) in new stack
– Executing [[email protected]:4] ExecIf(“SIP/8999-0000000c”, “0 ?Set(CALLERID(name)=8999)”) in new stack
– Executing [[email protected]:5] Set(“SIP/8999-0000000c”, “__CALLINGPRES_SV=allowed_not_screened”) in new stack
– Executing [[email protected]:6] Set(“SIP/8999-0000000c”, “CALLERPRES()=allowed_not_screened”) in new stack
– Executing [[email protected]:7] Goto(“SIP/8999-0000000c”, “ivr-3,s,1”) in new stack
– Goto (ivr-3,s,1)
– Executing [[email protected]:1] Set(“SIP/8999-0000000c”, “TIMEOUT_LOOPCOUNT=0”) in new stack
– Executing [[email protected]:2] Set(“SIP/8999-0000000c”, “INVALID_LOOPCOUNT=0”) in new stack
– Executing [[email protected]:3] Set(“SIP/8999-0000000c”, “_IVR_CONTEXT_ivr-3=”) in new stack
– Executing [[email protected]:4] Set(“SIP/8999-0000000c”, “_IVR_CONTEXT=ivr-3”) in new stack
– Executing [[email protected]:5] Set(“SIP/8999-0000000c”, “__IVR_RETVM=”) in new stack
– Executing [[email protected]:6] GotoIf(“SIP/8999-0000000c”, “0?skip”) in new stack
– Executing [[email protected]:7] Answer(“SIP/8999-0000000c”, “”) in new stack
– Executing [[email protected]:8] Wait(“SIP/8999-0000000c”, “1”) in new stack
– Executing [[email protected]:9] Set(“SIP/8999-0000000c”, “IVR_MSG=custom/GalacorpIVR”) in new stack
– Executing [[email protected]:10] Set(“SIP/8999-0000000c”, “TIMEOUT(digit)=3”) in new stack
– Digit timeout set to 3.000
– Executing [[email protected]:11] ExecIf(“SIP/8999-0000000c”, “1?Background(custom/GalacorpIVR)”) in new stack
– <SIP/8999-0000000c> Playing ‘custom/GalacorpIVR.slin’ (language ‘en’)
– Invalid extension ‘8’ in context ‘ivr-3’ on SIP/8999-0000000c
== CDR updated on SIP/8999-0000000c
– Executing [[email protected]:1] Set(“SIP/8999-0000000c”, “INVALID_LOOPCOUNT=1”) in new stack
– Executing [[email protected]:2] GotoIf(“SIP/8999-0000000c”, “0?final”) in new stack
– Executing [[email protected]:3] Set(“SIP/8999-0000000c”, “IVR_MSG=no-valid-responce-pls-try-again”) in new stack
– Executing [[email protected]:4] Goto(“SIP/8999-0000000c”, “s,start”) in new stack
– Goto (ivr-3,s,10)
– Executing [[email protected]:10] Set(“SIP/8999-0000000c”, “TIMEOUT(digit)=3”) in new stack
– Digit timeout set to 3.000
– Executing [[email protected]:11] ExecIf(“SIP/8999-0000000c”, “1?Background(no-valid-responce-pls-try-again)”) in new stack
– <SIP/8999-0000000c> Playing ‘no-valid-responce-pls-try-again.slin’ (language ‘en’)
– Executing [[email protected]:1] Goto(“SIP/8999-0000000c”, “directory,2,1”) in new stack
– Goto (directory,2,1)
– Executing [[email protected]:1] Answer(“SIP/8999-0000000c”, “”) in new stack
– Executing [[email protected]:2] Wait(“SIP/8999-0000000c”, “1”) in new stack
– Executing [[email protected]:3] AGI(“SIP/8999-0000000c”, “directory.agi,dir=2,keypress=,retivr=false”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/directory.agi
– <SIP/8999-0000000c> Playing ‘cdir-welcome.slin’ (language ‘en’)
– <SIP/8999-0000000c> Playing ‘cdir-please-enter-first-three.slin’ (language ‘en’)
– <SIP/8999-0000000c>AGI Script directory.agi completed, returning 4
== Spawn extension (directory, 2, 3) exited non-zero on ‘SIP/8999-0000000c’
– Executing [[email protected]:1] Macro(“SIP/8999-0000000c”, “hangupcall,”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/8999-0000000c”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [[email protected]:3] ExecIf(“SIP/8999-0000000c”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [[email protected]:4] Hangup(“SIP/8999-0000000c”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘SIP/8999-0000000c’ in macro ‘hangupcall’
== Spawn extension (directory, h, 1) exited non-zero on ‘SIP/8999-0000000c’

Here is the IVR:
[ivr-3] ; Galacorp_IVR1
include => ivr-3-custom
exten => s,1,Set(TIMEOUT_LOOPCOUNT=0)
exten => s,n,Set(INVALID_LOOPCOUNT=0)
exten => s,n,Set(IVR_CONTEXT${CONTEXT}=${IVR_CONTEXT})
exten => s,n,Set(_IVR_CONTEXT=${CONTEXT})
exten => s,n,Set(__IVR_RETVM=)
exten => s,n,GotoIf($["${CDR(disposition)}" = “ANSWERED”]?skip)
exten => s,n,Answer
exten => s,n,Wait(1)
exten => s,n(skip),Set(IVR_MSG=custom/GalacorpIVR)
exten => s,n(start),Set(TIMEOUT(digit)=3)
exten => s,n,ExecIf($["${IVR_MSG}" != “”]?Background(${IVR_MSG}))
exten => s,n,WaitExten(10,)

exten => *,1,Goto(ivr-5,s,1)

exten => 1,1,Goto(from-did-direct,8218,1)

exten => 2,1,Goto(from-did-direct,8210,1)

exten => 3,1,Goto(from-did-direct,8214,1)

exten => 4,1,Goto(from-did-direct,8209,1)

exten => 9,1,Goto(directory,2,1)

exten => i,1,Set(INVALID_LOOPCOUNT=$[${INVALID_LOOPCOUNT}+1])
exten => i,n,GotoIf($[${INVALID_LOOPCOUNT} > 3]?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(app-blackhole,hangup,1)

exten => t,1,Set(TIMEOUT_LOOPCOUNT=$[${TIMEOUT_LOOPCOUNT}+1])
exten => t,n,GotoIf($[${TIMEOUT_LOOPCOUNT} > 3]?final)
exten => t,n,Set(IVR_MSG=custom/GalacorpIVR)
exten => t,n,Goto(s,start)
exten => t,n(final),Playback(no-valid-responce-transfering)
exten => t,n,Goto(ext-local,vmu8218,1)
exten => return,1,Set(IVR_CONTEXT=${CONTEXT})
exten => return,n,Set(IVR_CONTEXT${CONTEXT}=${IVR_CONTEXT
${CONTEXT}})
exten => return,n,Set(IVR_MSG=custom/GalacorpIVR)
exten => return,n,Goto(s,start)
exten => h,1,Hangup
exten => hang,1,Playback(vm-goodbye)
exten => hang,n,Hangup
;–== end of [ivr-3] ==–;