FreePBX-17 VoiceMail-17.0.5.33 not recording

Hi Guys,
Is someone has issue with VM recording ? Im successfully calling and recording VM message but after hangup i can’t find recorded message ?

Asterisk Logs

[2025-08-21 14:06:14] VERBOSE[1617200][C-00000009] pbx.c: Executing [s-BUSY@macro-vm:3] VoiceMail("PJSIP/SipGate-UK-0000000c", "1001@default,b") in new stack
[2025-08-21 14:06:14] VERBOSE[1617200][C-00000009] file.c: <PJSIP/SipGate-UK-0000000c> Playing '/var/spool/asterisk/voicemail/default/1001/busy.slin' (language 'en_GB')
[2025-08-21 14:06:14] VERBOSE[1617200][C-00000009] res_rtp_asterisk.c: 0x7f40603ca870 -- Strict RTP switching to RTP target address 217.XX.YY.151:15018 as source
[2025-08-21 14:06:19] VERBOSE[1617200][C-00000009] res_rtp_asterisk.c: 0x7f40603ca870 -- Strict RTP learning complete - Locking on source address 217.XX.YY.151:15018
[2025-08-21 14:06:21] VERBOSE[1617200][C-00000009] file.c: <PJSIP/SipGate-UK-0000000c> Playing 'vm-intro.slin16' (language 'en_GB')
[2025-08-21 14:06:26] VERBOSE[1617200][C-00000009] file.c: <PJSIP/SipGate-UK-0000000c> Playing 'beep.slin16' (language 'en_GB')
[2025-08-21 14:06:27] VERBOSE[1617200][C-00000009] app_voicemail.c: Recording the message
[2025-08-21 14:06:32] VERBOSE[1617200][C-00000009] app.c: User ended message by pressing #
[2025-08-21 14:06:32] VERBOSE[1617200][C-00000009] file.c: <PJSIP/SipGate-UK-0000000c> Playing 'auth-thankyou.slin16' (language 'en_GB')
[2025-08-21 14:06:34] VERBOSE[1617200][C-00000009] pbx.c: Executing [s-BUSY@macro-vm:4] Goto("PJSIP/SipGate-UK-0000000c", "exit-SUCCESS,1") in new stack
[2025-08-21 14:06:34] VERBOSE[1617200][C-00000009] pbx_builtins.c: Goto (macro-vm,exit-SUCCESS,1)
[2025-08-21 14:06:34] VERBOSE[1617200][C-00000009] pbx.c: Executing [exit-SUCCESS@macro-vm:1] GotoIf("PJSIP/SipGate-UK-0000000c", "0?exit-RETURN,1") in new stack
[2025-08-21 14:06:34] VERBOSE[1617200][C-00000009] pbx.c: Executing [exit-SUCCESS@macro-vm:2] Playback("PJSIP/SipGate-UK-0000000c", "goodbye") in new stack
[2025-08-21 14:06:34] VERBOSE[1617200][C-00000009] file.c: <PJSIP/SipGate-UK-0000000c> Playing 'goodbye.slin16' (language 'en_GB')
[2025-08-21 14:06:34] VERBOSE[1617200][C-00000009] pbx.c: Executing [exit-SUCCESS@macro-vm:3] Hangup("PJSIP/SipGate-UK-0000000c", "") in new stack
[2025-08-21 14:06:34] VERBOSE[1617200][C-00000009] pbx.c: Spawn extension (macro-vm, exit-SUCCESS, 3) exited non-zero on 'PJSIP/SipGate-UK-0000000c'
[2025-08-21 14:06:34] VERBOSE[1617200][C-00000009] app_stack.c: PJSIP/SipGate-UK-0000000c Internal Gosub(crm-hangup,s,1) start
[2025-08-21 14:06:34] VERBOSE[1617200][C-00000009] pbx.c: Executing [s@crm-hangup:1] NoOp("PJSIP/SipGate-UK-0000000c", "Sending Hangup to CRM") in new stack
[2025-08-21 14:06:34] VERBOSE[1617200][C-00000009] pbx.c: Executing [s@crm-hangup:2] NoOp("PJSIP/SipGate-UK-0000000c", "HANGUP CAUSE: 16") in new stack
[2025-08-21 14:06:34] VERBOSE[1617200][C-00000009] pbx.c: Executing [s@crm-hangup:3] ExecIf("PJSIP/SipGate-UK-0000000c", "1?Set(__CRM_VOICEMAIL=SUCCESS)") in new stack
[2025-08-21 14:06:34] VERBOSE[1617200][C-00000009] pbx.c: Executing [s@crm-hangup:4] NoOp("PJSIP/SipGate-UK-0000000c", "MASTER CHANNEL: 1755781574.217 = 1755781574.217") in new stack
[2025-08-21 14:06:34] VERBOSE[1617200][C-00000009] pbx.c: Executing [s@crm-hangup:5] GotoIf("PJSIP/SipGate-UK-0000000c", "0?return") in new stack
[2025-08-21 14:06:34] VERBOSE[1617200][C-00000009] pbx.c: Executing [s@crm-hangup:6] Set("PJSIP/SipGate-UK-0000000c", "__CRM_HANGUP=1") in new stack
[2025-08-21 14:06:34] VERBOSE[1617200][C-00000009] pbx.c: Executing [s@crm-hangup:7] AGI("PJSIP/SipGate-UK-0000000c", "agi://127.0.0.1/sangomacrm.agi") in new stack
[2025-08-21 14:06:35] VERBOSE[1617200][C-00000009] res_agi.c: <PJSIP/SipGate-UK-0000000c>AGI Script agi://127.0.0.1/sangomacrm.agi completed, returning 0
[2025-08-21 14:06:35] VERBOSE[1617200][C-00000009] pbx.c: Executing [s@crm-hangup:8] Return("PJSIP/SipGate-UK-0000000c", "") in new stack
[2025-08-21 14:06:35] VERBOSE[1617200][C-00000009] app_stack.c: Spawn extension (macro-vm, exit-SUCCESS, 3) exited non-zero on 'PJSIP/SipGate-UK-0000000c'
[2025-08-21 14:06:35] VERBOSE[1617200][C-00000009] app_stack.c: PJSIP/SipGate-UK-0000000c Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=
[2025-08-21 14:06:35] VERBOSE[1617244][C-00000009] app_mixmonitor.c: MixMonitor close filestream (mixed)
[2025-08-21 14:06:35] VERBOSE[1617244][C-00000009] app_mixmonitor.c: End MixMonitor Recording PJSIP/SipGate-UK-0000000c
full:[2025-08-21 14:06:14] VERBOSE[1617200][C-00000009] pbx.c: Executing [recordcheck@sub-record-check:25] Set("PJSIP/SipGate-UK-0000000c", "CDR(recordingfile)=external-1001-0790282YYXX-20250821-140614-1755781574.217.wav") in new stack

