No Voicemail greeting message played

Hi

I am using Asterisk 1.2 with freepbx 2.2.1

I have my all extensions configured with voicemail (with the default voicemail greeting).

By default, after no answer/unavailable/busy, the call should go to the extensions voicemail.

In my case, after “no answer”, the call is blank and not playing the default voicemail message. After No Answer, the time when the voicemail message should be played, the call is showing as established and remains blank.

Can anyone please help me on this…

Many Thanks
vinod

Post your CLI output for one of these failed calls.
Post your context that this call is going through
Post your voicemail.conf

After that, somebody might be able to help! :smile:

My CLI Output:

-- Executing Macro("SIP/2000-b790bda8", "exten-vm|2001|2001") in new stack
    -- Executing Macro("SIP/2000-b790bda8", "user-callerid") in new stack
    -- Executing NoOp("SIP/2000-b790bda8", "user-callerid: device 2000") in new stack
    -- Executing GotoIf("SIP/2000-b790bda8", "0?report") in new stack
    -- Executing GotoIf("SIP/2000-b790bda8", "0?start") in new stack
    -- Executing Set("SIP/2000-b790bda8", "REALCALLERIDNUM=2000") in new stack
    -- Executing NoOp("SIP/2000-b790bda8", "REALCALLERIDNUM is 2000") in new stack
    -- Executing Set("SIP/2000-b790bda8", "AMPUSER=2000") in new stack
    -- Executing Set("SIP/2000-b790bda8", "AMPUSERCIDNAME=2000") in new stack
    -- Executing GotoIf("SIP/2000-b790bda8", "0?report") in new stack
    -- Executing Set("SIP/2000-b790bda8", "CALLERID(all)=2000 <2000>") in new stack
    -- Executing Set("SIP/2000-b790bda8", "REALCALLERIDNUM=2000") in new stack
    -- Executing NoOp("SIP/2000-b790bda8", "TTL:  ARG1: 2001") in new stack
    -- Executing GotoIf("SIP/2000-b790bda8", "0?continue") in new stack
    -- Executing Set("SIP/2000-b790bda8", "_TTL=64") in new stack
    -- Executing GotoIf("SIP/2000-b790bda8", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,21)
    -- Executing NoOp("SIP/2000-b790bda8", "Using CallerID "2000" <2000>") in new stack
    -- Executing Set("SIP/2000-b790bda8", "FROMCONTEXT=exten-vm") in new stack
    -- Executing Set("SIP/2000-b790bda8", "VMBOX=2001") in new stack
    -- Executing Set("SIP/2000-b790bda8", "EXTTOCALL=2001") in new stack
    -- Executing Set("SIP/2000-b790bda8", "CFUEXT=") in new stack
    -- Executing Set("SIP/2000-b790bda8", "CFBEXT=") in new stack
    -- Executing Set("SIP/2000-b790bda8", "RT=30") in new stack
    -- Executing Macro("SIP/2000-b790bda8", "record-enable|2001|IN") in new stack
    -- Executing GotoIf("SIP/2000-b790bda8", "0?2:4") in new stack
    -- Goto (macro-record-enable,s,4)
    -- Executing DeadAGI("SIP/2000-b790bda8", "recordingcheck|20090203-204709|1233674229.7690") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
  recordingcheck|20090203-204709|1233674229.7690: Inbound recording not enabled
    -- AGI Script recordingcheck completed, returning 0
    -- Executing NoOp("SIP/2000-b790bda8", "No recording needed") in new stack
    -- Executing Macro("SIP/2000-b790bda8", "dial|30|tr|2001") in new stack
    -- Executing DeadAGI("SIP/2000-b790bda8", "dialparties.agi") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi
  dialparties.agi: Starting New Dialparties.agi
  dialparties.agi: priority is 1
  dialparties.agi: Caller ID name is '2000' number is '2000'
  dialparties.agi: Methodology of ring is  'none'
       >  dialparties.agi: USE_CONFIRMATION:  'FALSE'
       >  dialparties.agi: RINGGROUP_INDEX:   ''
    --  dialparties.agi: Added extension 2001 to extension map
    --  dialparties.agi: Extension 2001 cf is disabled
    --  dialparties.agi: Extension 2001 do not disturb is disabled
       >  dialparties.agi: extnum: 2001
       >  dialparties.agi: exthascw: 1
       >  dialparties.agi: exthascfb: 0
       >  dialparties.agi: extcfb:
       >  dialparties.agi: exthascfu: 0
       >  dialparties.agi: extcfu:
    --  dialparties.agi: dbset CALLTRACE/2001 to 2000
    -- AGI Script dialparties.agi completed, returning 0
    -- Executing Dial("SIP/2000-b790bda8", "SIP/2001|30|tr") in new stack
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing GosubIf("SIP/2000-b790bda8", "0?docfu|1") in new stack
    -- Executing GosubIf("SIP/2000-b790bda8", "0?docfb|1") in new stack
    -- Executing NoOp("SIP/2000-b790bda8", "Voicemail is 2001") in new stack
    -- Executing GotoIf("SIP/2000-b790bda8", "0?s-CHANUNAVAIL|1") in new stack
    -- Executing NoOp("SIP/2000-b790bda8", "Sending to Voicemail box 2001") in new stack
    -- Executing Macro("SIP/2000-b790bda8", "vm|2001|CHANUNAVAIL") in new stack
    -- Executing Macro("SIP/2000-b790bda8", "user-callerid|SKIPTTL") in new stack
    -- Executing NoOp("SIP/2000-b790bda8", "user-callerid: 2000 2000") in new stack
    -- Executing GotoIf("SIP/2000-b790bda8", "0?report") in new stack
    -- Executing GotoIf("SIP/2000-b790bda8", "1?start") in new stack
    -- Goto (macro-user-callerid,s,5)
    -- Executing NoOp("SIP/2000-b790bda8", "REALCALLERIDNUM is 2000") in new stack
    -- Executing Set("SIP/2000-b790bda8", "AMPUSER=2000") in new stack
    -- Executing Set("SIP/2000-b790bda8", "AMPUSERCIDNAME=2000") in new stack
    -- Executing GotoIf("SIP/2000-b790bda8", "0?report") in new stack
    -- Executing Set("SIP/2000-b790bda8", "CALLERID(all)=2000 <2000>") in new stack
    -- Executing Set("SIP/2000-b790bda8", "REALCALLERIDNUM=2000") in new stack
    -- Executing NoOp("SIP/2000-b790bda8", "TTL: 64 ARG1: SKIPTTL") in new stack
    -- Executing GotoIf("SIP/2000-b790bda8", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,21)
    -- Executing NoOp("SIP/2000-b790bda8", "Using CallerID "2000" <2000>") in new stack
    -- Executing Set("SIP/2000-b790bda8", "VMGAIN=") in new stack
    -- Executing GotoIf("SIP/2000-b790bda8", "1?s-CHANUNAVAIL|1") in new stack
    -- Goto (macro-vm,s-CHANUNAVAIL,1)
    -- Executing Macro("SIP/2000-b790bda8", "get-vmcontext|2001") in new stack
    -- Executing Set("SIP/2000-b790bda8", "VMCONTEXT=default") in new stack
    -- Executing GotoIf("SIP/2000-b790bda8", "0?200:300") in new stack
    -- Goto (macro-get-vmcontext,s,300)
    -- Executing NoOp("SIP/2000-b790bda8", "") in new stack
    -- Executing VoiceMail("SIP/2000-b790bda8", "2001@default|u") in new stack
  == Spawn extension (macro-vm, s-CHANUNAVAIL, 2) exited non-zero on 'SIP/2000-b790bda8' in macro 'vm'
  == Spawn extension (macro-vm, s-CHANUNAVAIL, 2) exited non-zero on 'SIP/2000-b790bda8' in macro 'exten-vm'
  == Spawn extension (macro-vm, s-CHANUNAVAIL, 2) exited non-zero on 'SIP/2000-b790bda8'

