Consolidate unavailable and busy voicemail messages

Good/bad or indifferent, we have decided to always play the same voicemail message regardless of whether the extension is unavailable (not answered) or busy.

The brute force way is to just record the same message for unavailable and busy messages. The problem with that is people remembering that they are not handled differently.

I looked at the beginning of extensions_additional.conf at the macro-vm context …
include => macro-vm-custom
exten => s,1,Macro(user-callerid,SKIPTTL)
exten => s,n,Set(VMGAIN=${IF($[“foo${VM_GAIN}”!=“foo”]?“g(${VM_GAIN})”:"")})
exten => s,n,GotoIf($[“foo${DB(${BLKVM_OVERRIDE})}” != “fooTRUE”]?vmx,1)
exten => s,n,Noop(CAME FROM: ${NODEST} - Blocking VM cause of key: ${DB(BLKVM_OVERRIDE)})
exten => s,n,Hangup
exten => vmx,1,Set(MEXTEN=${ARG1})
exten => vmx,n,Set(MMODE=${ARG2})
exten => vmx,n,Set(RETVM=${ARG3})
exten => vmx,n,Set(MODE=${IF($["${MMODE}"=“BUSY”]?busy:unavail)})
exten => vmx,n,GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/vmxopts/timeout)}" = “0”]?chknomsg)
exten => vmx,n,Set(VM_OPTS=${DB_RESULT})
exten => vmx,n(chknomsg),GotoIf($["${MMODE}"=“NOMESSAGE”]?s-${MMODE},1)
exten => vmx,n,GotoIf($["${MMODE}" != “DIRECTDIAL”]?notdirect)
exten => vmx,n,Set(MODE=${IF($["${REGEX("[b]" ${VM_DDTYPE})}" = “1”]?busy:${MODE})})
… and said “Ah!” I just need to add a context for “macro-vm-custom” to extensions_custom.conf" and set VM_DDTYPE to “u” always.

But I’m having a heck of a time getting it to include the macro-vm-custom context from extensions-custom.conf. Here’s what I have:
; Force any busy voicemails to use the unavailable message.
exten => s,1,Noop(1 CAME FROM: ${VM_DDTYPE})
exten => s,n,Set(VM_DDTYPE=“u”)
exten => s,n,Noop(2 CAME FROM: ${VM_DDTYPE})
; end of macro-vm-custom

I’ve successfully used this file (extensions_custom.conf) to add [app-vmmain-custom] successfully, but am having trouble on this one. Does it have anything to do with the name - “macro-vm-custom”?

Also, is there an easy way to modify option “0” of the voicemail maintenance IVR so that it does not prompt for both a busy and an unavailable message? It looks like all of that happens in a C program, not the dialplan or macros?

Thank you in advance - Richard

After a bit of digging it looks like I can use the “system()” command. Something like:
exten => s,n,System(/bin/cp -f ${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${MEXTEN}/unavail.wav ${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${MEXTEN}/busy.wav)


nothing in the dialplan does that.

We happen to have just enabled VMX locator, so that’s OK.

Is it possible to configure the linking to take place automatically somewhere in the DialPlan? I know I can set a cron to do it, but was looking for something a bit more integrated.

Thanks for the input/help.

you may not be achieving what you want, as this is only used if you have VMX Locator, otherwise it is handled by the voicemail application which uses both busy and unavailable messages in the application.

Your best bet is to probably try linking the two sound files at the Linux level so which ever is used/recorded it’s the same file. I’m not 100% sure re-recording a greeting won’t break this, you would have to test it out and see.