Cannot leave voicemail. app_voicemail.c:1878 create_dirpath: ast_mkdir '/var/spool/asterisk/voicemail/default/241/tmp' failed: Permission denied

this is my extensions.conf.

[general]

[from-internal]
exten => 240,1,Answer()
exten => 240,2,Dial(SIP/240,10)
exten => 240,3,VoiceMail(240@default)
exten => 240,4,PlayBack(vm-goodbye)
exten => 240,5,Hangup()

exten => 241,1,Answer()
exten => 241,2,Dial(SIP/241,10)
exten => 241,3,VoiceMail(241@default)
exten => 241,4,PlayBack(vm-goodbye)
exten => 241,5,Hangup()

exten => 242,1,Answer()
exten => 242,2,Dial(SIP/242,10)
exten => 242,3,VoiceMail(242@default)
exten => 242,4,PlayBack(vm-goodbye)
exten => 242,5,Hangup()

include => features
include => hello-world

[from-internal]

exten => _X.,1,NoOp()
exten => _X.,n,Dial(SIP/alienvoip/${EXTEN},10)
exten => _X.,n,Hangup()

[features]
exten => 6500,1,Answer()
exten => 6500,1,VoiceMailMain(@default)

[hello-world]
exten =>6599,1,Answer()
exten =>6599,2,Playback(hello-world)
exten =>6599,3,Hangup()

this is my CLI output

0x7f5df803ba20 – Probation passed - setting RTP source address to 192.168.12.101:5004
– Executing [241@from-internal:2] Dial(“SIP/240-00000004”, “SIP/241,10”) in new stack
== Using SIP RTP CoS mark 5
– Called SIP/241
– SIP/241-00000005 is ringing
– Got SIP response 486 “Busy Here” back from 192.168.12.114:5060
– SIP/241-00000005 is busy
== Everyone is busy/congested at this time (1:1/0/0)
– Executing [241@from-internal:3] VoiceMail(“SIP/240-00000004”, “241@default”) in new stack
[Mar 16 14:30:27] WARNING[5512][C-00000002]: app_voicemail.c:1878 create_dirpath: ast_mkdir ‘/var/spool/asterisk/voicemail/default/241/tmp’ failed: Permission denied
[Mar 16 14:30:27] WARNING[5512][C-00000002]: app_voicemail.c:6396 leave_voicemail: Failed to make directory (/var/spool/asterisk/voicemail/default/241/temp)
== Spawn extension (from-internal, 241, 3) exited non-zero on ‘SIP/240-00000004’

Your Asterisk does not have permission to create directories and files. Check the permissions on /var/spool/asterisk/voicemail/default/241 and up to ensure that Asterisk has permission.

1 Like

Thanks for replied. by the way, I’m running Asterisk as a root user. Is there any possible mistakes on my Extensions.conf. Or do i really need to send my Sip.conf too ?

You don’t need to send either. You still need to ensure permissions are such that Asterisk can create what it needs. The warning is from the system itself, saying that permission was denied.