[asterisk-dev] MWI Event subscription
Andrey Kovalenko
akvakh at list.ru
Thu Oct 7 02:50:36 CDT 2010
Thanks a lot! ast_event_get_cached works perfect in my case.
> -----Original Message-----
> From: asterisk-dev-bounces at lists.digium.com [mailto:asterisk-dev-
> bounces at lists.digium.com] On Behalf Of Russell Bryant
> Sent: Wednesday, October 06, 2010 6:45 PM
> To: Asterisk Developers Mailing List
> Subject: Re: [asterisk-dev] MWI Event subscription
>
>
> ----- 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.
>
> --
> Russell Bryant
> 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
>
> --
> __________________________________________________________
> ___________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
More information about the asterisk-dev
mailing list