> > > 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? > > > > 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? > > One thing that bothers me with this style of dialplan for emergency > numbers... What happens if you already have a emergency call on zap/5 ?? > You have disconnected one call to emergency in order to place a second > call, IMHO, that isn't a good thing to do :) > > So, question is, how can you ID that zap/5 is *currently* involved in a > emergency call? > > exten => 911,1,ChanIsAvail(Zap/1) > exten => 911,2,setgroup(911zap1) > exten => 911,3,Dial(Zap/1/911) > exten => 911,4,hangup > exten => 911,102,setgroup(911zap1) > exten => 911,103,checkgroup(1) > exten => 911,104,softhangup(Zap/1-1) > exten => 911,105,ringing ; Otherwise user might give up waiting and > panic > exten => 911,106,wait(2) > exten => 911,107,goto(1) > exten => 911,203,congestion > > Anyone like to comment on something like that?? Obviously, it can be > extended to handle multiple lines, etc... and it should avoid > dis-connecting an existing 911 call. Note, you should check priority > numbers, and etc... this is just off the top of my head...
That's all getting pretty messy, but you could stuff a value using DBput when a 911 call is made, and clear the value at the end of that call. Then on subsequent calls, use DBget to see if a 911 call is in progress. But as mentioned previously, you've made a large number of assumptions to even think you can place a 911 call this way. You could probably do something like that with an AGI script, and have a fair amount more intelligence in the decision tree. If I recall correctly, seems like someone was taking about adding global variables into asterisk, but I don't recall how global those might be (if they are even there right now). That might also be a way to track number of outstanding 911 calls. _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users