VM Inbox

:/var/spool/asterisk/voicemail/default/1001/INBOX# ls -la
total 8
drwxrwxr-x 2 asterisk asterisk 4096 Aug 21 14:06 .
drwxrwxr-x 6 asterisk asterisk 4096 Aug 21 13:45 ..

System FreePBX-17 up to date

| voicemail           | 17.0.5.33  | Enabled | GPLv3+      | Sangoma   |
| core                | 17.0.18.34 | Enabled | GPLv3+      | Sangoma   |
| framework           | 17.0.19.30 | Enabled | GPLv2+      | Sangoma   |

Does the voicemail have the delete option selected? You can do core set debug 10 app_voicemail.so to get debug details on what happens when a voicemail is left, including it sending a notice, saving the file and deleting the file if the option is set.

Hi @BlazeStudios Tom,

here is the Debug log

[2025-08-21 15:22:00] DEBUG[1630502][C-0000000b]: app_voicemail.c:13251 vm_exec:  PJSIP/SipGate-UK-0000000e
       > 0x7f406014e880 -- Strict RTP learning after remote address set to: 217.XX.YY.155:20098
[2025-08-21 15:22:00] DEBUG[1630502][C-0000000b]: app_voicemail.c:7082 leave_voicemail:  PJSIP/SipGate-UK-0000000e: 1001@default
[2025-08-21 15:22:00] DEBUG[1630502][C-0000000b]: app_voicemail.c:7114 leave_voicemail: Before find_user
[2025-08-21 15:22:00] DEBUG[1630502][C-0000000b]: app_voicemail.c:7145 leave_voicemail:  prefile: /var/spool/asterisk/voicemail/default/1001/busy
[2025-08-21 15:22:00] DEBUG[1630502][C-0000000b]: app_voicemail.c:7151 leave_voicemail:  tempfile: /var/spool/asterisk/voicemail/default/1001/temp
    -- <PJSIP/SipGate-UK-0000000e> Playing '/var/spool/asterisk/voicemail/default/1001/busy.slin' (language 'en_GB')
       > 0x7f406014e880 -- Strict RTP switching to RTP target address 217.XX.YY.155:20098 as source
       > 0x7f406014e880 -- Strict RTP learning complete - Locking on source address 217.XX.YY.155:20098
    -- <PJSIP/SipGate-UK-0000000e> Playing 'vm-intro.ulaw' (language 'en_GB')
[2025-08-21 15:22:13] DEBUG[1630502][C-0000000b]: app_voicemail.c:7375 leave_voicemail:  Tempfile: /var/spool/asterisk/voicemail/default/1001/tmp/XXXXXX
    -- <PJSIP/SipGate-UK-0000000e> Playing 'beep.ulaw' (language 'en_GB')