My Context:

[macro-exten-vm]
exten => s,1,Macro(user-callerid)

exten => s,n,Set(FROMCONTEXT=exten-vm)
exten => s,n,Set(VMBOX=${ARG1})
exten => s,n,Set(EXTTOCALL=${ARG2})
exten => s,n,Set(CFUEXT=${DB(CFU/${EXTTOCALL})})
exten => s,n,Set(CFBEXT=${DB(CFB/${EXTTOCALL})})
exten => s,n,Set(RT=${IF($[$["${VMBOX}"!="novm"] | $["foo${CFUEXT}"!="foo"]]?${RINGTIMER}:"")})
exten => s,n,Macro(record-enable,${EXTTOCALL},IN)

exten => s,n,Macro(dial,${RT},${DIAL_OPTIONS},${EXTTOCALL})
exten => s,n,GosubIf($[$["${DIALSTATUS}"="NOANSWER"] & $["foo${CFUEXT}"!="foo"]]?docfu,1) ; check for CFU in use on no answer
exten => s,n,GosubIf($[$["${DIALSTATUS}"="BUSY"] & $["foo${CFBEXT}"!="foo"]]?docfb,1) ; check for CFB in use on busy
exten => s,n,NoOp(Voicemail is '${VMBOX}')
exten => s,n,GotoIf($["${VMBOX}" = "novm"]?s-${DIALSTATUS},1) ; no voicemail in use for this extension
exten => s,n,NoOp(Sending to Voicemail box ${EXTTOCALL})
exten => s,n,Macro(vm,${VMBOX},${DIALSTATUS})

