PJSIP and MWI for Voicemail (FreePBX 14 and Asterisk 16)

@tm1000

I’m curious why FreePBX sets the ‘VM Context’ option to ‘default’ on the ‘Extension -> Voicemail’ tab but sets the ‘Mailbox’ option to ‘##@device’ on the ‘Extension -> Advanced’ tab. I had to change ‘##@device’ to ‘##@default’ to get MWI to function.

What brand phones. Those settings are correct and deal with device and user mode so they have to be there way for when people use Device and User. My mailbox is setup same here and works fine.

  1. Grandstream GXP2140

  2. OBi202 ATA

MWI doesn’t work on either unless the ‘Mailbox’ option on the ‘Extension -> Advanced’ tab is changed to ‘##@default’ (as was reported on the older topic and which wasn’t challenged nor explained).

It was answered about the solict type and a user confirmed that fixed it for them.

Solicit type is unchanged here (default is Auto). Setting it to anything else (Unsolicited or Solicited) does not make MWI work. Only changing ##@device to ##@default makes MWI work.

There’s no need to open a new thread and then also tag me directly. Just open the thread and give the opportunity for others to reply. When you ping me directly you are shutting other people out or If you want to tag me directly then just pm me instead.

Tony answered this question already but the two folders for device and default are symlinked together (device is symlinked to default) under var spool asterisk voicemail. The context refers to the folders. If that symlink isn’t happening then it’d be a bug.

[email protected]:/var/spool/asterisk/voicemail# ls -l
total 8
drwxrwxr-x 4 asterisk asterisk 4096 Oct 31 00:39 default
drwxrwxr-x 2 asterisk asterisk 4096 Nov  4 21:48 device

[email protected]:/var/spool/asterisk/voicemail# ls -l default
total 8
drwxrwxr-x 6 asterisk asterisk 4096 Oct 30 21:18 10
drwxrwxr-x 6 asterisk asterisk 4096 Oct 31 20:02 11

[email protected]:/var/spool/asterisk/voicemail# ls -l device
total 0
lrwxrwxrwx 1 asterisk asterisk 40 Nov  4 21:48 10 -> /var/spool/asterisk/voicemail/default/10
lrwxrwxrwx 1 asterisk asterisk 40 Nov  4 21:47 11 -> /var/spool/asterisk/voicemail/default/11

Are these the symlinks you’re referring to? If, so, it’s still not clear why MWI doesn’t work with ##@device but does with [email protected]

OK, while I’ve been on your side with the whole @device being the default, you are clearly not connecting the dots with what has been explained to you.

EDIT (read the output wrong originally)
There are Symlinks there for mailboxes 10 and 11. So why it’s not working, I’m not sure. When you do an ls -l on the symlink path does it give the details of what is in the directory?

It’s been like this for 12 years (well before my tenture) and it works fine for thousands. Including our COO and CEO.

[email protected]:~# ls -l /var/spool/asterisk/voicemail
total 8
drwxrwxr-x 4 asterisk asterisk 4096 Oct 31 00:39 default
drwxrwxr-x 2 asterisk asterisk 4096 Nov  5 03:12 device

[email protected]:~# ls -l /var/spool/asterisk/voicemail/device
total 0
lrwxrwxrwx 1 asterisk asterisk 40 Nov  5 03:12 10 -> /var/spool/asterisk/voicemail/default/10
lrwxrwxrwx 1 asterisk asterisk 40 Nov  4 21:47 11 -> /var/spool/asterisk/voicemail/default/11

[email protected]:~# ls -l /var/spool/asterisk/voicemail/device/10
lrwxrwxrwx 1 asterisk asterisk 40 Nov  5 03:12 /var/spool/asterisk/voicemail/device/10 -> /var/spool/asterisk/voicemail/default/10

[email protected]:~# ls -l /var/spool/asterisk/voicemail/default/10
total 16
drwxrwxr-x 2 asterisk asterisk 4096 Nov  5 11:33 INBOX
drwxrwxr-x 2 asterisk asterisk 4096 Nov  5 03:13 Old
drwxrwxr-x 2 asterisk asterisk 4096 Nov  5 11:33 tmp
drwxrwxr-x 2 asterisk asterisk 4096 Nov  5 03:13 Urgent

[email protected]:~# ls -l /var/spool/asterisk/voicemail/default/10/INBOX
total 176
-rw-rw-rw- 1 asterisk asterisk    313 Nov  5 11:33 msg0000.txt
-rw-r--r-- 1 asterisk asterisk 173484 Nov  5 11:33 msg0000.wav

That’s nice, but unless you offer something more constructive in the way of troubleshooting this problem, I have two choices:

  1. Leave it at ##@device and have no MWI.

  2. Change it to ##@default where everything works perfectly.

Did you ask for help or did you ask why we do it this way?

You can leave it at default if it works for you. Doesn’t mean it’s not wrong though.

Did you try to see if it works if you switch to Asterisk 13?

Edit: Just tried on another system with Asterisk 13 it worked. So tried on Asterisk 16 it also worked.

Andrews15*CLI> voicemail show users
Context    Mbox  User                      Zone       NewMsg
default    1001  Тестовый пользователь                 1
default    5555  Name                                      0
default    1000  Andrew Nagy                               1

Please consider this a formal request for help to figure out why the default setting does not work some some, including me…

I replied above. Does it work if you use Asterisk 13? Please switch and try.

As you’re aware, I can’t ‘switch’. I’ll have to build a new system from the ground up.

I have switched to Asterisk 13 and Asterisk 16 and it works for me in both instances with PJSIP and MWI type set to Auto (as shown above).

When you have time check if it works on Asterisk 13.

asterisk-version-switch

Unless I missed something here.

Just to be clear, this has nothing to do with ‘MWI type set to Auto (as shown above)’.

The problem is related to the ‘Mailbox’ setting. MWI type of Auto and Unsolicited both work as long as Mailbox is set to ##@default instead of ##@device.

That’s only applicable to the FreePBX Distro. I’m on a Raspberry Pi with a manual installation of Asterisk + FreePBX.

Works fine for me in 13 and 16 if it’s set to device this seems to be an issue only on RasPi with Asterisk 16.