[asterisk-commits] rmudgett: branch rmudgett/call_waiting r260568 - in /team/rmudgett/call_waiti...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon May 3 09:54:15 CDT 2010
Author: rmudgett
Date: Mon May 3 09:54:11 2010
New Revision: 260568
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=260568
Log:
Merged revisions 260445,260524 via svnmerge from
https://origsvn.digium.com/svn/asterisk/team/group/CCSS
................
r260445 | root | 2010-04-30 18:17:55 -0500 (Fri, 30 Apr 2010) | 38 lines
Merged revisions 260435,260437 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk
................
r260435 | rmudgett | 2010-04-30 17:24:28 -0500 (Fri, 30 Apr 2010) | 11 lines
Separate the uses of NUM_DCHANS and MAX_CHANNELS into PRI, SS7, and MFCR2 users.
Created
SIG_PRI_MAX_CHANNELS, SIG_PRI_NUM_DCHANS
SIG_SS7_MAX_CHANNELS, SIG_SS7_NUM_DCHANS
SIG_MFCR2_MAX_CHANNELS
Also fixed the declaration of pollers[] in mfcr2_monitor(). It was
dimensioned to the number of bytes in struct dahdi_mfcr2.pvts[] and not to
the same dimension of the struct dahdi_mfcr2.pvts[].
................
r260437 | jpeeler | 2010-04-30 17:36:49 -0500 (Fri, 30 Apr 2010) | 18 lines
Merged revisions 260434 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r260434 | jpeeler | 2010-04-30 17:22:46 -0500 (Fri, 30 Apr 2010) | 11 lines
Ensure channel state is not incorrectly set in the case of a very early answer.
The needringing bit was being read in dahdi_read after answering thereby
setting the state to ringing from up. This clears needringing upon answering
so that is no longer possible.
(closes issue #17067)
Reported by: tzafrir
Patches:
needringing.diff uploaded by tzafrir (license 46)
........
................
................
r260524 | root | 2010-05-01 22:18:32 -0500 (Sat, 01 May 2010) | 14 lines
Merged revisions 260521 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk
........
r260521 | eliel | 2010-05-01 21:52:23 -0500 (Sat, 01 May 2010) | 8 lines
Avoid making AstData depend on libxml2 to compile.
We have some functions inside the AstData API to get the tree
in XML form, but it is not required at the moment to compile
asterisk and we can disable that part of the API if we don't have
libxml2 support.
........
................
Modified:
team/rmudgett/call_waiting/ (props changed)
team/rmudgett/call_waiting/channels/chan_dahdi.c
team/rmudgett/call_waiting/channels/sig_analog.c
team/rmudgett/call_waiting/channels/sig_analog.h
team/rmudgett/call_waiting/channels/sig_pri.c
team/rmudgett/call_waiting/channels/sig_pri.h
team/rmudgett/call_waiting/include/asterisk/data.h
team/rmudgett/call_waiting/main/data.c
Propchange: team/rmudgett/call_waiting/
------------------------------------------------------------------------------
automerge = *
Propchange: team/rmudgett/call_waiting/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Propchange: team/rmudgett/call_waiting/
------------------------------------------------------------------------------
--- call_waiting-integrated (original)
+++ call_waiting-integrated Mon May 3 09:54:11 2010
@@ -1,1 +1,1 @@
-/team/group/CCSS:1-260405
+/team/group/CCSS:1-260567
Propchange: team/rmudgett/call_waiting/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon May 3 09:54:11 2010
@@ -1,1 +1,1 @@
-/trunk:1-260350
+/trunk:1-260523
Modified: team/rmudgett/call_waiting/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/call_waiting/channels/chan_dahdi.c?view=diff&rev=260568&r1=260567&r2=260568
==============================================================================
--- team/rmudgett/call_waiting/channels/chan_dahdi.c (original)
+++ team/rmudgett/call_waiting/channels/chan_dahdi.c Mon May 3 09:54:11 2010
@@ -75,12 +75,14 @@
#ifdef HAVE_SS7
/* put this here until sig_ss7 comes along */
-#define NUM_DCHANS 4 /*!< No more than 4 d-channels */
-#define MAX_CHANNELS 672 /*!< No more than a DS3 per trunk group */
+#define SIG_SS7_NUM_DCHANS 4 /*!< No more than 4 d-channels */
+#define SIG_SS7_MAX_CHANNELS 672 /*!< No more than a DS3 per trunk group */
#include <libss7.h>
#endif
#ifdef HAVE_OPENR2
+/* put this here until sig_mfcr2 comes along */
+#define SIG_MFCR2_MAX_CHANNELS 672 /*!< No more than a DS3 per trunk group */
#include <openr2.h>
#endif
@@ -528,9 +530,9 @@
struct dahdi_ss7 {
pthread_t master; /*!< Thread of master */
ast_mutex_t lock;
- int fds[NUM_DCHANS];
+ int fds[SIG_SS7_NUM_DCHANS];
int numsigchans;
- int linkstate[NUM_DCHANS];
+ int linkstate[SIG_SS7_NUM_DCHANS];
int numchans;
int type;
enum {
@@ -544,7 +546,7 @@
char subscriberprefix[20]; /*!< area access code + area code ('0'+area code for european dialplans) */
char unknownprefix[20]; /*!< for unknown dialplans */
struct ss7 *ss7;
- struct dahdi_pvt *pvts[MAX_CHANNELS]; /*!< Member channel pvt structs */
+ struct dahdi_pvt *pvts[SIG_SS7_MAX_CHANNELS]; /*!< Member channel pvt structs */
int flags; /*!< Linkset flags */
};
@@ -563,7 +565,7 @@
struct dahdi_mfcr2 {
pthread_t r2master; /*!< Thread of master */
openr2_context_t *protocol_context; /*!< OpenR2 context handle */
- struct dahdi_pvt *pvts[MAX_CHANNELS]; /*!< Member channel pvt structs */
+ struct dahdi_pvt *pvts[SIG_MFCR2_MAX_CHANNELS]; /*!< Member channel pvt structs */
int numchans; /*!< Number of channels in this R2 block */
int monitored_count; /*!< Number of channels being monitored */
};
@@ -601,8 +603,8 @@
#ifdef HAVE_PRI
struct dahdi_pri {
- int dchannels[NUM_DCHANS]; /*!< What channel are the dchannels on */
- int mastertrunkgroup; /*!< What trunk group is our master */
+ int dchannels[SIG_PRI_NUM_DCHANS]; /*!< What channel are the dchannels on */
+ int mastertrunkgroup; /*!< What trunk group is our master */
int prilogicalspan; /*!< Logical span number within trunk group */
struct sig_pri_pri pri;
};
@@ -2689,6 +2691,12 @@
return dahdi_set_hook(p->subs[SUB_REAL].dfd, DAHDI_OFFHOOK);
}
+static void my_set_needringing(void *pvt, int value)
+{
+ struct dahdi_pvt *p = pvt;
+ p->subs[SUB_REAL].needringing = value;
+}
+
static int my_start(void *pvt)
{
struct dahdi_pvt *p = pvt;
@@ -3211,6 +3219,7 @@
.confmute = my_confmute,
.set_pulsedial = my_set_pulsedial,
.get_orig_dialstring = my_get_orig_dialstring,
+ .set_needringing = my_set_needringing,
};
/*! Round robin search locations. */
@@ -7695,6 +7704,7 @@
p->subs[idx].f.frametype = AST_FRAME_CONTROL;
p->subs[idx].f.subclass.integer = AST_CONTROL_ANSWER;
/* Make sure it stops ringing */
+ p->subs[SUB_REAL].needringing = 0;
dahdi_set_hook(p->subs[idx].dfd, DAHDI_OFFHOOK);
ast_debug(1, "channel %d answered\n", p->channel);
if (p->cidspill) {
@@ -11290,7 +11300,7 @@
return -1;
}
}
- for (y = 0; y < NUM_DCHANS; y++) {
+ for (y = 0; y < SIG_PRI_NUM_DCHANS; y++) {
if (!channels[y])
break;
memset(&si, 0, sizeof(si));
@@ -11657,7 +11667,7 @@
destroy_dahdi_pvt(tmp);
return NULL;
}
- if (r2_link->numchans == (sizeof(r2_link->pvts)/sizeof(r2_link->pvts[0]))) {
+ if (r2_link->numchans == ARRAY_LEN(r2_link->pvts)) {
ast_log(LOG_ERROR, "Cannot add more channels to this link!\n");
destroy_dahdi_pvt(tmp);
return NULL;
@@ -11727,7 +11737,7 @@
/* Make sure this isn't a d-channel */
matchesdchan=0;
for (x = 0; x < NUM_SPANS; x++) {
- for (y = 0; y < NUM_DCHANS; y++) {
+ for (y = 0; y < SIG_PRI_NUM_DCHANS; y++) {
if (pris[x].dchannels[y] == tmp->channel) {
matchesdchan = 1;
break;
@@ -11770,7 +11780,7 @@
destroy_dahdi_pvt(tmp);
return NULL;
}
- if (pris[span].pri.numchans >= MAX_CHANNELS) {
+ if (pris[span].pri.numchans >= ARRAY_LEN(pris[span].pri.pvts)) {
ast_log(LOG_ERROR, "Unable to add channel %d: Too many channels in trunk group %d!\n", channel,
pris[span].pri.trunkgroup);
destroy_dahdi_pvt(tmp);
@@ -12445,7 +12455,7 @@
}
}
if (pri->numchans == pvt_idx) {
- if (MAX_CHANNELS <= pvt_idx) {
+ if (ARRAY_LEN(pri->pvts) <= pvt_idx) {
ast_log(LOG_ERROR, "Unable to add a no-B-channel interface!\n");
return -1;
}
@@ -13322,7 +13332,7 @@
ss7_event *e = NULL;
struct dahdi_pvt *p;
int chanpos;
- struct pollfd pollers[NUM_DCHANS];
+ struct pollfd pollers[SIG_SS7_NUM_DCHANS];
int cic;
unsigned int dpc;
int nextms = 0;
@@ -13887,7 +13897,7 @@
I think do_monitor() could be leaking, since it
could be cancelled at any time and is not
using thread keys, why?, */
- struct pollfd pollers[sizeof(mfcr2->pvts)];
+ struct pollfd pollers[ARRAY_LEN(mfcr2->pvts)];
int res = 0;
int i = 0;
int oldstate = 0;
@@ -13967,7 +13977,7 @@
if (pri) {
for (x = 0; x < NUM_SPANS; x++) {
- for (y = 0; y < NUM_DCHANS; y++) {
+ for (y = 0; y < SIG_PRI_NUM_DCHANS; y++) {
if (pris[x].pri.dchans[y])
dchancount++;
@@ -14010,7 +14020,7 @@
if (pri) {
for (x = 0; x < NUM_SPANS; x++) {
- for (y = 0; y < NUM_DCHANS; y++) {
+ for (y = 0; y < SIG_PRI_NUM_DCHANS; y++) {
if (pris[x].pri.dchans[y])
dchancount++;
@@ -14054,7 +14064,7 @@
pri->pri.calls = &dahdi_pri_callbacks;
- for (i = 0; i < NUM_DCHANS; i++) {
+ for (i = 0; i < SIG_PRI_NUM_DCHANS; i++) {
if (!pri->dchannels[i])
break;
pri->pri.fds[i] = open("/dev/dahdi/channel", O_RDWR);
@@ -14204,7 +14214,7 @@
ast_cli(a->fd, "No PRI running on span %d\n", span);
return CLI_SUCCESS;
}
- for (x = 0; x < NUM_DCHANS; x++) {
+ for (x = 0; x < SIG_PRI_NUM_DCHANS; x++) {
if (pris[span-1].pri.dchans[x]) {
if (level == 1) {
pri_set_debug(pris[span-1].pri.dchans[x], SIG_PRI_DEBUG_NORMAL);
@@ -14266,7 +14276,7 @@
/* either servicing a D-Channel */
for (x = 0; x < NUM_SPANS; x++) {
- for (y = 0; y < NUM_DCHANS; y++) {
+ for (y = 0; y < SIG_PRI_NUM_DCHANS; y++) {
if (pris[x].dchannels[y] == channel) {
pri = pris + x;
if (pri->pri.enable_service_message_support) {
@@ -14454,7 +14464,7 @@
for (span = 0; span < NUM_SPANS; span++) {
if (pris[span].pri.pri) {
- for (x = 0; x < NUM_DCHANS; x++) {
+ for (x = 0; x < SIG_PRI_NUM_DCHANS; x++) {
debug = 0;
if (pris[span].pri.dchans[x]) {
debug = pri_get_debug(pris[span].pri.dchans[x]);
@@ -14971,7 +14981,7 @@
#ifdef HAVE_PRI
for (i = 0; i < NUM_SPANS; i++) {
- for (j = 0; j < NUM_DCHANS; j++)
+ for (j = 0; j < SIG_PRI_NUM_DCHANS; j++)
dahdi_close_pri_fd(&(pris[i]), j);
}
@@ -14979,7 +14989,7 @@
for (i = 0; i < NUM_SPANS; i++) {
ast_mutex_init(&pris[i].pri.lock);
pris[i].pri.master = AST_PTHREADT_NULL;
- for (j = 0; j < NUM_DCHANS; j++)
+ for (j = 0; j < SIG_PRI_NUM_DCHANS; j++)
pris[i].pri.fds[j] = -1;
}
pri_set_error(dahdi_pri_error);
@@ -14987,7 +14997,7 @@
#endif
#ifdef HAVE_SS7
for (i = 0; i < NUM_SPANS; i++) {
- for (j = 0; j < NUM_DCHANS; j++)
+ for (j = 0; j < SIG_SS7_NUM_DCHANS; j++)
dahdi_close_ss7_fd(&(linksets[i]), j);
}
@@ -14995,7 +15005,7 @@
for (i = 0; i < NUM_SPANS; i++) {
ast_mutex_init(&linksets[i].lock);
linksets[i].master = AST_PTHREADT_NULL;
- for (j = 0; j < NUM_DCHANS; j++)
+ for (j = 0; j < SIG_SS7_NUM_DCHANS; j++)
linksets[i].fds[j] = -1;
}
ss7_set_error(dahdi_ss7_error);
@@ -15937,7 +15947,7 @@
ast_log(LOG_ERROR, "Invalid sigchan!\n");
return -1;
} else {
- if (link->numsigchans >= NUM_DCHANS) {
+ if (link->numsigchans >= SIG_SS7_NUM_DCHANS) {
ast_log(LOG_ERROR, "Too many sigchans on linkset %d\n", cur_linkset);
return -1;
}
@@ -16506,7 +16516,7 @@
for (i = 0; i < NUM_SPANS; i++) {
if (pris[i].pri.master && (pris[i].pri.master != AST_PTHREADT_NULL))
pthread_join(pris[i].pri.master, NULL);
- for (j = 0; j < NUM_DCHANS; j++) {
+ for (j = 0; j < SIG_PRI_NUM_DCHANS; j++) {
dahdi_close_pri_fd(&(pris[i]), j);
}
}
@@ -16521,7 +16531,7 @@
for (i = 0; i < NUM_SPANS; i++) {
if (linksets[i].master && (linksets[i].master != AST_PTHREADT_NULL))
pthread_join(linksets[i].master, NULL);
- for (j = 0; j < NUM_DCHANS; j++) {
+ for (j = 0; j < SIG_SS7_NUM_DCHANS; j++) {
dahdi_close_ss7_fd(&(linksets[i]), j);
}
}
@@ -17797,7 +17807,7 @@
int i;
int logicalspan;
int trunkgroup;
- int dchannels[NUM_DCHANS];
+ int dchannels[SIG_PRI_NUM_DCHANS];
#endif
cfg = ast_config_load(config, config_flags);
@@ -17845,7 +17855,7 @@
if ((c = strchr(v->value, ','))) {
i = 0;
memset(dchannels, 0, sizeof(dchannels));
- while (c && (i < NUM_DCHANS)) {
+ while (c && (i < SIG_PRI_NUM_DCHANS)) {
dchannels[i] = atoi(c + 1);
if (dchannels[i] < 0) {
ast_log(LOG_WARNING, "D-channel for trunk group %d must be a postiive number at line %d of chan_dahdi.conf\n", trunkgroup, v->lineno);
@@ -18083,7 +18093,7 @@
for (y = 0; y < NUM_SPANS; y++) {
ast_mutex_init(&linksets[y].lock);
linksets[y].master = AST_PTHREADT_NULL;
- for (i = 0; i < NUM_DCHANS; i++)
+ for (i = 0; i < SIG_SS7_NUM_DCHANS; i++)
linksets[y].fds[i] = -1;
}
ss7_set_error(dahdi_ss7_error);
Modified: team/rmudgett/call_waiting/channels/sig_analog.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/call_waiting/channels/sig_analog.c?view=diff&rev=260568&r1=260567&r2=260568
==============================================================================
--- team/rmudgett/call_waiting/channels/sig_analog.c (original)
+++ team/rmudgett/call_waiting/channels/sig_analog.c Mon May 3 09:54:11 2010
@@ -517,6 +517,13 @@
return p->calls->off_hook(p->chan_pvt);
}
return -1;
+}
+
+static void analog_set_needringing(struct analog_pvt *p, int value)
+{
+ if (p->calls->set_needringing) {
+ return p->calls->set_needringing(p->chan_pvt, value);
+ }
}
static int analog_dsp_set_digitmode(struct analog_pvt *p, enum analog_dsp_digitmode mode)
@@ -2662,6 +2669,7 @@
p->subs[index].f.frametype = AST_FRAME_CONTROL;
p->subs[index].f.subclass.integer = AST_CONTROL_ANSWER;
/* Make sure it stops ringing */
+ analog_set_needringing(p, 0);
analog_off_hook(p);
ast_debug(1, "channel %d answered\n", p->channel);
analog_cancel_cidspill(p);
Modified: team/rmudgett/call_waiting/channels/sig_analog.h
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/call_waiting/channels/sig_analog.h?view=diff&rev=260568&r1=260567&r2=260568
==============================================================================
--- team/rmudgett/call_waiting/channels/sig_analog.h (original)
+++ team/rmudgett/call_waiting/channels/sig_analog.h Mon May 3 09:54:11 2010
@@ -144,6 +144,7 @@
int (* const on_hook)(void *pvt);
/*! \brief Set channel off hook */
int (* const off_hook)(void *pvt);
+ void (* const set_needringing)(void *pvt, int value);
/* We're assuming that we're going to only wink on ANALOG_SUB_REAL - even though in the code there's an argument to the index
* function */
int (* const wink)(void *pvt, enum analog_sub sub);
Modified: team/rmudgett/call_waiting/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/call_waiting/channels/sig_pri.c?view=diff&rev=260568&r1=260567&r2=260568
==============================================================================
--- team/rmudgett/call_waiting/channels/sig_pri.c (original)
+++ team/rmudgett/call_waiting/channels/sig_pri.c Mon May 3 09:54:11 2010
@@ -840,7 +840,7 @@
int pri_is_up(struct sig_pri_pri *pri)
{
int x;
- for (x = 0; x < NUM_DCHANS; x++) {
+ for (x = 0; x < SIG_PRI_NUM_DCHANS; x++) {
if (pri->dchanavail[x] == DCHAN_AVAILABLE)
return 1;
}
@@ -868,7 +868,7 @@
{
int x;
- for (x = 0; x < NUM_DCHANS; x++) {
+ for (x = 0; x < SIG_PRI_NUM_DCHANS; x++) {
if ((pri->dchans[x] == pri->pri))
return x;
}
@@ -884,7 +884,7 @@
int newslot = -1;
int x;
old = pri->pri;
- for (x = 0; x < NUM_DCHANS; x++) {
+ for (x = 0; x < SIG_PRI_NUM_DCHANS; x++) {
if ((pri->dchanavail[x] == DCHAN_AVAILABLE) && (newslot < 0))
newslot = x;
if (pri->dchans[x] == old) {
@@ -2666,7 +2666,7 @@
{
struct sig_pri_pri *pri = vpri;
pri_event *e;
- struct pollfd fds[NUM_DCHANS];
+ struct pollfd fds[SIG_PRI_NUM_DCHANS];
int res;
int chanpos = 0;
int x;
@@ -2711,7 +2711,7 @@
ast_log(LOG_WARNING, "Idle dial string '%s' lacks '@context'\n", pri->idleext);
}
for (;;) {
- for (i = 0; i < NUM_DCHANS; i++) {
+ for (i = 0; i < SIG_PRI_NUM_DCHANS; i++) {
if (!pri->dchans[i])
break;
fds[i].fd = pri->fds[i];
@@ -2786,7 +2786,7 @@
}
/* Start with reasonable max */
lowest = ast_tv(60, 0);
- for (i = 0; i < NUM_DCHANS; i++) {
+ for (i = 0; i < SIG_PRI_NUM_DCHANS; i++) {
/* Find lowest available d-channel */
if (!pri->dchans[i])
break;
@@ -2828,7 +2828,7 @@
ast_mutex_lock(&pri->lock);
if (!res) {
- for (which = 0; which < NUM_DCHANS; which++) {
+ for (which = 0; which < SIG_PRI_NUM_DCHANS; which++) {
if (!pri->dchans[which])
break;
/* Just a timeout, run the scheduler */
@@ -2837,7 +2837,7 @@
break;
}
} else if (res > -1) {
- for (which = 0; which < NUM_DCHANS; which++) {
+ for (which = 0; which < SIG_PRI_NUM_DCHANS; which++) {
if (!pri->dchans[which])
break;
if (fds[which].revents & POLLPRI) {
@@ -4183,7 +4183,7 @@
ast_mutex_init(&pri->lock);
pri->master = AST_PTHREADT_NULL;
- for (i = 0; i < NUM_DCHANS; i++)
+ for (i = 0; i < SIG_PRI_NUM_DCHANS; i++)
pri->fds[i] = -1;
}
@@ -5055,7 +5055,7 @@
ast_mutex_init(&pri->lock);
- for (i = 0; i < NUM_DCHANS; i++) {
+ for (i = 0; i < SIG_PRI_NUM_DCHANS; i++) {
if (pri->fds[i] == -1) {
break;
}
@@ -5125,7 +5125,7 @@
pri->resetpos = -1;
if (ast_pthread_create_background(&pri->master, NULL, pri_dchannel, pri)) {
- for (i = 0; i < NUM_DCHANS; i++) {
+ for (i = 0; i < SIG_PRI_NUM_DCHANS; i++) {
if (!pri->dchans[i])
break;
if (pri->fds[i] > 0)
@@ -5220,7 +5220,7 @@
{
char status[256];
int x;
- for (x = 0; x < NUM_DCHANS; x++) {
+ for (x = 0; x < SIG_PRI_NUM_DCHANS; x++) {
if (pri->dchans[x]) {
build_status(status, sizeof(status), pri->dchanavail[x], pri->dchans[x] == pri->pri);
ast_cli(fd, "PRI span %d/%d: %s\n", span, x, status);
@@ -5233,7 +5233,7 @@
int x;
char status[256];
- for (x = 0; x < NUM_DCHANS; x++) {
+ for (x = 0; x < SIG_PRI_NUM_DCHANS; x++) {
if (pri->dchans[x]) {
#ifdef PRI_DUMP_INFO_STR
char *info_str = NULL;
Modified: team/rmudgett/call_waiting/channels/sig_pri.h
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/call_waiting/channels/sig_pri.h?view=diff&rev=260568&r1=260567&r2=260568
==============================================================================
--- team/rmudgett/call_waiting/channels/sig_pri.h (original)
+++ team/rmudgett/call_waiting/channels/sig_pri.h Mon May 3 09:54:11 2010
@@ -127,8 +127,8 @@
void (*module_unref)(void);
};
-#define NUM_DCHANS 4 /*!< No more than 4 d-channels */
-#define MAX_CHANNELS 672 /*!< No more than a DS3 per trunk group */
+#define SIG_PRI_NUM_DCHANS 4 /*!< No more than 4 d-channels */
+#define SIG_PRI_MAX_CHANNELS 672 /*!< No more than a DS3 per trunk group */
#define SIG_PRI DAHDI_SIG_CLEAR
#define SIG_BRI (0x2000000 | DAHDI_SIG_CLEAR)
@@ -248,11 +248,11 @@
struct ast_cc_config_params *cc_params; /*!< CC config parameters for each new call. */
int pritimers[PRI_MAX_TIMERS];
int overlapdial; /*!< In overlap dialing mode */
- int qsigchannelmapping; /*!< QSIG channel mapping type */
- int discardremoteholdretrieval; /*!< shall remote hold or remote retrieval notifications be discarded? */
+ int qsigchannelmapping; /*!< QSIG channel mapping type */
+ int discardremoteholdretrieval; /*!< shall remote hold or remote retrieval notifications be discarded? */
int facilityenable; /*!< Enable facility IEs */
- int dchan_logical_span[NUM_DCHANS]; /*!< Logical offset the DCHAN sits in */
- int fds[NUM_DCHANS]; /*!< FD's for d-channels */
+ int dchan_logical_span[SIG_PRI_NUM_DCHANS]; /*!< Logical offset the DCHAN sits in */
+ int fds[SIG_PRI_NUM_DCHANS]; /*!< FD's for d-channels */
#if defined(HAVE_PRI_SERVICE_MESSAGES)
unsigned int enable_service_message_support:1; /*!< enable SERVICE message support */
#endif /* defined(HAVE_PRI_SERVICE_MESSAGES) */
@@ -316,16 +316,16 @@
*/
int num_call_waiting_calls;
#endif /* defined(HAVE_PRI_CALL_WAITING) */
- int dchanavail[NUM_DCHANS]; /*!< Whether each channel is available */
+ int dchanavail[SIG_PRI_NUM_DCHANS]; /*!< Whether each channel is available */
int debug; /*!< set to true if to dump PRI event info (tested but never set) */
- int span; /*!< span number put into user output messages */
+ int span; /*!< span number put into user output messages */
int resetting; /*!< true if span is being reset/restarted */
int resetpos; /*!< current position during a reset (-1 if not started) */
int sig; /*!< ISDN signalling type (SIG_PRI, SIG_BRI, SIG_BRI_PTMP, etc...) */
int new_chan_seq; /*!< New struct ast_channel sequence number */
/* Everything after here is internally set */
- struct pri *dchans[NUM_DCHANS]; /*!< Actual d-channels */
+ struct pri *dchans[SIG_PRI_NUM_DCHANS]; /*!< Actual d-channels */
struct pri *pri; /*!< Currently active D-channel */
/*!
* List of private structures of the user of this module for no B channel
@@ -338,7 +338,7 @@
*/
void *no_b_chan_end;
int numchans; /*!< Num of channels we represent */
- struct sig_pri_chan *pvts[MAX_CHANNELS]; /*!< Member channel pvt structs */
+ struct sig_pri_chan *pvts[SIG_PRI_MAX_CHANNELS];/*!< Member channel pvt structs */
pthread_t master; /*!< Thread of master */
ast_mutex_t lock; /*!< libpri access Mutex */
time_t lastreset; /*!< time when unused channels were last reset */
Modified: team/rmudgett/call_waiting/include/asterisk/data.h
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/call_waiting/include/asterisk/data.h?view=diff&rev=260568&r1=260567&r2=260568
==============================================================================
--- team/rmudgett/call_waiting/include/asterisk/data.h (original)
+++ team/rmudgett/call_waiting/include/asterisk/data.h Mon May 3 09:54:11 2010
@@ -500,6 +500,7 @@
*/
struct ast_data *ast_data_get(const struct ast_data_query *query);
+#ifdef HAVE_LIBXML2
/*!
* \brief Retrieve a subtree from the asterisk data API in XML format..
* \param[in] query The query structure specifying what nodes to retrieve.
@@ -509,6 +510,7 @@
* \see ast_data_free, ast_data_get
*/
struct ast_xml_doc *ast_data_get_xml(const struct ast_data_query *query);
+#endif
/*!
* \brief Release the allocated memory of a tree.
Modified: team/rmudgett/call_waiting/main/data.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/call_waiting/main/data.c?view=diff&rev=260568&r1=260567&r2=260568
==============================================================================
--- team/rmudgett/call_waiting/main/data.c (original)
+++ team/rmudgett/call_waiting/main/data.c Mon May 3 09:54:11 2010
@@ -1845,6 +1845,7 @@
return res;
}
+#ifdef HAVE_LIBXML2
/*!
* \internal
* \brief Helper function to move an ast_data tree to xml.
@@ -1944,6 +1945,7 @@
return doc;
}
+#endif
enum ast_data_type ast_data_retrieve_type(struct ast_data *node, const char *path)
{
More information about the asterisk-commits
mailing list