(Solved) Deleting voicemail in UCP does not update MWI on phone

Yesterday I changed this SIP port from 5060 to another random port.
I installed all updates available (modules and system) and I also switched to Asterisk 16 Certified (LTS)
Everything is fine except one thing: when I delete a voicemail in UCP, the message waiting indicator and message counter on the phone (Yealink) does not get updated.

If I make any change in FreePBX and press the red “Apply config” button, the phone is updated with the correct waiting indicator and message counter.

Also, if I delete the message from the voicemail menu on the phone (*97 or *98), everything is also fine.

It seems like UCP does not “tell” the phone that the message was deleted.
Any clues ?

FreePBX: 16.0.21.9
Asterisk: 16.8
Voicemail: 16.0.44
UCP: 16.0.21

EDIT: If I delete the message from UCP (so voicemail becomes empty but MWI stays lit and counter shows 1 message) then I just dial in the voicemail using *97/*98 without doing any other operation, it updates the the message waiting indicator and message counter on the phone.

http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/Voicemail_id263499.html

check your ‘pollmailboxes’ and ‘pollfrequency’

Thanks Dicko
Yeah I checked those earlier.

Poll frequency was at 10 and Poll Mailboxes was set to Yes

I switched Poll Mailboxes to No then Yes to “reset” the option, in case but it didn’t change anything.

use sngrep and filter on NOTIFY to troubleshoot

That’s strange:

Using SNGREP, I see the notify as soon as there is a message in the voicemail.

                │                             │         │CSeq: 33980 NOTIFY                                                                       
                │                             │         │Subscription-State: terminated                                                           
                │                             │         │Event: message-summary                                                                   
                │                             │         │Allow-Events: presence, dialog, message-summary, refer                                   
                │                             │         │Max-Forwards: 70                                                                         
                │                             │         │User-Agent: FPBX-16.0.21.8(16.8)                                                         
                │                             │         │Content-Type: application/simple-message-summary                                         
                │                             │         │Content-Length:    98                                                                    
                │                             │         │                                                                                         
                │                             │         │Messages-Waiting: yes                                                                    
                │                             │         │Message-Account: sip:*[email protected]:xxxx                                          
                │                             │         │Voice-Message: 1/0 (0/0)  

The problem is, I keep receiving the same notify even after the message is deleted from the inbox using UCP. The “Messages-Waiting: yes” and “Voice-Message: 1/0 (0/0)” are still there.
If I check in Voicemail admin, the Inbox shows as empty

As soon as I dial *98 to get in the voicemail, I receive a correct Notify:

Messages-Waiting: no                                                                     
Message-Account: sip:*[email protected]:xxxx                                          
Voice-Message: 0/0 (0/0)

It seems like the system is not “aware” that the message is deleted

Ok I found the issue: it was the Aterisk 16 Certified (LTS) version that created the problem
If I install Asterisk 16 (LTS), all is good.