Leif Neland wrote:
I think a modification should be done around here to return busy if
just one channel was busy (only enabled if an option on dial is set)
in asterisk-1.6.0.15/apps/app_dial.c, line 610
Is somebody willing to try?
while (*to && !peer) {
struct chanlist *o;
int pos = 0; /* how many channels do we handle */
int numlines = prestart;
struct ast_channel *winner;
struct ast_channel *watchers[AST_MAX_WATCHERS];
watchers[pos++] = in;
for (o = outgoing; o; o = o->next) {
/* Keep track of important channels */
if (ast_test_flag64(o, DIAL_STILLGOING) && o->chan)
watchers[pos++] = o->chan;
numlines++;
}
Adding this here
if (num.busy) {
strcpy(pa->status, "BUSY");
*to = 0;
return NULL;
}
Seems to work
if (pos == 1) { /* only the input channel is available */
if (numlines == (num.busy + num.congestion + num.nochan)) {
ast_verb(2, "Everyone is busy/congested at this time
(%d:%d/%d/%d)\n", numlines, num.busy, num.congestion, num.nochan);
if (num.busy)
strcpy(pa->status, "BUSY");
However, I tried adding an option OPT_SINGLE_BUSY after these:
#define DIAL_STILLGOING (1 << 31)
#define DIAL_NOFORWARDHTML ((uint64_t)1 << 32) /* flags are now 64
bits, so keep it up! */
#define OPT_CANCEL_ELSEWHERE ((uint64_t)1 << 33)
#define OPT_PEER_H ((uint64_t)1 << 34)
#define OPT_SINGLE_BUSY ((uint64_t)1 << 35)
but all these constants have the value zero!
I'm compiling on FreeBSD, asterisk seems to work anyway...
Whats going on?
Leif
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users