Dynamic mailbox creation PJSIP

Hi guys,

I am working on setting up voicemail on our Asterisk 16 server running on Ubuntu 16.04.
We are using PJSIP.
This is my dialplan that should have voicemail enabled.

exten => _8XX,1,Wait(1)
same => n,NoOp(PJSIP/{EXTEN} has status 1 : {DEVICE_STATE(PJSIP/{EXTEN})}) same => n,GotoIf([ “{DEVICE_STATE(PJSIP/{EXTEN})}” = “BUSY” ]?DevBus:DevAva)
same => n(DevAva),Dial({PJSIP_DIAL_CONTACTS({EXTEN})})
same => n(blocked),Hangup()
same => n,Answer()
same => n(DevBus),VoiceMail(${EXTEN}@default,u)
same => n,Playtones(busy)
same => n,Busy(10)
same => n,Hangup()

But this gives me the error message :
WARNING [91564][C-00000006]: app_voicemail.c : 6712 leave_voicemail : No entry in voicemail config file for ‘800’

Is there a possibility to add a “wildcard” rule to automatically create a mailbox for all extensions instead of having to manually configure each one in voicemail.conf ? We are a large and constantly changing company so manual configuration would be very time consuming.

The app_voicemail module does not support such a thing. It expects to be configured with such information in all backends.

It used to work on our older server like this :


{EXTEN} => 0000,{DISPLAY_NAME},

But that doesn’t seem to work anymore. I thought maybe there was some alternative syntax or something.

That’s never existed in the core. You either had your own patch, or some interpreter which then generated the .conf file.

Hmm alright, thanks !

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