I have 3 analog trunks zap/1, zap/4 and zap/5. zap/5 is the least used line. Would the following work for 911 calls? [e911] exten => 911,1,ChanIsAvail(Zap/1) exten => 911,2,Dial(Zap/1/911) exten => 911,3,Hangup() exten => 911,102,ChanIsAvail(Zap/4) exten => 911,103,Dial(Zap/4/911) exten => 911,104,Hangup() exten => 911,203,ChanIsAvail(Zap/5) exten => 911,204,Dial(Zap/5/911) exten => 911,205,Hangup() exten => 911,304,SoftHangup(Zap/5-1) exten => 911,305,Wait(2) exten => 911,306,Goto(204) Did I get the Priority + 101 idea right here? Chris Coulthurst chris@shuksan.com
> I have 3 analog trunks zap/1, zap/4 and zap/5. zap/5 is the least used > line. Would the following work for 911 calls? > > [e911] > exten => 911,1,ChanIsAvail(Zap/1) > exten => 911,2,Dial(Zap/1/911) > exten => 911,3,Hangup() > exten => 911,102,ChanIsAvail(Zap/4) > exten => 911,103,Dial(Zap/4/911) > exten => 911,104,Hangup() > exten => 911,203,ChanIsAvail(Zap/5) > exten => 911,204,Dial(Zap/5/911) > exten => 911,205,Hangup() > exten => 911,304,SoftHangup(Zap/5-1) > exten => 911,305,Wait(2) > exten => 911,306,Goto(204) > > Did I get the Priority + 101 idea right here?Probably a better way to do that is to use "group=17" within the zapata.conf definitions for zap/1, zap/4, and zap/5. Then use something like exten => 911,1,Dial(Zap/g17/${EXTEN}) In your example above, if ChanIsAvail(Zap/1) finds that Zap/1 is unavailable, then priority 102 will be executed. However, what do you want to happen if Zap/1 is available (at least from asterisk's perspective), but the pstn line on Zap/1 doesn't process the call for whatever reason? If you're doing the above for a home system, you can probably handle failures in lots of different ways. But, if you're doing this for a business client, the above approach will leave you open for a fair number of legal liability issues when it doesn't work as expected. Just as a simple test, disconnect the pstn line from Zap/1 and see what happens when a call is placed.
If Zap/5 is the least-used line, dial that one first :) Other than that, you could use a dial-group as someone else suggested.> -----Original Message----- > From: Chris Coulthurst [mailto:asterisk@shuksan.com] > Sent: Friday, June 03, 2005 4:51 AM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: [Asterisk-Users] 911 context, is this right? > > > I have 3 analog trunks zap/1, zap/4 and zap/5. zap/5 is the > least used line. Would the following work for 911 calls? > > [e911] > exten => 911,1,ChanIsAvail(Zap/1) > exten => 911,2,Dial(Zap/1/911) > exten => 911,3,Hangup() > exten => 911,102,ChanIsAvail(Zap/4) > exten => 911,103,Dial(Zap/4/911) > exten => 911,104,Hangup() > exten => 911,203,ChanIsAvail(Zap/5) > exten => 911,204,Dial(Zap/5/911) > exten => 911,205,Hangup() > exten => 911,304,SoftHangup(Zap/5-1) > exten => 911,305,Wait(2) > exten => 911,306,Goto(204) > > Did I get the Priority + 101 idea right here? > > > Chris Coulthurst > chris@shuksan.com > > > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/aster> isk-users > To > UNSUBSCRIBE or update options visit: >http://lists.digium.com/mailman/listinfo/asterisk-users
On Friday 03 June 2005 05:50, Chris Coulthurst wrote:> I have 3 analog trunks zap/1, zap/4 and zap/5. zap/5 is the least used > line. Would the following work for 911 calls? > > [e911] > exten => 911,1,ChanIsAvail(Zap/1) > exten => 911,2,Dial(Zap/1/911) > exten => 911,3,Hangup() > exten => 911,102,ChanIsAvail(Zap/4) > exten => 911,103,Dial(Zap/4/911) > exten => 911,104,Hangup() > exten => 911,203,ChanIsAvail(Zap/5) > exten => 911,204,Dial(Zap/5/911) > exten => 911,205,Hangup() > exten => 911,304,SoftHangup(Zap/5-1) > exten => 911,305,Wait(2) > exten => 911,306,Goto(204)Why would you do this? Use a group: zaptel.conf: group = 9 channel => 1,4,5 [e911] exten => 911,1,Dial(Zap/g9/ww911) exten => 911,102,SoftHangup(Zap/5) exten => 911,103,Goto(1) Basically dial using the first free line in group 9. If the Dial fails, hang up zap/5 and try again. I added two 'w's in the dial string just to make sure the telco switch is ready to receive DTMF (this may not be necessary) I'm not checking other lines than 5 (there's an assumption that line 5 is always going to work but in an emergency situation I'd just as soon soft hangup all 3 channels and try again. I also *TOTALLY* disagree with using Ringing() to calm the caller. If the call's not going through they SHOULD be thinking of using an alternative way to reach 911, not calmly waiting for an answer that just wont come. -A.