; Try the Call Forward on No Answer / Unavailable number
exten => docfu,1,Set(RTCFU=${IF($["${VMBOX}"!="novm"]?${RINGTIMER}:"")})
exten => docfu,n,Dial(Local/${CFUEXT}@from-internal/n,${RTCFU},${DIAL_OPTIONS})
exten => docfu,n,Return

; Try the Call Forward on Busy number
exten => docfb,1,Set(RTCFB=${IF($["${VMBOX}"!="novm"]?${RINGTIMER}:"")})
exten => docfb,n,Dial(Local/${CFBEXT}@from-internal/n,${RTCFB},${DIAL_OPTIONS})
exten => docfb,n,Return

; Extensions with no Voicemail box reporting BUSY come here
exten => s-BUSY,1,NoOp(Extension is reporting BUSY and not passing to Voicemail)
exten => s-BUSY,n,Playtones(busy)
exten => s-BUSY,n,Busy(20)

; Anything but BUSY comes here
exten => _s-.,1,Playtones(congestion)
exten => _s-.,n,Congestion(10)

And

[macro-vm]
exten => s,1,Macro(user-callerid,SKIPTTL)
exten => s,n,Set(VMGAIN=${IF($["foo${VM_GAIN}"!="foo"]?"g(${VM_GAIN})":"")})
;
; If BLKVM_OVERRIDE is set, then someone told us to block calls from going to
; voicemail. This variable is reset by the answering channel so subsequent
; transfers will properly function.
;
exten => s,n,GotoIf($["foo${DB(${BLKVM_OVERRIDE})}" != "fooTRUE"]?s-${ARG2},1)
;
; we didn't branch so block this from voicemail
;
exten => s,n,Noop(CAME FROM: ${NODEST} - Blocking VM cause of key: ${DB(BLKVM_OVERRIDE)})

exten => s-BUSY,1,NoOp(BUSY voicemail)
exten => s-BUSY,n,Macro(get-vmcontext,${ARG1})
exten => s-BUSY,n,Voicemail(${ARG1}@${VMCONTEXT}|${VM_OPTS}b${VMGAIN})   ; Voicemail Busy message
exten => s-BUSY,n,Goto(exit-${VMSTATUS},1)

exten => s-DIRECTDIAL,1,NoOp(DIRECTDIAL voicemail)
exten => s-DIRECTDIAL,n,Macro(get-vmcontext,${ARG1})
exten => s-DIRECTDIAL,n,Voicemail(${ARG1}@${VMCONTEXT}|${VM_OPTS}${VM_DDTYPE}${VMGAIN})
exten => s-DIRECTDIAL,n,Goto(exit-${VMSTATUS},1)

exten => _s-.,1,Macro(get-vmcontext,${ARG1})
exten => _s-.,n,Voicemail(${ARG1}@${VMCONTEXT}|${VM_OPTS}u${VMGAIN})     ; Voicemail Unavailable message
exten => _s-.,n,Goto(exit-${VMSTATUS},1)

