[asterisk-users] Sequential Ring Groups?

Dave Fullerton dfullertasterisk at shorelinecontainer.com
Thu Apr 16 14:31:19 CDT 2009


Marshall Henderson wrote:
> Hi fellow Asterisk users!
> 
> I've got a PRI being used with a bunch of iaxmodems/Hylafax. I
> currently have each individual channel of the PRI in its own context
> that rings a specific iaxmodem. However, when a fax is complete on
> that modem and another call comes into it, the modem is still in a
> state of 'settling down' from the last call and I'd like to have it
> ring a different channel if possible. So essentially, instead of each
> PRI channel with a different context, I'd like to see one context that
> simply handles calls to any available IAX peer (iaxmodem). How is this
> done? I can certainly use the Dial() app to ring a bunch of extensions
> at once but I'd like to have it try the first modem, if busy, then the
> second, etc until one is available and answers.
> 
> I'm not using FreePBX for this fax server but am using it on my voice
> PBX. Looking at the code for the 'firstavailable' ring group strategy
> is of no help since its clouded within a whole mess of other functions
> within [macro-dial]. Any ideas or pointers? THANKS!
> 

This is how I'm doing it (AEL notation):

context inbound-pri {
   FAXNBRHERE => {
     Dial(IAX2/iaxmodem00/${EXTEN});
     Dial(IAX2/iaxmodem01/${EXTEN});
     Dial(IAX2/iaxmodem02/${EXTEN});
     Dial(IAX2/iaxmodem03/${EXTEN});
     // Et cetera ...
     Busy();
   }
}

Call comes in, starts at the top and if that modem is busy asterisk 
moves on to the next line. If all the modems are busy then a busy 
indication is sent back to the caller.

-Dave



More information about the asterisk-users mailing list