[asterisk-commits] russell: branch russell/chan_refcount r89498 - in /team/russell/chan_refcount...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Nov 21 13:33:59 CST 2007
Author: russell
Date: Wed Nov 21 13:33:58 2007
New Revision: 89498
URL: http://svn.digium.com/view/asterisk?view=rev&rev=89498
Log:
sync another 500 revisions ...
Modified:
team/russell/chan_refcount/ (props changed)
team/russell/chan_refcount/CHANGES
team/russell/chan_refcount/Makefile
team/russell/chan_refcount/Makefile.moddir_rules
team/russell/chan_refcount/UPGRADE.txt
team/russell/chan_refcount/agi/ (props changed)
team/russell/chan_refcount/agi/Makefile
team/russell/chan_refcount/apps/ (props changed)
team/russell/chan_refcount/apps/app_meetme.c
team/russell/chan_refcount/apps/app_queue.c
team/russell/chan_refcount/apps/app_record.c
team/russell/chan_refcount/apps/app_voicemail.c
team/russell/chan_refcount/cdr/ (props changed)
team/russell/chan_refcount/channels/ (props changed)
team/russell/chan_refcount/channels/chan_agent.c
team/russell/chan_refcount/channels/chan_features.c
team/russell/chan_refcount/channels/chan_local.c
team/russell/chan_refcount/channels/chan_misdn.c
team/russell/chan_refcount/channels/chan_sip.c
team/russell/chan_refcount/channels/chan_zap.c
team/russell/chan_refcount/codecs/ (props changed)
team/russell/chan_refcount/codecs/g722/ (props changed)
team/russell/chan_refcount/codecs/g722/Makefile
team/russell/chan_refcount/codecs/gsm/ (props changed)
team/russell/chan_refcount/codecs/ilbc/ (props changed)
team/russell/chan_refcount/codecs/ilbc/Makefile
team/russell/chan_refcount/codecs/lpc10/ (props changed)
team/russell/chan_refcount/codecs/lpc10/Makefile
team/russell/chan_refcount/configure
team/russell/chan_refcount/configure.ac
team/russell/chan_refcount/formats/ (props changed)
team/russell/chan_refcount/funcs/ (props changed)
team/russell/chan_refcount/funcs/func_cut.c
team/russell/chan_refcount/funcs/func_lock.c
team/russell/chan_refcount/funcs/func_odbc.c
team/russell/chan_refcount/funcs/func_realtime.c
team/russell/chan_refcount/funcs/func_shell.c
team/russell/chan_refcount/funcs/func_strings.c
team/russell/chan_refcount/include/asterisk/autoconfig.h.in
team/russell/chan_refcount/include/asterisk/lock.h
team/russell/chan_refcount/main/ (props changed)
team/russell/chan_refcount/main/astmm.c
team/russell/chan_refcount/main/db1-ast/ (props changed)
team/russell/chan_refcount/main/db1-ast/Makefile
team/russell/chan_refcount/main/editline/ (props changed)
team/russell/chan_refcount/main/editline/Makefile.in
team/russell/chan_refcount/main/minimime/ (props changed)
team/russell/chan_refcount/main/rtp.c
team/russell/chan_refcount/main/utils.c
team/russell/chan_refcount/pbx/ (props changed)
team/russell/chan_refcount/res/ (props changed)
team/russell/chan_refcount/res/res_crypto.c
team/russell/chan_refcount/res/res_monitor.c
team/russell/chan_refcount/res/res_realtime.c
team/russell/chan_refcount/utils/ (props changed)
team/russell/chan_refcount/utils/Makefile
team/russell/chan_refcount/utils/hashtest2.c
Propchange: team/russell/chan_refcount/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.
Propchange: team/russell/chan_refcount/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Propchange: team/russell/chan_refcount/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Nov 21 13:33:58 2007
@@ -1,1 +1,1 @@
-/trunk:1-87200
+/trunk:1-87500
Modified: team/russell/chan_refcount/CHANGES
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/CHANGES?view=diff&rev=89498&r1=89497&r2=89498
==============================================================================
--- team/russell/chan_refcount/CHANGES (original)
+++ team/russell/chan_refcount/CHANGES Wed Nov 21 13:33:58 2007
@@ -165,6 +165,7 @@
* Added additional information to EXITWITHTIMEOUT and EXITWITHKEY events in the
queue log.
* Added ability for non-realtime queues to have realtime members
+ * Added the "linear" strategy to queues.
MeetMe Changes
--------------
Modified: team/russell/chan_refcount/Makefile
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/Makefile?view=diff&rev=89498&r1=89497&r2=89498
==============================================================================
--- team/russell/chan_refcount/Makefile (original)
+++ team/russell/chan_refcount/Makefile Wed Nov 21 13:33:58 2007
@@ -200,7 +200,11 @@
endif
endif
-ASTCFLAGS+=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG)
+ifeq ($(findstring -save-temps,$(ASTCFLAGS)),)
+ASTCFLAGS+=-pipe
+endif
+
+ASTCFLAGS+=-Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG)
ASTCFLAGS+=-include $(ASTTOPDIR)/include/asterisk/autoconfig.h
Modified: team/russell/chan_refcount/Makefile.moddir_rules
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/Makefile.moddir_rules?view=diff&rev=89498&r1=89497&r2=89498
==============================================================================
--- team/russell/chan_refcount/Makefile.moddir_rules (original)
+++ team/russell/chan_refcount/Makefile.moddir_rules Wed Nov 21 13:33:58 2007
@@ -74,6 +74,7 @@
clean::
rm -f *.so *.o *.oo *.eo *.eoo
rm -f .*.o.d .*.oo.d
+ rm -f *.s *.i
rm -f modules.link
install:: all
Modified: team/russell/chan_refcount/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/UPGRADE.txt?view=diff&rev=89498&r1=89497&r2=89498
==============================================================================
--- team/russell/chan_refcount/UPGRADE.txt (original)
+++ team/russell/chan_refcount/UPGRADE.txt Wed Nov 21 13:33:58 2007
@@ -79,6 +79,11 @@
these functions in any location where you desire to ensure that only one
channel is executing that path at any one time.
+Dialplan Functions:
+
+* QUEUE_MEMBER_COUNT() has been deprecated in favor of the QUEUE_MEMBER() function. For
+ more information, issue a "show function QUEUE_MEMBER" from the CLI.
+
CDR:
* The cdr_sqlite module has been marked as deprecated in favor of
Propchange: team/russell/chan_refcount/agi/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Nov 21 13:33:58 2007
@@ -1,3 +1,5 @@
+*.i
+*.s
eagi-test
eagi-sphinx-test
*.d
Modified: team/russell/chan_refcount/agi/Makefile
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/agi/Makefile?view=diff&rev=89498&r1=89497&r2=89498
==============================================================================
--- team/russell/chan_refcount/agi/Makefile (original)
+++ team/russell/chan_refcount/agi/Makefile Wed Nov 21 13:33:58 2007
@@ -40,6 +40,7 @@
clean:
rm -f *.so *.o look eagi-test eagi-sphinx-test
rm -f .*.o.d .*.oo.d
+ rm -f *.s *.i
rm -f strcompat.c
ifneq ($(wildcard .*.d),)
Propchange: team/russell/chan_refcount/apps/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Nov 21 13:33:58 2007
@@ -1,3 +1,5 @@
+*.i
+*.s
*.d
*.a
*.so
Modified: team/russell/chan_refcount/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/apps/app_meetme.c?view=diff&rev=89498&r1=89497&r2=89498
==============================================================================
--- team/russell/chan_refcount/apps/app_meetme.c (original)
+++ team/russell/chan_refcount/apps/app_meetme.c Wed Nov 21 13:33:58 2007
@@ -1803,7 +1803,7 @@
x = 1;
ast_channel_setoption(chan, AST_OPTION_TONE_VERIFY, &x, sizeof(char), 0);
}
- if (!(dsp = ast_dsp_new())) {
+ if (!(confflags & CONFFLAG_MONITOR) && !(dsp = ast_dsp_new())) {
ast_log(LOG_WARNING, "Unable to allocate DSP!\n");
res = -1;
}
@@ -2060,7 +2060,7 @@
if (user->talk.actual)
ast_frame_adjust_volume(f, user->talk.actual);
- {
+ if (!(confflags & CONFFLAG_MONITOR)) {
int totalsilence;
if (user->talking == -1)
Modified: team/russell/chan_refcount/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/apps/app_queue.c?view=diff&rev=89498&r1=89497&r2=89498
==============================================================================
--- team/russell/chan_refcount/apps/app_queue.c (original)
+++ team/russell/chan_refcount/apps/app_queue.c Wed Nov 21 13:33:58 2007
@@ -4033,6 +4033,67 @@
struct call_queue *q, tmpq;
struct member *m;
struct ao2_iterator mem_iter;
+ char *queuename, *option;
+
+ buf[0] = '\0';
+
+ if (ast_strlen_zero(data)) {
+ ast_log(LOG_ERROR, "%s requires an argument: queuename\n", cmd);
+ return -1;
+ }
+
+ queuename = data;
+ if ((option = strchr(data, ',')))
+ *option++ = '\0';
+ else
+ option = "logged";
+
+ ast_copy_string(tmpq.name, queuename, sizeof(tmpq.name));
+
+ if ((q = ao2_find(queues, &tmpq, OBJ_POINTER))) {
+ ao2_lock(q);
+ if(!strcasecmp(option, "logged")) {
+ mem_iter = ao2_iterator_init(q->members, 0);
+ while ((m = ao2_iterator_next(&mem_iter))) {
+ /* Count the agents who are logged in and presently answering calls */
+ if ((m->status != AST_DEVICE_UNAVAILABLE) && (m->status != AST_DEVICE_INVALID)) {
+ count++;
+ }
+ ao2_ref(m, -1);
+ }
+ } else if(!strcasecmp(option, "free")) {
+ mem_iter = ao2_iterator_init(q->members, 0);
+ while ((m = ao2_iterator_next(&mem_iter))) {
+ /* Count the agents who are logged in and presently answering calls */
+ if ((m->status == AST_DEVICE_NOT_INUSE) && (!m->paused)) {
+ count++;
+ }
+ ao2_ref(m, -1);
+ }
+ } else /* must be "count" */
+ count = q->membercount;
+ ao2_unlock(q);
+ queue_unref(q);
+ } else
+ ast_log(LOG_WARNING, "queue %s was not found\n", data);
+
+ snprintf(buf, len, "%d", count);
+
+ return 0;
+}
+
+static int queue_function_qac_dep(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
+{
+ int count = 0;
+ struct call_queue *q, tmpq;
+ struct member *m;
+ struct ao2_iterator mem_iter;
+ static int depflag = 1;
+ if(depflag)
+ {
+ depflag = 0;
+ ast_log(LOG_NOTICE, "The function QUEUE_MEMBER_COUNT has been deprecated in favor of the QUEUE_MEMBER function and will not be in further releases.\n");
+ }
buf[0] = '\0';
@@ -4062,6 +4123,7 @@
return 0;
}
+
static int queue_function_queuewaitingcount(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
{
@@ -4156,12 +4218,26 @@
};
static struct ast_custom_function queuemembercount_function = {
+ .name = "QUEUE_MEMBER",
+ .synopsis = "Count number of members answering a queue",
+ .syntax = "QUEUE_MEMBER(<queuename>, <option>)",
+ .desc =
+"Returns the number of members currently associated with the specified queue.\n"
+"One of three options may be passed to determine the count returned:\n"
+ "\"logged\" - Returns the number of logged-in members for the specified queue\n"
+ "\"free\" - Returns the number of logged-in members for the specified queue available to take a call\n"
+ "\"count\" - Returns the total number of members for the specified queue\n",
+ .read = queue_function_qac,
+};
+
+static struct ast_custom_function queuemembercount_dep = {
.name = "QUEUE_MEMBER_COUNT",
.synopsis = "Count number of members answering a queue",
.syntax = "QUEUE_MEMBER_COUNT(<queuename>)",
.desc =
-"Returns the number of members currently associated with the specified queue.\n",
- .read = queue_function_qac,
+"Returns the number of members currently associated with the specified queue.\n\n"
+"This function has been deprecated in favor of the QUEUE_MEMBER function\n",
+ .read = queue_function_qac_dep,
};
static struct ast_custom_function queuewaitingcount_function = {
@@ -5132,6 +5208,7 @@
res |= ast_unregister_application(app);
res |= ast_custom_function_unregister(&queuevar_function);
res |= ast_custom_function_unregister(&queuemembercount_function);
+ res |= ast_custom_function_unregister(&queuemembercount_dep);
res |= ast_custom_function_unregister(&queuememberlist_function);
res |= ast_custom_function_unregister(&queuewaitingcount_function);
@@ -5190,6 +5267,7 @@
res |= ast_manager_register("QueueLog", EVENT_FLAG_AGENT, manager_queue_log_custom, "Adds custom entry in queue_log");
res |= ast_custom_function_register(&queuevar_function);
res |= ast_custom_function_register(&queuemembercount_function);
+ res |= ast_custom_function_register(&queuemembercount_dep);
res |= ast_custom_function_register(&queuememberlist_function);
res |= ast_custom_function_register(&queuewaitingcount_function);
if (!(device_state_sub = ast_event_subscribe(AST_EVENT_DEVICE_STATE, device_state_cb, NULL, AST_EVENT_IE_END)))
Modified: team/russell/chan_refcount/apps/app_record.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/apps/app_record.c?view=diff&rev=89498&r1=89497&r2=89498
==============================================================================
--- team/russell/chan_refcount/apps/app_record.c (original)
+++ team/russell/chan_refcount/apps/app_record.c Wed Nov 21 13:33:58 2007
@@ -117,7 +117,7 @@
int ioflags;
int waitres;
struct ast_silence_generator *silgen = NULL;
- struct ast_flags flags;
+ struct ast_flags flags = { 0, };
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(filename);
AST_APP_ARG(silence);
Modified: team/russell/chan_refcount/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/apps/app_voicemail.c?view=diff&rev=89498&r1=89497&r2=89498
==============================================================================
--- team/russell/chan_refcount/apps/app_voicemail.c (original)
+++ team/russell/chan_refcount/apps/app_voicemail.c Wed Nov 21 13:33:58 2007
@@ -69,7 +69,6 @@
#include <errno.h>
#include <unistd.h>
#include <string.h>
-#include <stdlib.h>
#include <stdio.h>
#include <sys/time.h>
#include <sys/stat.h>
Propchange: team/russell/chan_refcount/cdr/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Nov 21 13:33:58 2007
@@ -1,3 +1,5 @@
+*.i
+*.s
*.d
*.a
*.so
Propchange: team/russell/chan_refcount/channels/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Nov 21 13:33:58 2007
@@ -1,3 +1,5 @@
+*.i
+*.s
*.d
*.a
*.so
Modified: team/russell/chan_refcount/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/channels/chan_agent.c?view=diff&rev=89498&r1=89497&r2=89498
==============================================================================
--- team/russell/chan_refcount/channels/chan_agent.c (original)
+++ team/russell/chan_refcount/channels/chan_agent.c Wed Nov 21 13:33:58 2007
@@ -2344,7 +2344,7 @@
/* Make sure we can register our agent channel type */
if (ast_channel_register(&agent_tech)) {
ast_log(LOG_ERROR, "Unable to register channel class 'Agent'\n");
- return -1;
+ return AST_MODULE_LOAD_FAILURE;
}
/* Read in the config */
if (!read_agent_config(0))
@@ -2365,7 +2365,7 @@
/* Dialplan Functions */
ast_custom_function_register(&agent_function);
- return 0;
+ return AST_MODULE_LOAD_SUCCESS;
}
static int reload(void)
Modified: team/russell/chan_refcount/channels/chan_features.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/channels/chan_features.c?view=diff&rev=89498&r1=89497&r2=89498
==============================================================================
--- team/russell/chan_refcount/channels/chan_features.c (original)
+++ team/russell/chan_refcount/channels/chan_features.c Wed Nov 21 13:33:58 2007
@@ -551,10 +551,10 @@
/* Make sure we can register our sip channel type */
if (ast_channel_register(&features_tech)) {
ast_log(LOG_ERROR, "Unable to register channel class 'Feature'\n");
- return -1;
+ return AST_MODULE_LOAD_FAILURE;
}
ast_cli_register_multiple(cli_features, sizeof(cli_features) / sizeof(struct ast_cli_entry));
- return 0;
+ return AST_MODULE_LOAD_SUCCESS;
}
static int unload_module(void)
Modified: team/russell/chan_refcount/channels/chan_local.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/channels/chan_local.c?view=diff&rev=89498&r1=89497&r2=89498
==============================================================================
--- team/russell/chan_refcount/channels/chan_local.c (original)
+++ team/russell/chan_refcount/channels/chan_local.c Wed Nov 21 13:33:58 2007
@@ -732,10 +732,10 @@
/* Make sure we can register our channel type */
if (ast_channel_register(&local_tech)) {
ast_log(LOG_ERROR, "Unable to register channel class 'Local'\n");
- return -1;
+ return AST_MODULE_LOAD_FAILURE;
}
ast_cli_register_multiple(cli_local, sizeof(cli_local) / sizeof(struct ast_cli_entry));
- return 0;
+ return AST_MODULE_LOAD_SUCCESS;
}
/*! \brief Unload the local proxy channel from Asterisk */
Modified: team/russell/chan_refcount/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/channels/chan_misdn.c?view=diff&rev=89498&r1=89497&r2=89498
==============================================================================
--- team/russell/chan_refcount/channels/chan_misdn.c (original)
+++ team/russell/chan_refcount/channels/chan_misdn.c Wed Nov 21 13:33:58 2007
@@ -452,13 +452,17 @@
static void print_facility(struct FacParm *fac, struct misdn_bchannel *bc)
{
switch (fac->Function) {
+#ifdef HAVE_MISDN_FAC_RESULT
case Fac_RESULT:
chan_misdn_log(0, bc->port," --> Received RESULT Operation\n");
break;
+#endif
+#ifdef HAVE_MISDN_FAC_ERROR
case Fac_ERROR:
chan_misdn_log(0, bc->port," --> Received Error Operation\n");
chan_misdn_log(0, bc->port," --> Value:%d Error:%s\n",fac->u.ERROR.errorValue, fac->u.ERROR.error);
break;
+#endif
case Fac_CD:
chan_misdn_log(1,bc->port," --> calldeflect to: %s, screened: %s\n", fac->u.CDeflection.DeflectedToNumber,
fac->u.CDeflection.PresentationAllowed ? "yes" : "no");
@@ -4886,8 +4890,10 @@
print_facility(&(bc->fac_in), bc);
switch (bc->fac_in.Function) {
+#ifdef HAVE_MISDN_FAC_RESULT
case Fac_RESULT:
break;
+#endif
case Fac_CD:
if (ch) {
struct ast_channel *bridged = ast_bridged_channel(ch->ast);
@@ -4924,7 +4930,9 @@
}
break;
case Fac_None:
+#ifdef HAVE_MISDN_FAC_ERROR
case Fac_ERROR:
+#endif
break;
default:
chan_misdn_log(0, bc->port," --> not yet handled: facility type:%p\n", bc->fac_in.Function);
Modified: team/russell/chan_refcount/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/channels/chan_sip.c?view=diff&rev=89498&r1=89497&r2=89498
==============================================================================
--- team/russell/chan_refcount/channels/chan_sip.c (original)
+++ team/russell/chan_refcount/channels/chan_sip.c Wed Nov 21 13:33:58 2007
@@ -4112,6 +4112,7 @@
INVITE, but do set an autodestruct just in case we never get it. */
needdestroy = 0;
sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
+ p->invitestate = INV_CANCELLED;
}
if ( p->initid != -1 ) {
/* channel still up - reverse dec of inUse counter
@@ -4124,6 +4125,7 @@
transmit_response_reliable(p, res, &p->initreq);
else
transmit_response_reliable(p, "603 Declined", &p->initreq);
+ p->invitestate = INV_TERMINATED;
}
} else { /* Call is in UP state, send BYE */
if (!p->pendinginvite) {
@@ -15569,7 +15571,16 @@
check_via(p, req);
sip_alreadygone(p);
- p->invitestate = INV_CANCELLED;
+
+ /* At this point, we could have cancelled the invite at the same time
+ as the other side sends a CANCEL. Our final reply with error code
+ might not have been received by the other side before the CANCEL
+ was sent, so let's just give up retransmissions and waiting for
+ ACK on our error code. The call is hanging up any way. */
+ if (p->invitestate == INV_TERMINATED)
+ __sip_pretend_ack(p);
+ else
+ p->invitestate = INV_CANCELLED;
if (p->owner && p->owner->_state == AST_STATE_UP) {
/* This call is up, cancel is ignored, we need a bye */
Modified: team/russell/chan_refcount/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/channels/chan_zap.c?view=diff&rev=89498&r1=89497&r2=89498
==============================================================================
--- team/russell/chan_refcount/channels/chan_zap.c (original)
+++ team/russell/chan_refcount/channels/chan_zap.c Wed Nov 21 13:33:58 2007
@@ -5594,7 +5594,7 @@
i->dsp = NULL;
if (i->dsp) {
i->dsp_features = features & ~DSP_PROGRESS_TALK;
-#ifdef HAVE_PRI
+#if defined(HAVE_PRI) || defined(HAVE_SS7)
/* We cannot do progress detection until receives PROGRESS message */
if (i->outgoing && ((i->sig == SIG_PRI) || (i->sig == SIG_SS7))) {
/* Remember requested DSP features, don't treat
@@ -8420,6 +8420,38 @@
return winner;
}
+static void ss7_handle_cqm(struct zt_ss7 *linkset, int startcic, int endcic)
+{
+ unsigned char status[32];
+ struct zt_pvt *p = NULL;
+ int i, offset;
+
+ for (i = 0; i < linkset->numchans; i++) {
+ if (linkset->pvts[i] && ((linkset->pvts[i]->cic >= startcic) && (linkset->pvts[i]->cic <= endcic))) {
+ p = linkset->pvts[i];
+ offset = p->cic - startcic;
+ status[offset] = 0;
+ if (p->locallyblocked)
+ status[offset] |= (1 << 0) | (1 << 4);
+ if (p->remotelyblocked)
+ status[offset] |= (1 << 1) | (1 << 5);
+ if (p->ss7call) {
+ if (p->outgoing)
+ status[offset] |= (1 << 3);
+ else
+ status[offset] |= (1 << 2);
+ } else
+ status[offset] |= 0x3 << 2;
+ }
+ }
+
+ if (p)
+ isup_cqr(linkset->ss7, startcic, endcic, p->dpc, status);
+ else
+ ast_log(LOG_WARNING, "Could not find any equipped circuits within CQM CICs\n");
+
+}
+
static inline void ss7_block_cics(struct zt_ss7 *linkset, int startcic, int endcic, unsigned char state[], int block)
{
int i;
@@ -8689,6 +8721,10 @@
ast_debug(1, "Queuing frame PROGRESS on CIC %d\n", p->cic);
zap_queue_frame(p, &f, linkset);
p->progress = 1;
+ if (p->dsp && p->dsp_features) {
+ ast_dsp_set_features(p->dsp, p->dsp_features);
+ p->dsp_features = 0;
+ }
}
break;
default:
@@ -8723,6 +8759,10 @@
p = linkset->pvts[chanpos];
isup_gra(ss7, e->grs.startcic, e->grs.endcic, p->dpc);
ss7_block_cics(linkset, e->grs.startcic, e->grs.endcic, NULL, 0);
+ break;
+ case ISUP_EVENT_CQM:
+ ast_debug(1, "Got Circuit group query message from CICs %d to %d\n", e->cqm.startcic, e->cqm.endcic);
+ ss7_handle_cqm(linkset, e->cqm.startcic, e->cqm.endcic);
break;
case ISUP_EVENT_GRA:
ast_verbose("Got reset acknowledgement from CIC %d to %d.\n", e->gra.startcic, e->gra.endcic);
@@ -8968,6 +9008,10 @@
p = linkset->pvts[chanpos];
ast_mutex_lock(&p->lock);
p->subs[SUB_REAL].needanswer = 1;
+ if (p->dsp && p->dsp_features) {
+ ast_dsp_set_features(p->dsp, p->dsp_features);
+ p->dsp_features = 0;
+ }
zt_enable_ec(p);
ast_mutex_unlock(&p->lock);
}
@@ -13060,7 +13104,7 @@
if (ast_channel_register(&zap_tech)) {
ast_log(LOG_ERROR, "Unable to register channel class 'Zap'\n");
__unload_module();
- return -1;
+ return AST_MODULE_LOAD_FAILURE;
}
#ifdef HAVE_PRI
ast_string_field_init(&inuse, 16);
Propchange: team/russell/chan_refcount/codecs/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Nov 21 13:33:58 2007
@@ -1,3 +1,5 @@
+*.i
+*.s
*.d
*.a
*.so
Propchange: team/russell/chan_refcount/codecs/g722/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Nov 21 13:33:58 2007
@@ -1,3 +1,5 @@
+*.i
+*.s
libg722.a
*.d
Modified: team/russell/chan_refcount/codecs/g722/Makefile
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/codecs/g722/Makefile?view=diff&rev=89498&r1=89497&r2=89498
==============================================================================
--- team/russell/chan_refcount/codecs/g722/Makefile (original)
+++ team/russell/chan_refcount/codecs/g722/Makefile Wed Nov 21 13:33:58 2007
@@ -15,3 +15,4 @@
clean:
rm -f $(LIB) *.o
rm -f .*.o.d
+ rm -f *.s *.i
Propchange: team/russell/chan_refcount/codecs/gsm/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Nov 21 13:33:58 2007
@@ -1,2 +1,4 @@
+*.i
+*.s
*.d
lib
Propchange: team/russell/chan_refcount/codecs/ilbc/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Nov 21 13:33:58 2007
@@ -1,3 +1,5 @@
+*.i
+*.s
*.d
*.a
*.so
Modified: team/russell/chan_refcount/codecs/ilbc/Makefile
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/codecs/ilbc/Makefile?view=diff&rev=89498&r1=89497&r2=89498
==============================================================================
--- team/russell/chan_refcount/codecs/ilbc/Makefile (original)
+++ team/russell/chan_refcount/codecs/ilbc/Makefile Wed Nov 21 13:33:58 2007
@@ -18,3 +18,4 @@
clean:
rm -f $(LIB) *.o .*.d
+ rm -f *.s *.i
Propchange: team/russell/chan_refcount/codecs/lpc10/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Nov 21 13:33:58 2007
@@ -1,3 +1,5 @@
+*.i
+*.s
*.d
*.a
*.so
Modified: team/russell/chan_refcount/codecs/lpc10/Makefile
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/codecs/lpc10/Makefile?view=diff&rev=89498&r1=89497&r2=89498
==============================================================================
--- team/russell/chan_refcount/codecs/lpc10/Makefile (original)
+++ team/russell/chan_refcount/codecs/lpc10/Makefile Wed Nov 21 13:33:58 2007
@@ -75,3 +75,4 @@
clean:
rm -f *.o $(LIB) .*.d
+ rm -f *.s *.i
Modified: team/russell/chan_refcount/configure
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/configure?view=diff&rev=89498&r1=89497&r2=89498
==============================================================================
--- team/russell/chan_refcount/configure (original)
+++ team/russell/chan_refcount/configure Wed Nov 21 13:33:58 2007
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.ac Revision: 84080 .
+# From configure.ac Revision: 87247 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61.
#
@@ -39647,6 +39647,144 @@
fi
fi
+
+ if test "x${PBX_MISDN_FAC_RESULT}" != "x1" -a "${USE_MISDN_FAC_RESULT}" != "no"; then
+ { echo "$as_me:$LINENO: checking for Fac_RESULT in mISDNuser/suppserv.h" >&5
+echo $ECHO_N "checking for Fac_RESULT in mISDNuser/suppserv.h... $ECHO_C" >&6; }
+ saved_cppflags="${CPPFLAGS}"
+ if test "x${MISDN_FAC_RESULT_DIR}" != "x"; then
+ MISDN_FAC_RESULT_INCLUDE="-I${MISDN_FAC_RESULT_DIR}/include"
+ fi
+ CPPFLAGS="${CPPFLAGS} ${MISDN_FAC_RESULT_INCLUDE}"
+
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <mISDNuser/suppserv.h>
+int
+main ()
+{
+int foo = Fac_RESULT;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ PBX_MISDN_FAC_RESULT=1
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MISDN_FAC_RESULT 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MISDN_FAC_RESULT_VERSION
+_ACEOF
+
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="${saved_cppflags}"
+ fi
+
+
+ if test "x${PBX_MISDN_FAC_ERROR}" != "x1" -a "${USE_MISDN_FAC_ERROR}" != "no"; then
+ { echo "$as_me:$LINENO: checking for Fac_ERROR in mISDNuser/suppserv.h" >&5
+echo $ECHO_N "checking for Fac_ERROR in mISDNuser/suppserv.h... $ECHO_C" >&6; }
+ saved_cppflags="${CPPFLAGS}"
+ if test "x${MISDN_FAC_ERROR_DIR}" != "x"; then
+ MISDN_FAC_ERROR_INCLUDE="-I${MISDN_FAC_ERROR_DIR}/include"
+ fi
+ CPPFLAGS="${CPPFLAGS} ${MISDN_FAC_ERROR_INCLUDE}"
+
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <mISDNuser/suppserv.h>
+int
+main ()
+{
+int foo = Fac_ERROR;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ PBX_MISDN_FAC_ERROR=1
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MISDN_FAC_ERROR 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MISDN_FAC_ERROR_VERSION
+_ACEOF
+
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="${saved_cppflags}"
+ fi
+
if test "${ac_cv_header_linux_mISDNdsp_h+set}" = set; then
{ echo "$as_me:$LINENO: checking for linux/mISDNdsp.h" >&5
echo $ECHO_N "checking for linux/mISDNdsp.h... $ECHO_C" >&6; }
@@ -44723,7 +44861,7 @@
pbxlibdir="-L${SS7_DIR}"
fi
fi
- pbxfuncname="isup_set_charge"
+ pbxfuncname="isup_cqr"
if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
AST_SS7_FOUND=yes
else
Modified: team/russell/chan_refcount/configure.ac
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/configure.ac?view=diff&rev=89498&r1=89497&r2=89498
==============================================================================
--- team/russell/chan_refcount/configure.ac (original)
+++ team/russell/chan_refcount/configure.ac Wed Nov 21 13:33:58 2007
@@ -783,6 +783,8 @@
if test "${PBX_MISDN}" = 1; then
AST_EXT_LIB_CHECK([ISDNNET], [isdnnet], [init_manager], [mISDNuser/isdn_net.h], [-lmISDN -lpthread])
AST_EXT_LIB_CHECK([SUPPSERV], [suppserv], [encodeFac], [mISDNuser/suppserv.h])
+ AST_C_DEFINE_CHECK([MISDN_FAC_RESULT], [Fac_RESULT], [mISDNuser/suppserv.h])
+ AST_C_DEFINE_CHECK([MISDN_FAC_ERROR], [Fac_ERROR], [mISDNuser/suppserv.h])
AC_CHECK_HEADER([linux/mISDNdsp.h], [AC_DEFINE_UNQUOTED([MISDN_1_2], 1, [Build chan_misdn for mISDN 1.2 or later.])])
fi
@@ -881,7 +883,7 @@
AST_EXT_LIB_CHECK([PRI], [pri], [pri_keypad_facility], [libpri.h])
-AST_EXT_LIB_CHECK([SS7], [ss7], [isup_set_charge], [libss7.h])
+AST_EXT_LIB_CHECK([SS7], [ss7], [isup_cqr], [libss7.h])
if test "${USE_PWLIB}" != "no"; then
if test -n "${PWLIB_DIR}"; then
Propchange: team/russell/chan_refcount/formats/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Nov 21 13:33:58 2007
@@ -1,3 +1,5 @@
+*.i
+*.s
*.d
*.a
*.so
Propchange: team/russell/chan_refcount/funcs/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Nov 21 13:33:58 2007
@@ -1,3 +1,5 @@
+*.i
+*.s
*.d
*.a
*.so
Modified: team/russell/chan_refcount/funcs/func_cut.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/funcs/func_cut.c?view=diff&rev=89498&r1=89497&r2=89498
==============================================================================
--- team/russell/chan_refcount/funcs/func_cut.c (original)
+++ team/russell/chan_refcount/funcs/func_cut.c Wed Nov 21 13:33:58 2007
@@ -126,7 +126,7 @@
);
memset(buffer, 0, buflen);
-
+
parse = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, parse);
@@ -235,6 +235,9 @@
{
int ret = -1;
+ if (chan)
+ ast_autoservice_start(chan);
+
switch (cut_internal(chan, data, buf, len)) {
case ERROR_NOARG:
ast_log(LOG_ERROR, "Syntax: CUT(<varname>,<char-delim>,<range-spec>) - missing argument!\n");
@@ -251,6 +254,9 @@
default:
ast_log(LOG_ERROR, "Unknown internal error\n");
}
+
+ if (chan)
+ ast_autoservice_stop(chan);
return ret;
}
Modified: team/russell/chan_refcount/funcs/func_lock.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/funcs/func_lock.c?view=diff&rev=89498&r1=89497&r2=89498
==============================================================================
--- team/russell/chan_refcount/funcs/func_lock.c (original)
+++ team/russell/chan_refcount/funcs/func_lock.c Wed Nov 21 13:33:58 2007
@@ -256,19 +256,27 @@
}
static int lock_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
-{
- ast_autoservice_start(chan);
+{
+ if (chan)
+ ast_autoservice_start(chan);
+
ast_copy_string(buf, get_lock(chan, data, 0) ? "0" : "1", len);
- ast_autoservice_stop(chan);
+
+ if (chan)
+ ast_autoservice_stop(chan);
return 0;
}
static int trylock_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
{
- ast_autoservice_start(chan);
+ if (chan)
+ ast_autoservice_start(chan);
+
ast_copy_string(buf, get_lock(chan, data, 1) ? "0" : "1", len);
- ast_autoservice_stop(chan);
+
+ if (chan)
+ ast_autoservice_stop(chan);
return 0;
}
Modified: team/russell/chan_refcount/funcs/func_odbc.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/funcs/func_odbc.c?view=diff&rev=89498&r1=89497&r2=89498
==============================================================================
--- team/russell/chan_refcount/funcs/func_odbc.c (original)
+++ team/russell/chan_refcount/funcs/func_odbc.c Wed Nov 21 13:33:58 2007
@@ -139,7 +139,7 @@
struct odbc_obj *obj = NULL;
struct acf_odbc_query *query;
char *t, buf[2048]="", varname[15];
- int i, dsn;
+ int i, dsn, bogus_chan = 0;
AST_DECLARE_APP_ARGS(values,
AST_APP_ARG(field)[100];
);
@@ -162,12 +162,24 @@
return -1;
}
+ if (!chan) {
+ if ((chan = ast_channel_alloc(0, 0, "", "", "", "", "", 0, "Bogus/func_odbc")))
+ bogus_chan = 1;
+ }
+
+ if (chan)
+ ast_autoservice_start(chan);
+
/* Parse our arguments */
t = value ? ast_strdupa(value) : "";
if (!s || !t) {
ast_log(LOG_ERROR, "Out of memory\n");
AST_LIST_UNLOCK(&queries);
+ if (chan)
+ ast_autoservice_stop(chan);
+ if (bogus_chan)
+ ast_channel_free(chan);
return -1;
}
@@ -232,6 +244,11 @@
if (obj)
ast_odbc_release_obj(obj);
+ if (chan)
+ ast_autoservice_stop(chan);
+ if (bogus_chan)
+ ast_channel_free(chan);
+
return 0;
}
@@ -240,7 +257,7 @@
struct odbc_obj *obj = NULL;
struct acf_odbc_query *query;
char sql[2048] = "", varname[15], colnames[2048] = "", rowcount[12] = "-1";
- int res, x, y, buflen = 0, escapecommas, rowlimit = 1, dsn;
+ int res, x, y, buflen = 0, escapecommas, rowlimit = 1, dsn, bogus_chan = 0;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(field)[100];
);
@@ -265,6 +282,14 @@
return -1;
}
+ if (!chan) {
+ if ((chan = ast_channel_alloc(0, 0, "", "", "", "", "", 0, "Bogus/func_odbc")))
+ bogus_chan = 1;
+ }
+
+ if (chan)
+ ast_autoservice_start(chan);
+
AST_STANDARD_APP_ARGS(args, s);
for (x = 0; x < args.argc; x++) {
snprintf(varname, sizeof(varname), "ARG%d", x + 1);
@@ -306,6 +331,10 @@
if (obj)
ast_odbc_release_obj(obj);
pbx_builtin_setvar_helper(chan, "ODBCROWS", rowcount);
+ if (chan)
+ ast_autoservice_stop(chan);
+ if (bogus_chan)
+ ast_channel_free(chan);
return -1;
}
@@ -316,6 +345,10 @@
SQLFreeHandle (SQL_HANDLE_STMT, stmt);
ast_odbc_release_obj(obj);
pbx_builtin_setvar_helper(chan, "ODBCROWS", rowcount);
+ if (chan)
+ ast_autoservice_stop(chan);
+ if (bogus_chan)
+ ast_channel_free(chan);
return -1;
}
@@ -333,6 +366,10 @@
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
ast_odbc_release_obj(obj);
pbx_builtin_setvar_helper(chan, "ODBCROWS", rowcount);
+ if (chan)
+ ast_autoservice_stop(chan);
+ if (bogus_chan)
+ ast_channel_free(chan);
return res1;
}
@@ -380,6 +417,10 @@
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
ast_odbc_release_obj(obj);
pbx_builtin_setvar_helper(chan, "ODBCROWS", rowcount);
+ if (chan)
+ ast_autoservice_stop(chan);
+ if (bogus_chan)
+ ast_channel_free(chan);
return -1;
}
resultset = tmp;
@@ -456,6 +497,10 @@
SQLCloseCursor(stmt);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
ast_odbc_release_obj(obj);
+ if (chan)
+ ast_autoservice_stop(chan);
+ if (bogus_chan)
+ ast_channel_free(chan);
return -1;
}
odbc_store->data = resultset;
@@ -464,6 +509,10 @@
SQLCloseCursor(stmt);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
ast_odbc_release_obj(obj);
+ if (chan)
+ ast_autoservice_stop(chan);
+ if (bogus_chan)
+ ast_channel_free(chan);
return 0;
}
Modified: team/russell/chan_refcount/funcs/func_realtime.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/funcs/func_realtime.c?view=diff&rev=89498&r1=89497&r2=89498
==============================================================================
--- team/russell/chan_refcount/funcs/func_realtime.c (original)
+++ team/russell/chan_refcount/funcs/func_realtime.c Wed Nov 21 13:33:58 2007
@@ -71,9 +71,14 @@
if (!args.delim2)
args.delim2 = "=";
+ if (chan)
+ ast_autoservice_start(chan);
+
head = ast_load_realtime_all(args.family, args.fieldmatch, args.value, NULL);
if (!head)
+ if (chan)
+ ast_autoservice_stop(chan);
return -1;
resultslen = 0;
@@ -87,6 +92,9 @@
for (var = head; var; var = var->next)
ast_str_append(&out, 0, "%s%s%s%s", var->name, args.delim2, var->value, args.delim1);
ast_copy_string(buf, out->str, len);
+
+ if (chan)
+ ast_autoservice_stop(chan);
return 0;
}
@@ -106,6 +114,9 @@
return -1;
}
+ if (chan)
+ ast_autoservice_start(chan);
+
AST_STANDARD_APP_ARGS(args, data);
res = ast_update_realtime(args.family, args.fieldmatch, args.value, args.field, (char *)value, NULL);
@@ -113,6 +124,9 @@
if (res < 0) {
ast_log(LOG_WARNING, "Failed to update. Check the debug log for possible data repository related entries.\n");
}
+
+ if (chan)
+ ast_autoservice_stop(chan);
return 0;
}
Modified: team/russell/chan_refcount/funcs/func_shell.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/funcs/func_shell.c?view=diff&rev=89498&r1=89497&r2=89498
==============================================================================
[... 744 lines stripped ...]
More information about the asterisk-commits
mailing list