Set up voicemail for custom config

Hi, for the past two weeks I’ve been trying to set up a voicemail for this config dialplan to no avail. I don’t have issue to set up mailbox in voicemail.conf. Can anyone assist me how to make working voicemail for this particular dialplan?

exten => “phone number”,n,set(_callid=${SHELL(echo -n “${SIPCALLID}” | sha1sum | head -c 40)})
exten => “phone number”,n,Queue(9128,t)
exten => “phone number”,n,Goto(q-9128-${QUEUESTATUS},1)
exten => q-9128-JOINEMPTY,1,Wait(1)
exten => q-9128-JOINEMPTY,n,Playback(moh/queue-9128-closing-hours,noanswer)
exten => q-9128-JOINEMPTY,n,Hangup()
exten => q-9128-JOINUNAVAIL,1,Goto(q-9128-JOINEMPTY,1)
exten => q-9128-LEAVEEMPTY,1,Goto(q-9128-JOINEMPTY,1)
exten => q-9128-LEAVEUNAVAIL,1,Goto(q-9128-JOINEMPTY,1)
exten => q-9128-TIMEOUT,1,Goto(q-9128-JOINEMPTY,1)
exten => q-9128-FULL,1,Hangup()

Just fyi, I’m not the one who set up this plan. My task is only to set up voicemail.

If you already setup the voicemail boxes in the voicemail.conf, start using the voicemail related commands

Leave a Voicemail message.

Check Voicemail messages.

Play a single voice mail msg from a mailbox by msg id.

This will help you

1 Like

Thanks ambiorixg12,

I’ve been following that guide since I started working on this voicemail thing but somehow I couldn’t find a way to integrate the recommended dialplan (extensions.conf) in the guide to our dialpan.

Could you explain more on this voicemail related commands? Where should I put it? dialplan or voicemail.conf. I just need the caller to enter voicemail after 10 or 20 seconds

If you don’t know where to put the commands I just mentioned before, it means you don’t have the basic Asterisk knowledge required to make any change, so I suggest you give a deep reading to this book

Indeed I am. I just assigned for this task without having prior experience on Asterisk. Anyhow, I appreciate the guidance. Thank you

How can you follow the guidance if you don’t know to interact with Asterisk. I don’t want to sound rude but I just dont understand how companies assign task to people with no experience,

take a look to this link

This is quite trivial task. That’s why they assigned it to me. I consider it as an opportunity to learn more about asterisk. Thanks again for your kindness ambiorixg12.

you re welcome @wayned

some people learn and think faster under preasures, unfunaltely that’s not my case lol

Swordfish movie 2001

I couldn’t say thanks enough to you @ambiorixg12. I learn more about asterisk these past 3 days compare to previous weeks. However I still have question regarding voicemail, you see now the voicemail is working fine when no one in the queue by using this config

exten => “phone number”,1,Log(NOTICE,[START-INBOUND-EXTERNAL] {“from”:"${CALLERID(num)}",“to”:"${EXTEN}",“uniqueID”:"${UNIQUEID}",“callID”:"${SHELL(echo -n “${SIPCALLID}” | sha1sum | head -c 40)}",“timeStamp”:"${STRFTIME(${EPOCH},UTC,%Y-%m-%dT%H:%M:%SZ)}"})
exten => “phone number”,n,Answer()
exten => “phone number”,n,Ringing()
exten => “phone number”,n,Wait(1)
exten => “phone number”,n,set(_callid=${SHELL(echo -n “${SIPCALLID}” | sha1sum | head -c 40)})
exten => “phone number”,n,Queue(9138,t)
exten => “phone number”,n,Goto(q-9138-${QUEUESTATUS},1)
exten => q-9138-JOINEMPTY,1,Wait(1)
exten => q-9138-JOINEMPTY,n,VoiceMail()
exten => q-9138-JOINTEMPTY,n,Hangup()
exten => q-9138-JOINUNAVAIL,1,Goto(q-9138-JOINEMPTY,1)
exten => q-9138-LEAVEEMPTY,1,Goto(q-9138-JOINEMPTY,1)
exten => q-9138-LEAVEUNAVAIL,1,Goto(q-9138-JOINEMPTY,1)
exten => q-9138-TIMEOUT,1,Goto(q-9138-JOINEMPTY,1)
exten => q-9138-FULL,1,Hangup()

but somehow it keeps ringing indefinitely when there is someone in the queue. I couldn’t figure how to set something like timeout so the caller can enter the QUEUESTATUS after certain timeout (20s). Tried countless of configuration such as queue(ext,n) and modified the line before QUEUESTATUS to no avail.

Any help is greatly appreciated. Thank you

I’m glad you are learning, I have around 10 years on this comuity and learning new stuff everyday, and I still got a lot of stuff to learn.

Use the timeout option on your queue command


This is also explained on the sample configuration file :

; Note that a timeout to fail out of a queue may be passed as part of

; an application call from extensions.conf:
; Queue(queuename,[options],[optionalurl],[announceoverride],[timeout])
; example: Queue(dave,t,45)

1 Like

Thank you so much @ambiorixg12!!!

That certainly works. :grinning: