<!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:4B094CC8.6040108@neland.dk" type="cite">
<blockquote
cite="mid:e0eb5a7a527b1e1029991a2672e388f4@inputinterior.se"
type="cite">
<div style="font-family: Arial; font-size: 14px;">
<div style="font-family: Arial; font-size: 14px;">But my problem
comes when I speak on 0317998985 and someone calls on
985, the call<br>
get to my celluar phone and ofc the other way around.<br>
<br>
Is there a way to check if any extension is busy and in that case jump
to VoiceMail(<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
href="mailto:0317998985@inputinterior.se,b">0317998985@inputinterior.se,b</a>)?</div>
</div>
</blockquote>
<br>
If both phones were directly connected sip, it could be done.<br>
The problem is that you can't determine if the cellular is busy before
you call it.<br>
...<br>
</blockquote>
<blockquote cite="mid:4B094CC8.6040108@neland.dk" type="cite">The other
option is to modify the source, and add an option to the
dial-command, to exit if any extension dialled is busy.<br>
After all, this is open source :-)<br>
<br>
Leif<br>
<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>
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");<br>
else if (num.congestion)<br>
strcpy(pa->status, "CONGESTION");<br>
else if (num.nochan)<br>
strcpy(pa->status, "CHANUNAVAIL");<br>
} else {<br>
ast_verb(3, "No one is available to answer at this time
(%d:%d/%d/%d)\n", numlines, num.busy, num.congestion, num.nochan);<br>
}<br>
*to = 0;<br>
return NULL;<br>
}<br>
<br>
Preferably, either the dialcommand should be preceeded with a
ChanIsAvail on the sip first, as there is no need to place a toll-call
to the cell if the sip is busy. Or the dialcommand itself should have
an option to delay one or more of the calls in the dialstring
(Dial(Technology/resource[&Tech2/resource2...]). But this would
probably be too messy...<br>
<br>
<br>
Leif<br>
<br>
</body>
</html>