<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Leif Neland wrote:
<blockquote cite="mid:4B1387A9.5080303@neland.dk" type="cite">
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
<blockquote cite="mid:4B094CC8.6040108@neland.dk" type="cite"><br>
</blockquote>
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)<br>
in asterisk-1.6.0.15/apps/app_dial.c, line 610 <br>
<br>
Is somebody willing to try?<br>
<br>
while (*to && !peer) {<br>
struct chanlist *o;<br>
int pos = 0; /* how many channels do we handle */<br>
int numlines = prestart;<br>
struct ast_channel *winner;<br>
struct ast_channel *watchers[AST_MAX_WATCHERS];<br>
<br>
watchers[pos++] = in;<br>
for (o = outgoing; o; o = o->next) {<br>
/* Keep track of important channels */<br>
if (ast_test_flag64(o, DIAL_STILLGOING) &&
o->chan)<br>
watchers[pos++] = o->chan;<br>
numlines++;<br>
}<br>
</blockquote>
Adding this here<br>
if (num.busy) {<br>
strcpy(pa->status, "BUSY");<br>
*to = 0;<br>
return NULL;<br>
}<br>
Seems to work<br>
<blockquote cite="mid:4B1387A9.5080303@neland.dk" type="cite">
if (pos == 1) { /* only the input channel is available */<br>
if (numlines == (num.busy + num.congestion + num.nochan)) {<br>
ast_verb(2, "Everyone is busy/congested at this time
(%d:%d/%d/%d)\n", numlines, num.busy, num.congestion, num.nochan);<br>
if (num.busy)<br>
strcpy(pa->status, "BUSY");</blockquote>
<br>
However, I tried adding an option OPT_SINGLE_BUSY after these:<br>
<br>
#define DIAL_STILLGOING (1 << 31)<br>
#define DIAL_NOFORWARDHTML ((uint64_t)1 << 32) /* flags are now
64 bits, so keep it up! */<br>
#define OPT_CANCEL_ELSEWHERE ((uint64_t)1 << 33)<br>
#define OPT_PEER_H ((uint64_t)1 << 34)<br>
#define OPT_SINGLE_BUSY ((uint64_t)1 << 35)<br>
<br>
but all these constants have the value zero!<br>
<br>
I'm compiling on FreeBSD, asterisk seems to work anyway...<br>
<br>
Whats going on?<br>
<br>
Leif<br>
<br>
</body>
</html>