25 #ifndef _ASTERISK_XMPP_H
26 #define _ASTERISK_XMPP_H
30 #include <openssl/ssl.h>
31 #include <openssl/err.h>
38 #define NET_IO_BUF_SIZE 16384
41 #define IKS_NET_EXPIRED 12
62 #define XMPP_MAX_JIDLEN 3071
65 #define XMPP_MAX_RESJIDLEN 1023
68 #define XMPP_MAX_ATTRLEN 256
113 char id[XMPP_MAX_JIDLEN];
115 unsigned int subscribe:1;
131 SSL_CTX *ssl_context;
133 const SSL_METHOD *ssl_method;
134 unsigned int stream_flags;
142 unsigned int reconnect:1;
int ast_xmpp_client_send_message(struct ast_xmpp_client *client, const char *user, const char *message)
Send a message to a given user using an established XMPP client connection.
int ast_xmpp_chatroom_join(struct ast_xmpp_client *client, const char *room, const char *nickname)
Join an XMPP multi-user chatroom.
int ast_xmpp_chatroom_invite(struct ast_xmpp_client *client, const char *user, const char *room, const char *message)
Invite a user to an XMPP multi-user chatroom.
struct ast_xmpp_message::@293 list
int ast_xmpp_chatroom_leave(struct ast_xmpp_client *client, const char *room, const char *nickname)
Leave an XMPP multi-user chatroom.
#define AST_LIST_HEAD(name, type)
Defines a structure to be used to hold a list of specified type.
int ast_xmpp_client_disconnect(struct ast_xmpp_client *client)
Disconnect an XMPP client connection.
Stasis Message Bus API. See Stasis Message Bus API for detailed documentation.
void ast_xmpp_client_lock(struct ast_xmpp_client *client)
Lock an XMPP client connection.
char resource[XMPP_MAX_RESJIDLEN]
#define AST_DECLARE_STRING_FIELDS(field_list)
Declare the fields needed in a structure.
int ast_xmpp_client_send(struct ast_xmpp_client *client, iks *stanza)
Send an XML stanza out using an established XMPP client connection.
void ast_xmpp_increment_mid(char *mid)
Helper function which increments the message identifier.
#define XMPP_MAX_RESJIDLEN
Maximum size of a resource JID.
#define AST_STRING_FIELD(name)
Declare a string field.
A set of macros to manage forward-linked lists.
Core PBX routines and definitions.
void ast_xmpp_client_unref(struct ast_xmpp_client *client)
Release XMPP client connection reference.
#define AST_LIST_ENTRY(type)
Declare a forward link structure inside a list entry.
struct ao2_container * resources
structure to hold users read from users.conf
int ast_xmpp_chatroom_send(struct ast_xmpp_client *client, const char *nickname, const char *address, const char *message)
Send a message to an XMPP multi-user chatroom.
struct ast_xmpp_client * ast_xmpp_client_find(const char *name)
Find an XMPP client connection using a given name.
static int filter(struct ast_channel *chan, const char *cmd, char *parse, char *buf, size_t len)
struct ast_xmpp_capabilities caps
static struct stasis_subscription * device_state_sub
Subscription to device state change messages.
xmpp_state
Client connection states.
void ast_xmpp_client_unlock(struct ast_xmpp_client *client)
Unlock an XMPP client connection.