[2025-08-21 15:22:14] DEBUG[1630502][C-0000000b]: app_voicemail.c:7456 leave_voicemail:  Saving txt file mbox: 1001 msg_id: 1755786134-00000004
[2025-08-21 15:22:14] DEBUG[1630502][C-0000000b]: app_voicemail.c:16751 play_record_review:  PJSIP/SipGate-UK-0000000e: rf: /var/spool/asterisk/voicemail/default/1001/tmp/J4jf9I fmt: wav type: msg vmu: 1001
    -- Recording the message
[2025-08-21 15:22:14] DEBUG[1630502][C-0000000b]: app_voicemail.c:16827 play_record_review:  Recording '/var/spool/asterisk/voicemail/default/1001/tmp/J4jf9I'
    -- User ended message by pressing #
    -- <PJSIP/SipGate-UK-0000000e> Playing 'auth-thankyou.ulaw' (language 'en_GB')
[2025-08-21 15:22:20] DEBUG[1630502][C-0000000b]: app_voicemail.c:16948 play_record_review:  Done. Outside caller, review not set, no forwardintro
[2025-08-21 15:22:20] DEBUG[1630502][C-0000000b]: app_voicemail.c:7520 leave_voicemail:  Renaming recordings '/var/spool/asterisk/voicemail/default/1001/tmp/J4jf9I' -> fn '/var/spool/asterisk/voicemail/default/1001/INBOX/msg0000'
[2025-08-21 15:22:20] DEBUG[1630502][C-0000000b]: app_voicemail.c:7524 leave_voicemail:  Renaming txt file '/var/spool/asterisk/voicemail/default/1001/tmp/J4jf9I' -> fn '/var/spool/asterisk/voicemail/default/1001/INBOX/msg0000.txt'
[2025-08-21 15:22:20] DEBUG[1630502][C-0000000b]: app_voicemail.c:5952 sendmail: Attaching file '/var/spool/asterisk/voicemail/default/1001/INBOX/msg0000', format 'wav', uservm is '2048', global is 2048
[2025-08-21 15:22:20] DEBUG[1630502][C-0000000b]: app_voicemail.c:5773 make_email_file: creating attachment filename msg0000.wav, no second attachment.
[2025-08-21 15:22:20] DEBUG[1630502][C-0000000b]: app_voicemail.c:5963 sendmail: Sent mail to [email protected] with command '/usr/sbin/sendmail -t'
[2025-08-21 15:22:20] DEBUG[1630502][C-0000000b]: app_voicemail.c:5274 vm_delete:  file: /var/spool/asterisk/voicemail/default/1001/INBOX/msg0000
[2025-08-21 15:22:20] DEBUG[1630502][C-0000000b]: app_voicemail.c:5285 vm_delete:  unlinking '/var/spool/asterisk/voicemail/default/1001/INBOX/msg0000.txt'
[2025-08-21 15:22:20] DEBUG[1630502][C-0000000b]: app_voicemail.c:5287 vm_delete:  deleting sound files '/var/spool/asterisk/voicemail/default/1001/INBOX/msg0000'
[2025-08-21 15:22:20] DEBUG[1630502][C-0000000b]: app_voicemail.c:5289 vm_delete:  Done. RC: 0
[2025-08-21 15:22:20] DEBUG[1630502][C-0000000b]: app_voicemail.c:8584 queue_mwi_event: Queueing event for mailbox 1001@default  New: 0   Old: 0
[2025-08-21 15:22:20] DEBUG[1630502][C-0000000b]: app_voicemail.c:8597 queue_mwi_event: Found alias mapping: 1001@device -> 1001@default
[2025-08-21 15:22:20] DEBUG[1630502][C-0000000b]: app_voicemail.c:7618 leave_voicemail:  Done: '0'
[2025-08-21 15:22:20] DEBUG[1630502][C-0000000b]: app_voicemail.c:13318 vm_exec:  Done.  RC: 0

I think I can see where my voicemail was sent :slight_smile:

Yes i think that was the issue.. Thank you.

@BlazeStudios
Thank you, you really opened my eyes :slightly_smiling_face:

I had test now and all works..

# ls -la
total 84
drwxrwxr-x 2 asterisk asterisk  4096 Aug 21 15:29 .
drwxrwxr-x 6 asterisk asterisk  4096 Aug 21 13:45 ..
-rw-rw-rw- 1 asterisk asterisk   302 Aug 21 15:29 msg0000.txt
-rw-r--r-- 1 asterisk asterisk 73324 Aug 21 15:29 msg0000.wav

And that you have the delete option enabled so there will never be a local copy of the voicemail.

That is 100% correct.. VM deleted from Local PBX and sent to email. I haven’t seen it on my email because they are drop to Junk box attached VM’s.