> On Oct. 14, 2014, 1:51 p.m., Matt Jordan wrote: > > /trunk/main/presencestate.c, lines 160-177 > > <https://reviewboard.asterisk.org/r/4050/diff/1/?file=67849#file67849line160> > > > > So, I'm not sure this is the behaviour that we would want. > > > > If a channel driver provides presence information, then the presence > > information provided by the channel driver supercedes any custom presence > > provider. That is: > > > > exten => hint,SIP/alice&CustomPresence:alice > > > > Will *always* use the presence provided by SIP/alice, instead of the > > custom presence provider. That feels like a loss of functionality. > > > > Prior to this patch, we would only use the presence information > > provided by a single custom presence provider, since presence information > > could only come from custom presence providers. If the channel drivers > > provide that as well, there probably needs to be some mechanism to > > aggregate that together.
Supporting multiple providers would be better. It turned out this wasn't just a matter of putting a strsep() loop in ast_presence_state_helper(). This hint parsing code in presence_state_cb (main/pbx.c) only supported a single provider, so I had to modify add_hintdevice() to include the presence hints and then rewrote the lookup code based on that in device_state_cb(). The overall presence state is whichever provider is most-unavailable, eg: if SIP/alice is DND and CustomPresence:alice is CHAT then the presence state is DND. - gareth ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviewboard.asterisk.org/r/4050/#review13510 ----------------------------------------------------------- On Oct. 6, 2014, 4:18 a.m., gareth wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviewboard.asterisk.org/r/4050/ > ----------------------------------------------------------- > > (Updated Oct. 6, 2014, 4:18 a.m.) > > > Review request for Asterisk Developers. > > > Bugs: ASTERISK-24363 > https://issues.asterisk.org/jira/browse/ASTERISK-24363 > > > Repository: Asterisk > > > Description > ------- > > This patch adds the ability for channel drivers to supply presence > information in a similar manner to device state. > > eg: exten => XXX,hint,,<Technology>/<Resource> > > > Diffs > ----- > > /trunk/main/presencestate.c 424055 > /trunk/main/channel.c 424055 > /trunk/include/asterisk/channel.h 424055 > > Diff: https://reviewboard.asterisk.org/r/4050/diff/ > > > Testing > ------- > > Code is originally written as part of ASTERISK-13145 which has undergone > extensive testing. > > > Thanks, > > gareth > >
-- _____________________________________________________________________ -- 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
