[svn-commits] irroot: branch irroot/t38gateway-trunk r321674 - in /team/irroot/t38gateway-t...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri Jun 3 04:53:27 CDT 2011
Author: irroot
Date: Fri Jun 3 04:53:22 2011
New Revision: 321674
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=321674
Log:
automerge enable
Added:
team/irroot/t38gateway-trunk/include/asterisk/message.h
- copied unchanged from r321617, trunk/include/asterisk/message.h
team/irroot/t38gateway-trunk/main/message.c
- copied unchanged from r321617, trunk/main/message.c
Modified:
team/irroot/t38gateway-trunk/ (props changed)
team/irroot/t38gateway-trunk/CHANGES
team/irroot/t38gateway-trunk/addons/chan_ooh323.c
team/irroot/t38gateway-trunk/addons/ooh323c/src/oochannels.c
team/irroot/t38gateway-trunk/addons/ooh323c/src/ooh245.c
team/irroot/t38gateway-trunk/apps/app_voicemail.c
team/irroot/t38gateway-trunk/cel/cel_odbc.c (props changed)
team/irroot/t38gateway-trunk/configs/cel_odbc.conf.sample (props changed)
team/irroot/t38gateway-trunk/configs/jabber.conf.sample
team/irroot/t38gateway-trunk/configs/sip.conf.sample
team/irroot/t38gateway-trunk/include/asterisk/_private.h
team/irroot/t38gateway-trunk/include/asterisk/acl.h
team/irroot/t38gateway-trunk/include/asterisk/channel.h
team/irroot/t38gateway-trunk/include/asterisk/dnsmgr.h
team/irroot/t38gateway-trunk/include/asterisk/jabber.h
team/irroot/t38gateway-trunk/main/asterisk.c
team/irroot/t38gateway-trunk/main/cdr.c
team/irroot/t38gateway-trunk/main/channel.c
team/irroot/t38gateway-trunk/res/res_jabber.c
team/irroot/t38gateway-trunk/sounds/Makefile (props changed)
Propchange: team/irroot/t38gateway-trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Propchange: team/irroot/t38gateway-trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jun 3 04:53:22 2011
@@ -1,2 +1,3 @@
/team/irroot/distrotech-customers-1.8:319062
/team/irroot/distrotech-customers-trunk:320771
+/trunk:321462-321617
Modified: team/irroot/t38gateway-trunk/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-trunk/CHANGES?view=diff&rev=321674&r1=321673&r2=321674
==============================================================================
--- team/irroot/t38gateway-trunk/CHANGES (original)
+++ team/irroot/t38gateway-trunk/CHANGES Fri Jun 3 04:53:22 2011
@@ -11,6 +11,19 @@
------------------------------------------------------------------------------
--- Functionality changes from Asterisk 1.8 to Asterisk 1.10 -----------------
------------------------------------------------------------------------------
+
+Text Messaging
+--------------
+ * Asterisk now has protocol independent support for processing text messages
+ outside of a call. Messages are routed through the Asterisk dialplan.
+ SIP MESSAGE and XMPP are currently supported. There are options in
+ jabber.conf and sip.conf to allow enabling these features.
+ -> jabber.conf: see the "sendtodialplan" and "context" options.
+ -> sip.conf: see the "accept_outofcall_message" and "auth_message_requests"
+ options.
+ The MESSAGE() dialplan function and MessageSend() application have been
+ added to go along with this functionality. More detailed usage information
+ can be found on the Asterisk wiki (http://wiki.asterisk.org/).
Parking
-------
Modified: team/irroot/t38gateway-trunk/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-trunk/addons/chan_ooh323.c?view=diff&rev=321674&r1=321673&r2=321674
==============================================================================
--- team/irroot/t38gateway-trunk/addons/chan_ooh323.c (original)
+++ team/irroot/t38gateway-trunk/addons/chan_ooh323.c Fri Jun 3 04:53:22 2011
@@ -1093,6 +1093,7 @@
static int ooh323_answer(struct ast_channel *ast)
{
struct ooh323_pvt *p = ast->tech_pvt;
+ char *callToken = (char *)NULL;
if (gH323Debug)
ast_verbose("--- ooh323_answer\n");
@@ -1100,8 +1101,18 @@
if (p) {
ast_mutex_lock(&p->lock);
+ callToken = (p->callToken ? strdup(p->callToken) : NULL);
if (ast->_state != AST_STATE_UP) {
ast_channel_lock(ast);
+ if (!p->alertsent) {
+ if (gH323Debug) {
+ ast_debug(1, "Sending forced ringback for %s, res = %d\n",
+ callToken, ooManualRingback(callToken));
+ } else {
+ ooManualRingback(callToken);
+ }
+ p->alertsent = 1;
+ }
ast_setstate(ast, AST_STATE_UP);
if (option_debug)
ast_debug(1, "ooh323_answer(%s)\n", ast->name);
@@ -1269,6 +1280,7 @@
}
p->alertsent = 1;
}
+ p->alertsent = 1;
}
break;
case AST_CONTROL_SRCUPDATE:
Modified: team/irroot/t38gateway-trunk/addons/ooh323c/src/oochannels.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-trunk/addons/ooh323c/src/oochannels.c?view=diff&rev=321674&r1=321673&r2=321674
==============================================================================
--- team/irroot/t38gateway-trunk/addons/ooh323c/src/oochannels.c (original)
+++ team/irroot/t38gateway-trunk/addons/ooh323c/src/oochannels.c Fri Jun 3 04:53:22 2011
@@ -682,10 +682,11 @@
if (0 != call->pH245Channel && 0 != call->pH245Channel->sock)
{
- if(call->pH245Channel->outQueue.count>0)
- {
- if(ooPDWrite(pfds, nfds, call->pH245Channel->sock))
- ooSendMsg(call, OOH245MSG);
+ if(ooPDWrite(pfds, nfds, call->pH245Channel->sock)) {
+ while (call->pH245Channel->outQueue.count>0) {
+ if (ooSendMsg(call, OOH245MSG) != OO_OK)
+ break;
+ }
}
}
else if(call->h245listener)
@@ -702,20 +703,23 @@
{
if(ooPDWrite(pfds, nfds, call->pH225Channel->sock))
{
- if(call->pH225Channel->outQueue.count>0)
+ while (call->pH225Channel->outQueue.count>0)
{
OOTRACEDBGC3("Sending H225 message (%s, %s)\n",
call->callType, call->callToken);
- ooSendMsg(call, OOQ931MSG);
+ if (ooSendMsg(call, OOQ931MSG) != OO_OK)
+ break;
}
if(call->pH245Channel &&
call->pH245Channel->outQueue.count>0 &&
- OO_TESTFLAG (call->flags, OO_M_TUNNELING))
- {
+ OO_TESTFLAG (call->flags, OO_M_TUNNELING)) {
+ while (call->pH245Channel->outQueue.count>0) {
OOTRACEDBGC3("H245 message needs to be tunneled. "
"(%s, %s)\n", call->callType,
call->callToken);
- ooSendMsg(call, OOH245MSG);
+ if (ooSendMsg(call, OOH245MSG) != OO_OK)
+ break;
+ }
}
}
}
@@ -1330,7 +1334,7 @@
{
OOTRACEDBGA3("Warning:Call marked for cleanup. Can not send message."
"(%s, %s)\n", call->callType, call->callToken);
- return OO_OK;
+ return OO_FAILED;
}
if(type == OOQ931MSG)
Modified: team/irroot/t38gateway-trunk/addons/ooh323c/src/ooh245.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-trunk/addons/ooh323c/src/ooh245.c?view=diff&rev=321674&r1=321673&r2=321674
==============================================================================
--- team/irroot/t38gateway-trunk/addons/ooh323c/src/ooh245.c (original)
+++ team/irroot/t38gateway-trunk/addons/ooh323c/src/ooh245.c Fri Jun 3 04:53:22 2011
@@ -2126,6 +2126,8 @@
ooClearAllLogicalChannels(call);
}
ooSendEndSessionCommand(call);
+ if (call->callState < OO_CALL_CLEAR)
+ call->callState = OO_CALL_CLEAR;
}
Modified: team/irroot/t38gateway-trunk/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-trunk/apps/app_voicemail.c?view=diff&rev=321674&r1=321673&r2=321674
==============================================================================
--- team/irroot/t38gateway-trunk/apps/app_voicemail.c (original)
+++ team/irroot/t38gateway-trunk/apps/app_voicemail.c Fri Jun 3 04:53:22 2011
@@ -2177,11 +2177,16 @@
int ret; /* for better error checking */
char *imap_flags = NIL;
int msgcount = (messagecount(vmu->context, vmu->mailbox, "INBOX") + messagecount(vmu->context, vmu->mailbox, "Old"));
-
- /* Back out early if this is a greeting and we don't want to store greetings in IMAP */
- if (msgnum < 0 && !imapgreetings) {
- return 0;
- }
+ int box = NEW_FOLDER;
+
+ /* Back out early if this is a greeting and we don't want to store greetings in IMAP */
+ if (msgnum < 0) {
+ if(!imapgreetings) {
+ return 0;
+ } else {
+ box = GREETINGS_FOLDER;
+ }
+ }
if (imap_check_limits(chan, vms, vmu, msgcount)) {
return -1;
@@ -2264,9 +2269,9 @@
}
((char *) buf)[len] = '\0';
INIT(&str, mail_string, buf, len);
- ret = init_mailstream(vms, NEW_FOLDER);
+ ret = init_mailstream(vms, box);
if (ret == 0) {
- imap_mailbox_name(mailbox, sizeof(mailbox), vms, NEW_FOLDER, 1);
+ imap_mailbox_name(mailbox, sizeof(mailbox), vms, box, 1);
ast_mutex_lock(&vms->lock);
if(!mail_append_full(vms->mailstream, mailbox, imap_flags, NIL, &str))
ast_log(LOG_ERROR, "Error while sending the message to %s\n", mailbox);
Propchange: team/irroot/t38gateway-trunk/cel/cel_odbc.c
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jun 3 04:53:22 2011
@@ -1,3 +1,4 @@
/be/branches/C.3/cel/cel_adaptive_odbc.c:256426
/team/irroot/distrotech-customers-1.8/cel/cel_odbc.c:319062
/team/irroot/distrotech-customers-trunk/cel/cel_odbc.c:320771
+/trunk/cel/cel_odbc.c:321462-321617
Propchange: team/irroot/t38gateway-trunk/configs/cel_odbc.conf.sample
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jun 3 04:53:22 2011
@@ -1,3 +1,4 @@
/be/branches/C.3/configs/cel_adaptive_odbc.conf.sample:256426
/team/irroot/distrotech-customers-1.8/configs/cel_odbc.conf.sample:319062
/team/irroot/distrotech-customers-trunk/configs/cel_odbc.conf.sample:320771
+/trunk/configs/cel_odbc.conf.sample:321462-321617
Modified: team/irroot/t38gateway-trunk/configs/jabber.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-trunk/configs/jabber.conf.sample?view=diff&rev=321674&r1=321673&r2=321674
==============================================================================
--- team/irroot/t38gateway-trunk/configs/jabber.conf.sample (original)
+++ team/irroot/t38gateway-trunk/configs/jabber.conf.sample Fri Jun 3 04:53:22 2011
@@ -34,3 +34,6 @@
; Messages stored longer than this value will be deleted by Asterisk.
; This option applies to incoming messages only, which are intended to
; be processed by the JABBER_RECEIVE dialplan function.
+;sendtodialplan=yes ; Send incoming messages into the dialplan. Off by default.
+;context=messages ; Dialplan context to send incoming messages to. If not set,
+ ; "default" will be used.
Modified: team/irroot/t38gateway-trunk/configs/sip.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-trunk/configs/sip.conf.sample?view=diff&rev=321674&r1=321673&r2=321674
==============================================================================
--- team/irroot/t38gateway-trunk/configs/sip.conf.sample (original)
+++ team/irroot/t38gateway-trunk/configs/sip.conf.sample Fri Jun 3 04:53:22 2011
@@ -384,6 +384,16 @@
;auth_options_requests = yes ; Enabling this option will authenticate OPTIONS requests just like
; INVITE requests are. By default this option is disabled.
+
+;accept_outofcall_message = no ; Disable this option to reject all MESSAGE requests outside of a
+ ; call. By default, this option is enabled. When enabled, MESSAGE
+ ; requests are passed in to the dialplan.
+
+;auth_message_requests = yes ; Enabling this option will authenticate MESSAGE requests.
+ ; By default this option is enabled. However, it can be disabled
+ ; should an application desire to not load the Asterisk server with
+ ; doing authentication and implement end to end security in the
+ ; message body.
;g726nonstandard = yes ; If the peer negotiates G726-32 audio, use AAL2 packing
; order instead of RFC3551 packing order (this is required
Modified: team/irroot/t38gateway-trunk/include/asterisk/_private.h
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-trunk/include/asterisk/_private.h?view=diff&rev=321674&r1=321673&r2=321674
==============================================================================
--- team/irroot/t38gateway-trunk/include/asterisk/_private.h (original)
+++ team/irroot/t38gateway-trunk/include/asterisk/_private.h Fri Jun 3 04:53:22 2011
@@ -47,6 +47,7 @@
int ast_cel_engine_reload(void); /*!< Provided by cel.c */
int ast_ssl_init(void); /*!< Provided by ssl.c */
int ast_test_init(void); /*!< Provided by test.c */
+int ast_msg_init(void); /*!< Provided by message.c */
/*!
* \brief Reload asterisk modules.
Modified: team/irroot/t38gateway-trunk/include/asterisk/acl.h
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-trunk/include/asterisk/acl.h?view=diff&rev=321674&r1=321673&r2=321674
==============================================================================
--- team/irroot/t38gateway-trunk/include/asterisk/acl.h (original)
+++ team/irroot/t38gateway-trunk/include/asterisk/acl.h Fri Jun 3 04:53:22 2011
@@ -143,7 +143,7 @@
* then this function acts exactly like a call to ast_get_ip.
*
* \param addr The IP address found. The address family is used as an input parameter to
- * filter the returned adresses. if it is 0, both IPv4 and IPv6 addresses
+ * filter the returned addresses. if it is 0, both IPv4 and IPv6 addresses
* can be returned.
*
* \param value The hostname to look up
Modified: team/irroot/t38gateway-trunk/include/asterisk/channel.h
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-trunk/include/asterisk/channel.h?view=diff&rev=321674&r1=321673&r2=321674
==============================================================================
--- team/irroot/t38gateway-trunk/include/asterisk/channel.h (original)
+++ team/irroot/t38gateway-trunk/include/asterisk/channel.h Fri Jun 3 04:53:22 2011
@@ -3496,4 +3496,14 @@
}
#endif
+/*!
+ * \brief Remove a channel from the global channels container
+ *
+ * \param chan channel to remove
+ *
+ * In a case where it is desired that a channel not be available in any lookups
+ * in the global channels conatiner, use this function.
+ */
+void ast_channel_unlink(struct ast_channel *chan);
+
#endif /* _ASTERISK_CHANNEL_H */
Modified: team/irroot/t38gateway-trunk/include/asterisk/dnsmgr.h
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-trunk/include/asterisk/dnsmgr.h?view=diff&rev=321674&r1=321673&r2=321674
==============================================================================
--- team/irroot/t38gateway-trunk/include/asterisk/dnsmgr.h (original)
+++ team/irroot/t38gateway-trunk/include/asterisk/dnsmgr.h Fri Jun 3 04:53:22 2011
@@ -68,11 +68,13 @@
* \brief Allocate and initialize a DNS manager entry
*
* \param name the hostname
- * \param result where to store the IP address as the DNS manager refreshes it. The address family
- * is used as an input parameter to filter the returned adresses. if it is 0, both IPv4 * and IPv6 addresses can be returned.
+ * \param result where to store the IP address as the DNS manager refreshes it.
+ * The address family is used as an input parameter to filter the returned addresses.
+ * If it is 0, both IPv4 and IPv6 addresses can be returned.
* \param dnsmgr Where to store the allocate DNS manager entry
* \param service
*
+ * \note
* This function allocates a new DNS manager entry object, and fills it with
* the provided hostname and IP address. This function _does_ force an initial
* lookup, so it may block for some period of time.
Modified: team/irroot/t38gateway-trunk/include/asterisk/jabber.h
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-trunk/include/asterisk/jabber.h?view=diff&rev=321674&r1=321673&r2=321674
==============================================================================
--- team/irroot/t38gateway-trunk/include/asterisk/jabber.h (original)
+++ team/irroot/t38gateway-trunk/include/asterisk/jabber.h Fri Jun 3 04:53:22 2011
@@ -157,6 +157,7 @@
char name_space[256];
char sid[10]; /* Session ID */
char mid[6]; /* Message ID */
+ char context[AST_MAX_CONTEXT];
iksid *jid;
iksparser *p;
iksfilter *f;
@@ -179,6 +180,7 @@
int message_timeout;
int authorized;
int distribute_events;
+ int send_to_dialplan;
struct ast_flags flags;
int component; /* 0 client, 1 component */
struct aji_buddy_container buddies;
Modified: team/irroot/t38gateway-trunk/main/asterisk.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-trunk/main/asterisk.c?view=diff&rev=321674&r1=321673&r2=321674
==============================================================================
--- team/irroot/t38gateway-trunk/main/asterisk.c (original)
+++ team/irroot/t38gateway-trunk/main/asterisk.c Fri Jun 3 04:53:22 2011
@@ -3750,6 +3750,11 @@
ast_xmldoc_load_documentation();
#endif
+ if (ast_msg_init()) {
+ printf("%s", term_quit());
+ exit(1);
+ }
+
/* initialize the data retrieval API */
if (ast_data_init()) {
printf ("%s", term_quit());
Modified: team/irroot/t38gateway-trunk/main/cdr.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-trunk/main/cdr.c?view=diff&rev=321674&r1=321673&r2=321674
==============================================================================
--- team/irroot/t38gateway-trunk/main/cdr.c (original)
+++ team/irroot/t38gateway-trunk/main/cdr.c Fri Jun 3 04:53:22 2011
@@ -111,14 +111,16 @@
AST_MUTEX_DEFINE_STATIC(cdr_pending_lock);
static ast_cond_t cdr_pending_cond;
-int check_cdr_enabled()
+int check_cdr_enabled(void)
{
return enabled;
}
-/*! Register a CDR driver. Each registered CDR driver generates a CDR
- \return 0 on success, -1 on failure
-*/
+/*!
+ * \brief Register a CDR driver. Each registered CDR driver generates a CDR
+ * \retval 0 on success.
+ * \retval -1 on error
+ */
int ast_cdr_register(const char *name, const char *desc, ast_cdrbe be)
{
struct ast_cdr_beitem *i = NULL;
Modified: team/irroot/t38gateway-trunk/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-trunk/main/channel.c?view=diff&rev=321674&r1=321673&r2=321674
==============================================================================
--- team/irroot/t38gateway-trunk/main/channel.c (original)
+++ team/irroot/t38gateway-trunk/main/channel.c Fri Jun 3 04:53:22 2011
@@ -9593,3 +9593,8 @@
return result;
}
+
+void ast_channel_unlink(struct ast_channel *chan)
+{
+ ao2_unlink(channels, chan);
+}
Modified: team/irroot/t38gateway-trunk/res/res_jabber.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-trunk/res/res_jabber.c?view=diff&rev=321674&r1=321673&r2=321674
==============================================================================
--- team/irroot/t38gateway-trunk/res/res_jabber.c (original)
+++ team/irroot/t38gateway-trunk/res/res_jabber.c Fri Jun 3 04:53:22 2011
@@ -60,6 +60,7 @@
#include "asterisk/manager.h"
#include "asterisk/event.h"
#include "asterisk/devicestate.h"
+#include "asterisk/message.h"
/*** DOCUMENTATION
<application name="JabberSend" language="en_US">
@@ -373,6 +374,13 @@
static int aji_register_transport2(void *data, ikspak *pak);
*/
+static int msg_send_cb(const struct ast_msg *msg, const char *to, const char *from);
+
+static const struct ast_msg_tech msg_tech = {
+ .name = "xmpp",
+ .msg_send = msg_send_cb,
+};
+
static struct ast_cli_entry aji_cli[] = {
AST_CLI_DEFINE(aji_do_set_debug, "Enable/Disable Jabber debug"),
AST_CLI_DEFINE(aji_do_reload, "Reload Jabber configuration"),
@@ -1134,6 +1142,44 @@
ast_aji_send_chat(client, args.recipient, args.message);
}
return 0;
+}
+
+static int msg_send_cb(const struct ast_msg *msg, const char *to, const char *from)
+{
+ struct aji_client *client;
+ char *sender;
+ char *dest;
+ int res;
+
+ sender = ast_strdupa(from);
+ strsep(&sender, ":");
+ dest = ast_strdupa(to);
+ strsep(&dest, ":");
+
+ if (ast_strlen_zero(sender)) {
+ ast_log(LOG_ERROR, "MESSAGE(from) of '%s' invalid for xmpp\n", from);
+ return -1;
+ }
+
+ if (!(client = ast_aji_get_client(sender))) {
+ ast_log(LOG_WARNING, "Could not finder account to send from as '%s'\n", sender);
+ return -1;
+ }
+
+
+ ast_debug(1, "Sending message to '%s' from '%s'\n", dest, client->name);
+
+ res = ast_aji_send_chat(client, dest, ast_msg_get_body(msg));
+ if (res != IKS_OK) {
+ ast_log(LOG_WARNING, "Failed to send xmpp message (%d).\n", res);
+ }
+
+ /*
+ * XXX Reference leak here. See note with ast_aji_get_client() about the problems
+ * with that function.
+ */
+
+ return res == IKS_OK ? 0 : -1;
}
/*!
@@ -2218,6 +2264,7 @@
{
struct aji_message *insert;
int deleted = 0;
+ struct ast_msg *msg;
ast_debug(3, "client %s received a message\n", client->name);
@@ -2246,6 +2293,23 @@
return;
}
ast_debug(3, "message comes from %s\n", insert->from);
+ }
+
+ if ((msg = ast_msg_alloc())) {
+ int res;
+
+ res = ast_msg_set_to(msg, "xmpp:%s", client->user);
+ res |= ast_msg_set_from(msg, "xmpp:%s", insert->from);
+ res |= ast_msg_set_body(msg, "%s", insert->message);
+ res |= ast_msg_set_context(msg, "%s", client->context);
+
+ if (res) {
+ ast_msg_destroy(msg);
+ } else {
+ ast_msg_queue(msg);
+ }
+
+ msg = NULL;
}
/* remove old messages received from this JID
@@ -4248,6 +4312,7 @@
ASTOBJ_CONTAINER_MARKALL(&client->buddies);
ast_copy_string(client->name, label, sizeof(client->name));
ast_copy_string(client->mid, "aaaaa", sizeof(client->mid));
+ ast_copy_string(client->context, "default", sizeof(client->context));
/* Set default values for the client object */
client->debug = debug;
@@ -4265,6 +4330,7 @@
ast_copy_string(client->statusmessage, "Online and Available", sizeof(client->statusmessage));
client->priority = 0;
client->status = IKS_SHOW_AVAILABLE;
+ client->send_to_dialplan = 0;
if (flag) {
client->authorized = 0;
@@ -4356,6 +4422,10 @@
} else {
ast_log(LOG_WARNING, "Unknown presence status: %s\n", var->value);
}
+ } else if (!strcasecmp(var->name, "context")) {
+ ast_copy_string(client->context, var->value, sizeof(client->context));
+ } else if (!strcasecmp(var->name, "sendtodialplan")) {
+ client->send_to_dialplan = ast_true(var->value) ? 1 : 0;
}
/* no transport support in this version */
/* else if (!strcasecmp(var->name, "transport"))
@@ -4553,6 +4623,13 @@
* (without the resource string)
* \param name label or JID
* \return aji_client.
+ *
+ * XXX \bug This function leads to reference leaks all over the place.
+ * ASTOBJ_CONTAINER_FIND() returns a reference, but if the
+ * client is found via the traversal, no reference is returned.
+ * None of the calling code releases references. This code needs
+ * to be changed to always return a reference, and all of the users
+ * need to be fixed to release them.
*/
struct aji_client *ast_aji_get_client(const char *name)
{
@@ -4668,7 +4745,7 @@
*/
static int unload_module(void)
{
-
+ ast_msg_tech_unregister(&msg_tech);
ast_cli_unregister_multiple(aji_cli, ARRAY_LEN(aji_cli));
ast_unregister_application(app_ajisend);
ast_unregister_application(app_ajisendgroup);
@@ -4721,6 +4798,7 @@
ast_cli_register_multiple(aji_cli, ARRAY_LEN(aji_cli));
ast_custom_function_register(&jabberstatus_function);
ast_custom_function_register(&jabberreceive_function);
+ ast_msg_tech_register(&msg_tech);
ast_mutex_init(&messagelock);
ast_cond_init(&message_received_condition, NULL);
Propchange: team/irroot/t38gateway-trunk/sounds/Makefile
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jun 3 04:53:22 2011
@@ -1,4 +1,4 @@
/be/branches/C.3/sounds/Makefile:256426
/team/irroot/distrotech-customers-1.8/sounds/Makefile:319062
/team/irroot/distrotech-customers-trunk/sounds/Makefile:320771
-/trunk/sounds/Makefile:270974
+/trunk/sounds/Makefile:270974,321462-321617
More information about the svn-commits
mailing list