# app\_voicemail\_imap failure, Asterisk 22.7.0 local build, stopped working after OS upgrade and Asterisk rebuild

**URL:** <https://community.asterisk.org/t/app-voicemail-imap-failure-asterisk-22-7-0-local-build-stopped-working-after-os-upgrade-and-asterisk-rebuild/114823>\
**Category:** Asterisk Support\
**Created:** [October 18, 2026, 11:59pm UTC](https://community.asterisk.org/t/app-voicemail-imap-failure-asterisk-22-7-0-local-build-stopped-working-after-os-upgrade-and-asterisk-rebuild/114823 "2026-10-18T23:59:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![trounds](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/trounds/32/10278_2.png) [@trounds](https://community.asterisk.org/u/trounds)\
**Post date:** [October 18, 2026, 11:59pm UTC](https://community.asterisk.org/t/app-voicemail-imap-failure-asterisk-22-7-0-local-build-stopped-working-after-os-upgrade-and-asterisk-rebuild/114823/1 "2026-10-18T23:59:17Z")

</div>

I recently upgraded my home server from Ubuntu 24.04 LTS to Ubuntu 26.04 LTS. Under 24.04, I ran Asterisk 22.7.0 (which I built locally) without issue. The relevant functionality was to pick up SIP calls (from an Obihai OBI-110 SIP/POTS bridge) from inbound calls to my house POTS line, ring IAX2 clients (Zoiper) on our mobile phones, then transfer to voicemail if we did not answer. Voicemail was delivered to IMAP (Dovecot 2.3 running on the same server). This all worked flawlessly for years, over many versions of Asterisk and Ubuntu, with the same configuration files I have today.

After the OS upgrade, Asterisk segfaulted immediately (missing libxml2), which was no surprise. I went back to my build directory, ran `make uninstall`, then `make clean`, followed the recommendations of `contrib/scripts/install_prereq test`, then did the full configure, menuselect, build, and install process.

The OS upgrade pushed Dovecot from 2.3 to 2.4, which requires a lot of configuration syntax changes in Dovecot. That is all working now (ditto for Postfix), email is flowing as it should in all directions. The rebuilt Asterisk 22.7.0 seems to be having difficulties dealing with the IMAP service, and the errors are somewhat misleading.

In testing the rebuilt Asterisk 22.7.0, which was built with **only** app\_voicemail\_imap and **not** app\_voicemail **or** app\_voicemail\_odbc (I know that’s a common mistake, I’ll save you asking me), and using exactly the same configuration files I was using with Asterisk 22.7.0 under Ubuntu 24.04 LTS, I get the following error running `asterisk -vvvc`:

```auto
[Oct 17 10:50:36] ERROR[171092]: app_voicemail_imap.c:3146 inboxcount2: Couldn't find mailbox 200 in context default
    -- No voicemail provider registered.

```

Mailbox 200 is very much present in the default context of voicemail.conf, always has been.

Since I built from code, I elected to inspect app\_voicemail\_imap.c to get a sense of what it is trying (and failing) to do at this point:

```auto
	if (newmsgs) {
		struct ast_vm_user *vmu = find_user(NULL, context, mailboxnc);
		if (!vmu) {
			ast_log(AST_LOG_ERROR, "Couldn't find mailbox %s in context %s\n", mailboxnc, context);

```

This code wouldn’t get called at all unless it had actually read voicemail.conf, found the entry, and was trying to process it, which is not what the language of the error message implies.

The default context of voicemail.conf:

```auto
[default]
; Note: The rest of the system must reference mailboxes defined here as mailbox@default.
200 => 1234,Redacted Name,redacted@email.addr,,|attach=yes|delete=yes

```

This lead me to see what Asterisk _was_ getting out of voicemail.conf, if anything:

```auto
*CLI> voicemail show users
Context Mbox User Zone NewMsg
default 200 Redacted Name 0
1 voicemail users configured.
*CLI> [Oct 17 10:51:14] ERROR[171092]: app_voicemail_imap.c:3146 inboxcount2: Couldn't find mailbox 200 in context default

```

…and there it is again!

Clearly, the problem is **not** in voicemail.conf, but is some problem that Asterisk is encountering while trying to access the IMAP service that has crept in with changes to Dovecot or Ubuntu itself.

Needless to say, I am going to have to do some tracing or debugging of _something_, but could use the advice of people who understand in mechanics of app\_voicemail\_imap and can tell me _where_ I need to look. I am no stranger to C development, debugging, or networking, so lay it on me. Where do I need to focus my troubleshooting efforts at this point?

This problem is specific to my environment, but may also happen to others performing similar system upgrades.

While my overall problem is not an Asterisk problem _per se_, the log message it generates is a bit misleading in cases such as this one. The specified mailbox **was** found in the specified context, but the log message is implying otherwise. I would respectfully suggest the responsible developer(s) consider revisiting this portion of the code, at least in terms of accurate error descriptions.

That said, what/where do I need to diagnose from here?

Thanks in advance!
