mirror of https://github.com/asterisk/asterisk
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29553 65c4cc65-6c06-0410-ace0-fbb531ad65f31.4
parent
64b94dad80
commit
7aa1a77e75
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,15 @@
|
|||||||
|
[general]
|
||||||
|
;debug=yes ;;Turn on debugging by default.
|
||||||
|
;autoprune=yes ;;Auto remove users from buddy list.
|
||||||
|
;autoregister=yes ;;Auto register users from buddy list.
|
||||||
|
|
||||||
|
;[asterisk] ;;label
|
||||||
|
;type=client ;;Client or Component connection
|
||||||
|
;serverhost=astjab.org ;;Route to server for example,
|
||||||
|
;; talk.google.com
|
||||||
|
;username=asterisk@astjab.org/asterisk ;;username with optional roster.
|
||||||
|
;secret=blah ;;Password
|
||||||
|
;port=5222 ;;Port to use defaults to 5222
|
||||||
|
;usetls=yes ;;use tls or not
|
||||||
|
;usesasl=yes ;;use sasl or not
|
||||||
|
;buddy=mogorman@astjab.org ;;manual addition of buddy to list.
|
@ -0,0 +1,19 @@
|
|||||||
|
;[general]
|
||||||
|
;context=default ;;Context to dump call into
|
||||||
|
;allowguest=yes ;;Allow calls from people not in
|
||||||
|
;;list of peers
|
||||||
|
;
|
||||||
|
;[guest] ;;special account for options on guest account
|
||||||
|
;disallow=all
|
||||||
|
;allow=ulaw
|
||||||
|
;context=guest
|
||||||
|
;
|
||||||
|
;[ogorman]
|
||||||
|
;username=ogorman@gmail.com ;;username of the peer your
|
||||||
|
;;calling or accepting calls from
|
||||||
|
;disallow=all
|
||||||
|
;allow=ulaw
|
||||||
|
;context=default
|
||||||
|
;connection=asterisk ;;client or component in jabber.conf
|
||||||
|
;;for the call to leave on.
|
||||||
|
;
|
@ -0,0 +1,13 @@
|
|||||||
|
(res_jabber is very experimental!)
|
||||||
|
Jabber(xmpp) is an xml based protocol primarily for presence and messaging.
|
||||||
|
It is an open standard and there are several open server implementations,
|
||||||
|
ejabberd, jabberd(2), wildfire, and many others, as well as several open source
|
||||||
|
clients, Psi, gajim, gaim etc. Jabber differs from otherIM applications as it
|
||||||
|
is immensly extendable. This allows us to easily integrate asterisk with
|
||||||
|
jabber. The Asterisk Jabber Interface is provided by res_jabber. res_jabber
|
||||||
|
allows for asterisk to connect to any jabber server via the standard client
|
||||||
|
protocol or also as a simple client. Several simple functions are exposed to
|
||||||
|
the dial plan, jabberstatus, jabbersend, and soon jabberrecv. res_jabber is also used
|
||||||
|
to provide the connection interface for chan_jingle.
|
||||||
|
The maintainer of res_jabber is Matthew O'Gorman <mogorman@digum.com> or
|
||||||
|
mog_work on irc or prefered mogorman@astjab.org over jabber.
|
@ -0,0 +1,8 @@
|
|||||||
|
(Jingle support in asterisk is experimental)
|
||||||
|
Jingle is an xmpp based protocol for signalling the transfer of media.
|
||||||
|
Currently asterisk supports the propitery GoogleTalk protocol that is
|
||||||
|
very similar to jingle, and hopes to support true jingle specs
|
||||||
|
(JEP-166,167,176,177,180,181 etc) as more clients support the true standard.
|
||||||
|
Jingle's configuration is very similar to sip.conf only as we are not the
|
||||||
|
jabber server in this case you must provide a connection for the peer to
|
||||||
|
travel out on.
|
@ -0,0 +1,133 @@
|
|||||||
|
/*
|
||||||
|
* Asterisk -- An open source telephony toolkit.
|
||||||
|
*
|
||||||
|
* Copyright (C) 1999 - 2005, Digium, Inc.
|
||||||
|
*
|
||||||
|
* Matt O'Gorman <mogorman@digium.com>
|
||||||
|
*
|
||||||
|
* See http://www.asterisk.org for more information about
|
||||||
|
* the Asterisk project. Please do not directly contact
|
||||||
|
* any of the maintainers of this project for assistance;
|
||||||
|
* the project provides a web site, mailing lists and IRC
|
||||||
|
* channels for your use.
|
||||||
|
*
|
||||||
|
* This program is free software, distributed under the terms of
|
||||||
|
* the GNU General Public License Version 2. See the LICENSE file
|
||||||
|
* at the top of the source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _ASTERISK_JABBER_H
|
||||||
|
#define _ASTERISK_JABBER_H
|
||||||
|
|
||||||
|
#include <iksemel.h>
|
||||||
|
#include "asterisk/astobj.h"
|
||||||
|
|
||||||
|
enum aji_state {
|
||||||
|
AJI_DISCONNECTED=0,
|
||||||
|
AJI_CONNECTING,
|
||||||
|
AJI_ALMOST,
|
||||||
|
AJI_CONNECTED
|
||||||
|
};
|
||||||
|
|
||||||
|
enum {
|
||||||
|
AJI_AUTOPRUNE = (1 << 0),
|
||||||
|
AJI_AUTOREGISTER = (1 << 1)
|
||||||
|
};
|
||||||
|
|
||||||
|
enum aji_btype {
|
||||||
|
AJI_USER=0,
|
||||||
|
AJI_TRANS=1,
|
||||||
|
AJI_UTRANS=2
|
||||||
|
};
|
||||||
|
|
||||||
|
enum aji_type {
|
||||||
|
AJI_COMPONENT,
|
||||||
|
AJI_CLIENT,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct aji_version {
|
||||||
|
char version[50];
|
||||||
|
int jingle;
|
||||||
|
struct aji_capabilities *parent;
|
||||||
|
struct aji_version *next;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct aji_capabilities {
|
||||||
|
char node[200];
|
||||||
|
struct aji_version *versions;
|
||||||
|
struct aji_capabilities *next;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct aji_resource {
|
||||||
|
int status;
|
||||||
|
char resource[80];
|
||||||
|
char description[1000];
|
||||||
|
struct aji_version *cap;
|
||||||
|
int priority;
|
||||||
|
struct aji_resource *next;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct aji_buddy {
|
||||||
|
ASTOBJ_COMPONENTS(struct aji_buddy);
|
||||||
|
char user[160];
|
||||||
|
char host[160];
|
||||||
|
char pass[160]; /*For Transports*/
|
||||||
|
char server[160]; /*For Transports */
|
||||||
|
char channel[160];
|
||||||
|
struct aji_resource *resources;
|
||||||
|
enum aji_btype btype;
|
||||||
|
unsigned int flags;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct aji_buddy_container {
|
||||||
|
ASTOBJ_CONTAINER_COMPONENTS(struct aji_buddy);
|
||||||
|
};
|
||||||
|
|
||||||
|
struct aji_transport_container {
|
||||||
|
ASTOBJ_CONTAINER_COMPONENTS(struct aji_transport);
|
||||||
|
};
|
||||||
|
|
||||||
|
struct aji_client {
|
||||||
|
ASTOBJ_COMPONENTS(struct aji_client);
|
||||||
|
char password[160];
|
||||||
|
char user[160];
|
||||||
|
char serverhost[160];
|
||||||
|
char context[100];
|
||||||
|
char sid[10]; /* Session ID */
|
||||||
|
char mid[6]; /* Message ID */
|
||||||
|
iksid *jid;
|
||||||
|
iksparser *p;
|
||||||
|
iksfilter *f;
|
||||||
|
ikstack *stack;
|
||||||
|
enum aji_state state;
|
||||||
|
int port;
|
||||||
|
int debug;
|
||||||
|
int usetls;
|
||||||
|
int forcessl;
|
||||||
|
int usesasl;
|
||||||
|
int keepalive;
|
||||||
|
int allowguest;
|
||||||
|
int timeout;
|
||||||
|
int authorized;
|
||||||
|
unsigned int flags;
|
||||||
|
enum aji_type component;
|
||||||
|
struct aji_buddy_container buddies;
|
||||||
|
void *jingle;
|
||||||
|
pthread_t thread;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct aji_client_container{
|
||||||
|
ASTOBJ_CONTAINER_COMPONENTS(struct aji_client);
|
||||||
|
};
|
||||||
|
|
||||||
|
int ast_aji_send(struct aji_client *client, char *address, char *message);
|
||||||
|
int ast_aji_disconnect(struct aji_client *client);
|
||||||
|
int ast_aji_check_roster(void);
|
||||||
|
void ast_aji_increment_mid(char *mid);
|
||||||
|
int ast_aji_create_chat(struct aji_client *client,char *room, char *server, char *topic);
|
||||||
|
int ast_aji_invite_chat(struct aji_client *client, char *user, char *room, char *message);
|
||||||
|
int ast_aji_join_chat(struct aji_client *client,char *room);
|
||||||
|
struct aji_client *ast_aji_get_client(char *name);
|
||||||
|
struct aji_client_container *ast_aji_get_clients(void);
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,45 @@
|
|||||||
|
/*
|
||||||
|
* Asterisk -- An open source telephony toolkit.
|
||||||
|
*
|
||||||
|
* Copyright (C) 1999 - 2005, Digium, Inc.
|
||||||
|
*
|
||||||
|
* Matt O'Gorman <mogorman@digium.com>
|
||||||
|
*
|
||||||
|
* See http://www.asterisk.org for more information about
|
||||||
|
* the Asterisk project. Please do not directly contact
|
||||||
|
* any of the maintainers of this project for assistance;
|
||||||
|
* the project provides a web site, mailing lists and IRC
|
||||||
|
* channels for your use.
|
||||||
|
*
|
||||||
|
* This program is free software, distributed under the terms of
|
||||||
|
* the GNU General Public License Version 2. See the LICENSE file
|
||||||
|
* at the top of the source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _ASTERISK_JINGLE_H
|
||||||
|
#define _ASTERISK_JINGLE_H
|
||||||
|
|
||||||
|
#include <iksemel.h>
|
||||||
|
#include "asterisk/astobj.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* Jingle Constants */
|
||||||
|
|
||||||
|
#define JINGLE_NODE "jingle"
|
||||||
|
#define GOOGLE_NODE "session"
|
||||||
|
|
||||||
|
#define JINGLE_NS "http://jabber.org/protocol/jingle"
|
||||||
|
#define GOOGLE_NS "http://www.google.com/session"
|
||||||
|
|
||||||
|
#define JINGLE_SID "sid"
|
||||||
|
#define GOOGLE_SID "id"
|
||||||
|
|
||||||
|
#define JINGLE_INITIATE "initiate"
|
||||||
|
|
||||||
|
#define JINGLE_ACCEPT "accept"
|
||||||
|
#define GOOGLE_ACCEPT "accept"
|
||||||
|
|
||||||
|
#define JINGLE_NEGOTIATE "negotiate"
|
||||||
|
#define GOOGLE_NEGOTIATE "candidates"
|
||||||
|
|
||||||
|
#endif
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue