[asterisk-dev] MWI Event subscription
russell at digium.com
Wed Oct 6 09:44:54 CDT 2010
----- Original Message -----
> I try to use Asterisk event system to get MWI function.
> I thought that after I subscribe for MWI event with
> ast_event_subscribe, it
> doesn't call callback immediately with current status of MWI. But it's
> called later when new voice messages are added.
> Is there any way to force event notification after subscription?
Yes, there are two ways to do it. You can either query the cache for a single state item using ast_event_get_cached(), or you can ask the event system to dump all cached events that match your subscription parameters using ast_event_dump_cache(). See include/asterisk/event.h for more information on these functions.
Digium, Inc. | Engineering Manager, Open Source Software
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
jabber: rbryant at digium.com -=- skype: russell-bryant
www.digium.com -=- www.asterisk.org -=- blogs.asterisk.org
More information about the asterisk-dev