[asterisk-users] Asterisk dialing next extension only if first is busy?

Robert Lister robl at linx.net
Mon Apr 23 05:38:57 MST 2007


On Mon, Apr 23, 2007 at 06:18:32PM +1000, Daniel Pittman wrote:
> G'day.
> 
> I am having reasonable success getting Asterisk 1.4.2 running and doing
> what I want, but I can't figure out one particular idiom that I want:
> 
> There are a few situations where I want to have Asterisk push a call
> through to the first available transport on a list, such as:
> 
> I have two SIP ports attached to one local (two port) analog phone
> system.  I want to ring line 1 for the first call, line 2 for the second
> call and go to voicemail for the third and subsequent.
> 
> I can't work out the best way to express that.
> 
> Using "Dial(SIP/line1&SIP/line2)" will ring both lines at the same time
> which is not really what I want.

You might want to look at doing this with a queue, and then directing the 
call into the queue. There are some new queue strategies in 1.4.x that might 
do what you want, and it also has "autofill" option which might make it 
behave the way you want.

There is also a "linear" type strategy which looks like it is making its way 
into the code, which might be more suitable than roundrobin/rrmemory.

http://bugs.digium.com/view.php?id=7279

Or, you might be able to implement it by using the ChanIsAvail command in 
the dialplan (If the device is returning reasonable things.)

It can be used to test availability of a channel or a list of channels and 
returns the status, or the available channel name.

I do a similar thing here and it works very well.

http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+ChanIsAvail

Rob

-- 
Robert Lister   -   London Internet Exchange    -  http://www.linx.net/
robl at linx.net   -   tel: +44 (0)20 7645 3510    -  RL786-RIPE


More information about the asterisk-users mailing list