Summary: | ASTERISK-28151: app_voicemail: MWI fails with mailboxes=##@device instead of mailboxes=##@default | ||
Reporter: | Ronald Raikes (reraikes) | Labels: | pjsip |
Date Opened: | 2018-11-05 17:47:18.000-0600 | Date Closed: | 2018-11-28 17:21:18.000-0600 |
Priority: | Blocker | Regression? | |
Status: | Closed/Complete | Components: | Applications/app_voicemail |
Versions: | GIT | Frequency of Occurrence | Constant |
Related Issues: | |||
Environment: | FreePBX 14 + Asterisk Master Branch | Attachments: | |
Description: | This report filed here at the direction of Andrew Nagy.
Component: Voicemail MWI when using Asterisk Master Branch '##' = extension number MWI operates properly when PJSIP endpoint is configured with: mailboxes=##@default SIP NOTIFY: Messages-Waiting: yes Voice-Message: 1/0 (0/0) MWI fails when PJSIP endpoint is configured with: mailboxes=##@device SIP NOTIFY: Messages-Waiting: no Voice-Message: 0/0 (0/0) This problem does not occur with Asterisk 16.0.0. | ||
Comments: | By: Asterisk Team (asteriskteam) 2018-11-05 17:47:20.314-0600 Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report. Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process]. By: Kevin Harwell (kharwell) 2018-11-07 12:21:21.574-0600 I am unable to replicate this. Please post the relevant endpoint configuration from pjsip.conf, and voicemail.conf. Also what is the output from the following: {noformat} ls /var/spool/asterisk/voicemail/ {noformat} and if the "device" directory exists then ('##' = extension number): {noformat} ls /var/spool/asterisk/voicemail/device/##/INBOX {noformat} By: Ronald Raikes (reraikes) 2018-11-07 13:11:11.268-0600 The following configuration was generated by FreePBX: {code} [12] type=aor mailboxes=12@device max_contacts=1 remove_existing=yes maximum_expiration=7200 minimum_expiration=60 qualify_frequency=60 [12-auth] type=auth auth_type=userpass password=password username=12 [12] type=endpoint aors=12 auth=12-auth tos_audio=ef tos_video=af41 cos_audio=5 cos_video=4 allow=ulaw,g722,opus context=from-internal callerid=Ronald Raikes <12> dtmf_mode=rfc4733 mailboxes=12@device mwi_subscribe_replaces_unsolicited=yes aggregate_mwi=yes use_avpf=no rtcp_mux=no bundle=no ice_support=no media_use_received_transport=no trust_id_inbound=yes media_encryption=no timers=yes media_encryption_optimistic=no send_pai=yes rtp_symmetric=yes rewrite_contact=yes force_rport=yes language=en one_touch_recording=on record_on_feature=apprecord record_off_feature=apprecord [12-identify] type=identify endpoint=12 [general] emailbody=${VM_NAME},\n\nThere is a new voicemail in mailbox ${VM_MAILBOX}:\n\n\tFrom:\t${VM_CALLERID}\n\tLength:\t${VM_DUR} seconds\n\tDate:\t${VM_DATE}\n\nDial *98 to access your voicemai$ pollmailboxes=yes pollfreq=10 forcegreetings=yes forcename=yes emailsubject=FreePBX Voicemail Notification fromstring=FreePBX Phone System charset=UTF-8 envelope=yes operator=yes review=no saycid=no sayduration=yes searchcontexts=no sendvoicemail=yes tempgreetwarn=yes usedirectory=yes hidefromdir=no moveheard=yes smdienable=no nextaftercmd=yes emaildateformat=%A, %B %d, %Y at %r pagersubject=PBX Voicemail Notification pagerbody=New ${VM_DUR} long msg in box ${VM_MAILBOX}\nfrom ${VM_CALLERID}, on ${VM_DATE} pagerfromstring=PBX Phone System pagerdateformat=%A, %B %d, %Y at %r pbxskip=no attach=yes maxgreet=60 maxlogins=3 maxmsg=100 minpassword=0 maxsecs=300 maxsilence=10 silencethreshold=128 minsecs=1 imapgreetings=yes imapclosetimeout=60 imapopentimeout=60 imapreadtimeout=60 imapwritetimeout=60 [default] 12 => 1234,Ronald Raikes,,,attach=no|saycid=no|envelope=no|delete=no root@FreePBX:/etc/asterisk# ls /var/spool/asterisk/voicemail/ default device root@FreePBX:/etc/asterisk# ls /var/spool/asterisk/voicemail/device/12/INBOX msg0000.txt msg0000.wav {code} By: Ronald Raikes (reraikes) 2018-11-07 13:55:26.860-0600 Changing only 'mailboxes=12@device' to 'mailboxes=12@default', SIP NOTIFY messages change from: Messages-Waiting: no Voice-Message: 0/0 (0/0) to Messages-Waiting: yes Voice-Message: 1/0 (0/0) By: Joshua C. Colp (jcolp) 2018-11-07 14:49:10.665-0600 I believe this may be the result of a change that has gone into all branches, https://gerrit.asterisk.org/#/c/asterisk/+/10132/, so I've marked this as a blocker until we can determine otherwise. By: Kevin Harwell (kharwell) 2018-11-07 17:16:09.291-0600 Using the above configuration I was finally able to replicate. Note, to reproduce you may need to add a simlink under the voicemail directory of device->default (or make sure a device folder exists with the necessary info under it). Also, using git bisect I was able to confirm that cdece3b63740091b3d8387df167ca0a24ede0ed1 - app_voicemail: Remove need to subscribe to stasis - introduced this bug (which is the one [~jcolp] listed above). By: Ronald Raikes (reraikes) 2018-11-07 17:33:01.393-0600 FreePBX creates a symlink: root@FreePBX:~# ls -l /var/spool/asterisk/voicemail/device/* lrwxrwxrwx 1 asterisk asterisk 40 Nov 7 13:56 /var/spool/asterisk/voicemail/device/12 -> /var/spool/asterisk/voicemail/default/12 By: Andrew Nagy (tm1000) 2018-11-28 17:21:05.490-0600 [~reraikes] After much deliberation we've determined that this is something FreePBX is going to fix in regards to Asterisk 16. https://issues.freepbx.org/browse/FREEPBX-18671 By: George Joseph (gjoseph) 2018-11-29 13:14:41.821-0600 We're going to revert the asterisk change for now, then put it back in when FreePBX is ready. By: Alexei Gradinari (alexei gradinari) 2018-11-29 15:36:54.616-0600 I just read a comment of origin patch which removed subscription to stasis... "Since polling is only required when changes are being made to mailboxes outside of app_voicemail and since the number of mailboxes that don't have any subscribers is likely to be very low, all mailboxes are now polled instead of just the ones with subscribers." Where did the assumption come from that "the number of mailboxes that don't have any subscribers is likely to be very low"? Imagine there are two asterisk servers running at the same time as master/backup or as load balancing for thousands of SIP endpoints. The IMAP storage is used for voicemail. If master/backup the all endpoints have MWI subscription only on master server. So only master server should poll IMAP mailboxes. If load balancing the half of the endpoints have MWI subscription on the first server the others on the second server. Without subscription to stasis both servers will poll all IMAP mailboxes. I think the best way is to be able to switch on/off of the subscription to stasis using global option of voicemail.conf. And this option should be ON (old behavior) for asterisk version 13 or it breaks compatibility. And it should be documented in CHANGES. By: Friendly Automation (friendly-automation) 2018-11-29 16:29:35.804-0600 Change 10719 merged by Jenkins2: Revert "app_voicemail: Remove need to subscribe to stasis" [https://gerrit.asterisk.org/10719|https://gerrit.asterisk.org/10719] By: Friendly Automation (friendly-automation) 2018-11-30 07:30:58.577-0600 Change 10718 merged by George Joseph: Revert "app_voicemail: Remove need to subscribe to stasis" [https://gerrit.asterisk.org/10718|https://gerrit.asterisk.org/10718] By: Friendly Automation (friendly-automation) 2018-11-30 07:31:42.252-0600 Change 10720 merged by George Joseph: Revert "app_voicemail: Remove need to subscribe to stasis" [https://gerrit.asterisk.org/10720|https://gerrit.asterisk.org/10720] |