Hi, So I've done my research on Chanisavail, read the wiki, checked the archive but can't seem to find anything to suit my scenario. I've played around with it a lot, but I'm still scratching my head on what I need to do. What I need is to be able to accept a call by SIP and ring all telephones that are not in use (which just so happen to be on Zap interfaces, but might be SIP in the future). What I have now is this (I know it's really bad): exten => 16465555555,1,Answer() exten => 16465555555,2,Dial(Local/105@local&Local/106@local&Local/110@local&Local/112@local,30) exten => 16465555555,3,ChanisAvail(Local/105@local&Local/106@local) exten => 16465555555,4,Cut(DESK3=AVAILCHAN||1) exten => 16465555555,5,ChanisAvail(Local/110@local&Local/112@local) exten => 16465555555,6,Cut(DESK4=AVAILCHAN||1) exten => 16465555555,7,Dial(${DESK3}&${DESK4},30,tr) exten => 16465555555,8,Busy (Each local is 1 zap interface) Which is sort of my temporary work around to the problem for now, first if there are no phones in use all phones will ring, if not it will return busy and then it is checked to see if there is anything available to ring between those 2 "groups" there. If only one phone is in use only 2 channels will ring right now (obviously). What I need is for any available channel to ring. Any thoughts? Thanks, Jay
Perhaps I'm missing something here, but why not just have asterisk dial all the phones regardless? No need to check what's available or not, just dial all of them. If you don't want users on the phone to hear a call-waiting beep, just make sure call-waiting is disabled. Any phones that are able to ring will do so, the ones that are busy obviously will not. If I am missing something, let me know, but this seems to be the easiest solution and will do what you said you need. Dial all phones, and all that are available will ring, the rest will just return a busy message which asterisk should ignore, as long as one phone somewhere is not busy. I haven't run into this, but I would assume if all phones were busy that asterisk would then go to priority +101, so you could send them straight to voicemail. Joseph Tanner On 2/14/06, Jayson Navitsky <jnavitsky@gmail.com> wrote:> Hi, > > So I've done my research on Chanisavail, read the wiki, checked the > archive but can't seem to find anything to suit my scenario. I've > played around with it a lot, but I'm still scratching my head on what > I need to do. > > What I need is to be able to accept a call by SIP and ring all > telephones that are not in use (which just so happen to be on Zap > interfaces, but might be SIP in the future). > > What I have now is this (I know it's really bad): > > exten => 16465555555,1,Answer() > exten => 16465555555,2,Dial(Local/105@local&Local/106@local&Local/110@local&Local/112@local,30) > exten => 16465555555,3,ChanisAvail(Local/105@local&Local/106@local) > exten => 16465555555,4,Cut(DESK3=AVAILCHAN||1) > exten => 16465555555,5,ChanisAvail(Local/110@local&Local/112@local) > exten => 16465555555,6,Cut(DESK4=AVAILCHAN||1) > exten => 16465555555,7,Dial(${DESK3}&${DESK4},30,tr) > exten => 16465555555,8,Busy > > (Each local is 1 zap interface) > > Which is sort of my temporary work around to the problem for now, > first if there are no phones in use all phones will ring, if not it > will return busy and then it is checked to see if there is anything > available to ring between those 2 "groups" there. If only one phone > is in use only 2 channels will ring right now (obviously). > > What I need is for any available channel to ring. > > Any thoughts? > > Thanks, > Jay > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
See the problem is when I do Dial(Local/105@local&Local/106@local&Local/110@local&Local/112@local,30) If someone is on the phone it returns Busy and then kills the incoming call. ChanIsAvail would work great if I was going out to the PSTN looking for a channel, but the problem is that I need the reverse, I need a "ChanNotAvail" basically saying not to ring that line. Argh, this one has me really scratching my head. Thanks for the info guys. -J>I was gonna say use a queue of sorts, throw the devices into the queue >and tell it to ring all. I haven't played with it, but I would assume >that if a line's in use, it won't ring that person. > >Aaron > >Joseph Tanner wrote: >> Perhaps I'm missing something here, but why not just have asterisk >> dial all the phones regardless? No need to check what's available or >> not, just dial all of them. If you don't want users on the phone to >> hear a call-waiting beep, just make sure call-waiting is disabled. >> Any phones that are able to ring will do so, the ones that are busy >> obviously will not. >> >> If I am missing something, let me know, but this seems to be the >> easiest solution and will do what you said you need. Dial all phones, >> and all that are available will ring, the rest will just return a busy >> message which asterisk should ignore, as long as one phone somewhere >> is not busy. I haven't run into this, but I would assume if all >> phones were busy that asterisk would then go to priority +101, so you >> could send them straight to voicemail. >> >> Joseph Tanner >> >> On 2/14/06, Jayson Navitsky <jnavitsky@gmail.com> wrote: >> Hi, >> >> So I've done my research on Chanisavail, read the wiki, checked the >> archive but can't seem to find anything to suit my scenario. I've >> played around with it a lot, but I'm still scratching my head on what >> I need to do. >> >> What I need is to be able to accept a call by SIP and ring all >> telephones that are not in use (which just so happen to be on Zap >> interfaces, but might be SIP in the future). >> >> What I have now is this (I know it's really bad): >> >> exten => 16465555555,1,Answer() >> exten => 16465555555,2,Dial(Local/105@local&Local/106@local&Local/110@local&Local/112@local,30) >> exten => 16465555555,3,ChanisAvail(Local/105@local&Local/106@local) >> exten => 16465555555,4,Cut(DESK3=AVAILCHAN||1) >> exten => 16465555555,5,ChanisAvail(Local/110@local&Local/112@local) >> exten => 16465555555,6,Cut(DESK4=AVAILCHAN||1) >> exten => 16465555555,7,Dial(${DESK3}&${DESK4},30,tr) >> exten => 16465555555,8,Busy >> >> (Each local is 1 zap interface) >> >> Which is sort of my temporary work around to the problem for now, >> first if there are no phones in use all phones will ring, if not it >> will return busy and then it is checked to see if there is anything >> available to ring between those 2 "groups" there. If only one phone >> is in use only 2 channels will ring right now (obviously). >> >> What I need is for any available channel to ring. >> >> Any thoughts? >> >> Thanks, >> Jay >> ______
On Tue, Feb 14, 2006 at 10:17:16AM -0500, Jayson Navitsky wrote:> Hi, > > So I've done my research on Chanisavail, read the wiki, checked the > archive but can't seem to find anything to suit my scenario. I've > played around with it a lot, but I'm still scratching my head on what > I need to do. > > What I need is to be able to accept a call by SIP and ring all > telephones that are not in use (which just so happen to be on Zap > interfaces, but might be SIP in the future). > > What I have now is this (I know it's really bad): > > exten => 16465555555,1,Answer() > exten => 16465555555,2,Dial(Local/105@local&Local/106@local&Local/110@local&Local/112@local,30)Do you check the return status from Dial?> exten => 16465555555,3,ChanisAvail(Local/105@local&Local/106@local)What should that return? Local/105@local should always be available, right? (or maybe never, if that is how Local works). I figure you need to use the actual channel name (Zap/nnn) if you want to use ChanisAvail .> exten => 16465555555,4,Cut(DESK3=AVAILCHAN||1) > exten => 16465555555,5,ChanisAvail(Local/110@local&Local/112@local) > exten => 16465555555,6,Cut(DESK4=AVAILCHAN||1) > exten => 16465555555,7,Dial(${DESK3}&${DESK4},30,tr) > exten => 16465555555,8,Busy > > (Each local is 1 zap interface) > > Which is sort of my temporary work around to the problem for now, > first if there are no phones in use all phones will ring, if not it > will return busy and then it is checked to see if there is anything > available to ring between those 2 "groups" there. If only one phone > is in use only 2 channels will ring right now (obviously). > > What I need is for any available channel to ring. > > Any thoughts? > > Thanks, > Jay > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users-- Tzafrir Cohen | tzafrir@jbr.cohens.org.il | VIM is http://tzafrir.org.il | | a Mutt's tzafrir@cohens.org.il | | best ICQ# 16849755 | | friend
I managed to work around my Dialplan. The ChanIsAvail application is great, except it only returns the 1st available channel. Could there be a ChansAreAvail which returns all the channels available instead of just the first. I'm sure it could be implemented as a macro or I guess a rewrite of the code. Anyone want a go? Steve -- NetTek Ltd UK mob +44-(0)7775 755503 UK +44-(0)20 79932612 / US +1-(310)8577715 / Fax +44-(0)20 7483 2455 Skype/GoogleTalk/AIM/Gizmo/Mac stevekennedyuk / MSN steve@gbnet.net Euro Tech News Blog http://eurotechnews.blogspot.com