[asterisk-bugs] [JIRA] (ASTERISK-24780) Buddies are always auto-registered when processing the roster
Matt Jordan (JIRA)
noreply at issues.asterisk.org
Wed Feb 11 14:15:34 CST 2015
[ https://issues.asterisk.org/jira/browse/ASTERISK-24780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=224876#comment-224876 ]
Matt Jordan commented on ASTERISK-24780:
----------------------------------------
Actually, the code in {{res_xmpp}} is already attempting to honor the autoregister feature:
{code}
/* Determine if we need to subscribe to their presence or not */
if (!iks_strcmp(iks_find_attrib(item, "subscription"), "none") ||
!iks_strcmp(iks_find_attrib(item, "subscription"), "from")) {
buddy->subscribe = 1;
} else {
buddy->subscribe = 0;
}
{code}
We then invoke an {{ao2_callback}} only if {{autoregister}} is enabled:
{code}
/* If autoregister is enabled we need to go through every buddy that we need to subscribe to and do so */
if (ast_test_flag(&clientcfg->flags, XMPP_AUTOREGISTER)) {
ao2_callback(client->buddies, OBJ_NODATA | OBJ_MULTIPLE, xmpp_client_subscribe_user, client);
}
{code}
Which actually does the subscription.
Note that {{autoregister}} is on by default, and is configured in the {{general}} section. Can you attach your {{xmpp.conf}}, as well as a DEBUG log with XMPP debugging enabled?
> Buddies are always auto-registered when processing the roster
> -------------------------------------------------------------
>
> Key: ASTERISK-24780
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-24780
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Resources/res_xmpp
> Affects Versions: 13.1.0
> Reporter: Simon Arlott
>
> In both xmpp_roster_hook and xmpp_client_create_buddy, it ignores the XMPP_AUTOREGISTER setting and sets "buddy->subscribe = 1" if there is no subscription.
> This is a regression as it was already fixed in ASTERISK-14233. It is extremely inconvenient to have Asterisk send "Greetings! I am the Asterisk Open Source PBX and I want to subscribe to your presence" to everyone in your contact list.
> I am sharing my own XMPP account with Asterisk (at a negative priority) and this needs to be a recognised use case where Asterisk should not do inappropriate things.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list