[asterisk-bugs] [JIRA] (ASTERISK-24275) Tie inter-Asterisk SIP PUBLISHes for MWI into res_mwi_external

Matt Jordan (JIRA) noreply at issues.asterisk.org
Wed Aug 27 22:17:29 CDT 2014


     [ https://issues.asterisk.org/jira/browse/ASTERISK-24275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Jordan updated ASTERISK-24275:
-----------------------------------

    Status: Open  (was: Triage)

> Tie inter-Asterisk SIP PUBLISHes for MWI into res_mwi_external
> --------------------------------------------------------------
>
>                 Key: ASTERISK-24275
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24275
>             Project: Asterisk
>          Issue Type: Improvement
>      Security Level: None
>          Components: Resources/res_mwi_external, Resources/res_pjsip_publish_asterisk
>    Affects Versions: 13.0.0-beta1
>            Reporter: Mark Michelson
>
> Asterisk 13 introduced the ability for Asterisk to publish device state and MWI messages between each other.
> While writing a test for ASTERISK-24116, I noticed a discrepancy in the AMI MWI events that the publishee publishes. If Asterisk 1 publishes to Asterisk 2 that mailbox "alice" has 2 new messages and 0 old messages, then Asterisk 2 sends out the following AMI event:
> {noformat}
> Event: MessageWaiting
> Waiting: 0
> New: 2
> Old 0
> {noformat}
> The problem is the Waiting header. Since there are 2 new messages, the Waiting value should be 1 instead of 0. The reason this happens is because the AMI event calls {{ast_app_has_voicemail()}} to determine if there are messages waiting. This means that either app_voicemail or res_mwi_external is called into to determine if there are messages waiting.
> This is indicative of a larger issue, which is that anything that tries to check the current message count (such as running the AMI MWIGet action) of a mailbox will not get accurate counts. My suggestion for this is to have the SIP publish handler in res_pjsip_publish_asterisk call into the API provided by res_mwi_external to update mailbox status. This way, the events still get published, and state can be queried.
> The real work here would actually be to make res_mwi_external knowledgeable about external servers. Currently, res_mwi_external does not understand EIDs and will treat all mailboxes as local.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list