[Home]

Summary:ASTERISK-24790: Reduce spurious noise in logs from voicemail - Couldn't find mailbox %s in context
Reporter:Graham Barnett (GrahamJB)Labels:
Date Opened:2015-02-13 11:49:36.000-0600Date Closed:2015-02-21 11:36:11.000-0600
Priority:MinorRegression?
Status:Closed/CompleteComponents:Applications/app_voicemail
Versions:13.1.0 13.2.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) app_voicemail.c.patch_noise
Description:You get spammed by these messages:
 Couldn't find mailbox %s in context
They do not appear to be errors.

Comments:By: Graham Barnett (GrahamJB) 2015-02-13 11:50:25.485-0600

Please stop the spurious errors in the logs !

By: Matt Jordan (mjordan) 2015-02-20 10:47:39.694-0600

I'm not sure why this isn't an error. We're being asked to provide a mailbox count for a voicemail user that doesn't exist in the system. That might be a WARNING and not an ERROR, but it does feel like something has been mis-configured.

What is the configuration that you are using that is causing it to be spammed out?

By: Graham Barnett (GrahamJB) 2015-02-20 14:44:26.811-0600

Example:

{noformat}
;--------------------------------------------------------------------------------;
;          Do NOT edit this file as it is auto-generated by FreePBX.             ;
;--------------------------------------------------------------------------------;
; For information on adding additional paramaters to this file, please visit the ;
; FreePBX.org wiki page, or ask on IRC. This file was created by the new FreePBX ;
; BMO - Big Module Object. Any similarity in naming with BMO from Adventure Time ;
; is totally deliberate.                                                         ;
;--------------------------------------------------------------------------------;
#include pjsip.endpoint_custom.conf

[112]
type=endpoint
aors=112
auth=112-auth
allow=ulaw,alaw,gsm,g726,g729
context=from-internal
callerid=device <112>
dtmf_mode=rfc4733
mailboxes=112@device
use_avpf=no
ice_support=no
media_use_received_transport=no
trust_id_inbound=yes
rtp_symmetric=yes
rewrite_contact=yes
{noformat}

This may be a bad interaction with FreePBX 12.0.x.x where it does not allow the entry of an empty mailbox even when an extension has none.

{noformat}
admin/modules/core/Core.class.php
                               } elseif ($keyword == 'mailbox' && $data == '') {
                                       $fields['mailbox'] = array("value" => $account.'@device', "flag" => $flag$
{noformat}

Note also it puts {{x@device}} and not {{x@default}} which prevent message indicators working.

What is the correct behaviour here in freepbx ....
# Should is be {{@default}} as a default
# Is empty the legal value that indicates no mailbox, and this is therefore a bug in freepbx, rather than asterisk spamming?
# Is there a non-empty value that can be set to indicate no mailbox?

Thanks.



By: Rusty Newton (rnewton) 2015-02-20 16:35:01.113-0600

It doesn't seem like it is a real ERROR, but maybe as Matt mentioned a WARNING would be most appropriate. I feel like NOTICE may be a little benign for this message.

Regarding FreePBX, you should open an issue with the FreePBX team on their tracker. This is the Asterisk bug tracker and to get the best help you need on the FreePBX side, you probably want the FreePBX developers looking at the issue.

{quote}
1. Should is be @default as a default
2. Is empty the legal value that indicates no mailbox, and this is therefore a bug in freepbx, rather than asterisk spamming?
3. Is there a non-empty value that can be set to indicate no mailbox?
{quote}

1. I don't know, depends on what FreePBX is doing.
2. Not defining the mailboxes option would be a valid default for "no mailboxes"
3. No.


If you can attach an Asterisk debug log showing where the issue occurs then we may be able to tell better whether message is being generated appropriately and get a better idea about the debug channel type. [See the wiki for how to gather a debug log.|https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information]

By: Graham Barnett (GrahamJB) 2015-02-20 17:42:30.895-0600

Raised: http://issues.freepbx.org/browse/FREEPBX-8812
Freepbx should allow an extension to have an empty mailbox name.

By: Graham Barnett (GrahamJB) 2015-02-20 17:43:09.705-0600

Warning is a reasonable compromise. Raised issue on freepbx that they don't allow empty mailbox name for an extension.
Thanks.

By: Matt Jordan (mjordan) 2015-02-21 11:23:10.002-0600

I can't recall all of the reasons FreePBX does this, but IIRC, there are some reasons under the hood why they 'fake out' the mailbox. I vaguely recall it has to do with their symlinking that they do. It probably isn't a bug in FreePBX, but it is a case that {{app_voicemail}} considers on many code paths to be indicative of a configuration error. It's just something that FreePBX has learned to exploit :-)

I think demoting it to a WARNING is appropriate.