Prefix in voicemail emails

When a queue has a prefix, and the final destination is a voicemail.
Users will not see the prefix on the caller ID in the email.
Vs. when using a CID Modifier with a prefix it will include in the voicemail email the prefix.

Is that how it’s sposed to behave?
Any way I can have one number two queues in the voicemails email should include the prefix?


A company with multiple departments, one main number, and one dispatcher to pick up and direct calls. Each queue has a prefix with the department name, so when the agent gets the call, they know to which department it should get directed. When anyone reaches the voicemail, it is delivered to the dispatcher’s email. Still, the prefix is not included in the caller ID so the dispatcher is not sure which department the voicemail belongs to.


We need to create a file under “/etc/asterisk/vitalpbx” path. Name the file “extensions__{ANYNUMBER}-custom-cid-prefix.conf” where {ANYNUMBER} is a consecutive number that represents the order in the asterisk that will read the files, add the code below to the file.

exten => _[0-9a-zA-Z].,1,NoOp(Custom dialplan do set cid prefix)
same => n,Set(CALLERID(name)=${EXTEN}: ${CALLERID(name)})
same => n,Return()

Install the Custom Contexts add-on if you don’t have it yet, and create a new entery

  • Description: is a description
  • Context: custom-cid-prefix
  • Extension: write whatever the prefix should be
  • Destination: where you want the system to go next, assuming a voicemail.

Reload asterisk

1 Like

Are you sure it will go to the voicemail?
Return usually does not work there.
Or will this make its way before every other Dialplan?

It works on my PBX!

Suggestions for changes are welcome.

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