exten => o,1,Background(one-moment-please)      ; 0 during vm message will hangup
exten => o,n,GotoIf($["x${OPERATOR_XTN}"="x"]?nooper:from-internal,${OPERATOR_XTN},1)
exten => o,n(nooper),GotoIf($["x${FROM_DID}"="x"]?nodid)
exten => o,n,Dial(Local/${FROM_DID}@from-pstn)
exten => o,n,Macro(hangup)
exten => o,n(nodid),Dial(Local/s@from-pstn)
exten => o,n,Macro(hangup)

exten => a,1,Macro(get-vmcontext,${ARG1})
exten => a,n,VoiceMailMain(${ARG1}@${VMCONTEXT})
exten => a,n,Hangup

exten => exit-FAILED,1,Playback(im-sorry&an-error-has-occured)
exten => exit-FAILED,n,Hangup()

exten => exit-SUCCESS,1,Playback(goodbye)
exten => exit-SUCCESS,n,Hangup()

exten => exit-USEREXIT,1,Playback(goodbye)
exten => exit-USEREXIT,n,Hangup()

exten => t,1,Hangup()

My voicemail.conf:

[general]
#include vm_general.inc
#include vm_email.inc
[default]
2000 => 0000,viva,,,attach=yes|saycid=yes|envelope=yes|delete=no
2001 => 0000,viva,,,attach=yes|saycid=yes|envelope=yes|delete=no

Many Thanks
Vinod

Looks like freePBX.

Delete the extensions - reload, create teh extensions again.

OR

Create a new extension - test with a softphone.

I’ve created new extensions and tried calling with a x-lite, but still the same…

On my other (voicemail working)Freepbx systems, the CLI shows…

Playing(…The Person at extn
Playing(…
Playing(…

WaitExtn

But the faulty server’s CLI is not showing like the one above

Regards
Vinod

What codecs have you got configured on your phones?
Have you recorded your own greetings?

The reason I ask is because if you are using g729 on the handsets, and the recordings are in another format, then you will not be able to hear the recording without a g729 license.

This may NOT be the reason, but you better just check to make sure.

BLANK

Thanks for your reply Chris.

I’m using the default system’s Voicemail Unavailable message without any custom voicemail greeting recorded.

I use G711 ulaw all around my system and on my sip clients.

Regards
Vinod

When i was looking at the directories, i was stunned to see no voicemail directory inside /var/spool/asterisk/.

I think this must be the cause for my voicemail issue.

Before I started to face this issue,I have restored my configuration backup on a newly installed Freepbx 2.2.1. The backup taken contains only the “System Configuration” and not the “Voicemail”, “System Recordings”, “CDR” and “Operator Panel”.

Will this caused the problem?

If so, how do i make asterisk to create the Voicemail directory and other sub-directories inside it.

Thanks in advance.

Kind Regards
Vinod

There are two ways to go about this:

  1. Create the directories then reload the extensions in freepbx. Just submit them with no changes so it brings up the orange/red bar to reload. This hopefully will write what is necessary (or perhaps disable voicemail, reload, enable voicemail reload)
    OR
  2. recompile asterisk asterisk-addons zaptel (without doing make samples or make configs)

I’ll go through option 1.

mkdir /var/spool/asterisk/voicemail

then change into it so you don’t have to type as much

cd /var/spool/asterisk/voicemail
mkdir default
mkdir device

Then make asterisk the owner:group

chown -R asterisk:asterisk /var/spool/asterisk/

Now at this stage fiddle with freePBX. You should see it start making directories.
If not - tell us what it does and someone (or I) will tell you what to do.

Good Luck!

Hi Chris,

I’ve just came up with the solution, before your post.

I manually created the voicemail directory and changed the ownership to asterisk using

chown -R asterisk:asterisk /var/spool/asterisk/voicemail

Looks everything works fine.

The Sub-directories are created automatically when calling by asterisk then.

This seems similar to your Way 1.

Anyway, Chris, I would like to thank you for your immense help all the way long.

Thanks & Regards
Vinod

Glad you worked it out!

Just smile when you record your greetings - it comes through in the recording! :stuck_out_tongue: