Re: [Asterisk-Users] 911 context, is this right?
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. ___ 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
Re: [Asterisk-Users] 911 context, is this right?
On Mon, 2005-06-06 at 07:17 -0400, Andrew Kohlsmith wrote: 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? Why would you do this? Use a group: Yes, use a group... but... 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) Boom, you just hungup on the emergency call that was already in progress I wouldn't call that even close to ideal. PS, you might at least somehow randomise the line you will hangup on... 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) This will delay the call being sent, with absolutely no feedback to the caller. 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. Yes, line 5 may not work, and also line 5 is more likely to have another emergency call in progress. I disagree with hanging up channels in this manner... IMHO, it is worse to hangup an emergency call in-progress than to simply return congestion You must check that the call in progress isn't itself an emergency call. 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. But the call *IS* going through, I just allowed the caller to hear ringing for 2 seconds instead of dead-air. We just made a line available for him, so what makes you think it won't go through? (OK, someone else might steal the line while we are waiting...). Of course, after the two seconds, if the line is busy, they will hear busy, and then be able to decide the best course of action Perhaps retry, etc... In any case, whether you use a group, or play ringing, or don't, etc... IMHO, is irrelevant, what all of these dialplans are missing is the importance of NOT disconnecting an emergency call which is in-progress. Of course, that is just my 0.02c worth... Regards, Adam ___ 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
Re: [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? Why would you do this? Use a group: Yes, use a group... but... 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) Boom, you just hungup on the emergency call that was already in progress I wouldn't call that even close to ideal. PS, you might at least somehow randomise the line you will hangup on... 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) This will delay the call being sent, with absolutely no feedback to the caller. 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. Yes, line 5 may not work, and also line 5 is more likely to have another emergency call in progress. I disagree with hanging up channels in this manner... IMHO, it is worse to hangup an emergency call in-progress than to simply return congestion You must check that the call in progress isn't itself an emergency call. 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. But the call *IS* going through, I just allowed the caller to hear ringing for 2 seconds instead of dead-air. We just made a line available for him, so what makes you think it won't go through? (OK, someone else might steal the line while we are waiting...). Of course, after the two seconds, if the line is busy, they will hear busy, and then be able to decide the best course of action Perhaps retry, etc... In any case, whether you use a group, or play ringing, or don't, etc... IMHO, is irrelevant, what all of these dialplans are missing is the importance of NOT disconnecting an emergency call which is in-progress. Of course, that is just my 0.02c worth... Never did answer whether this effort is focused on a home system or on a small business. It does make a difference. If you are insistent on doing the above, then at least consider giving the second 911 caller a recorded message that says a 911 call is in progress instead of arbitrarily dumping _any_ calls. Assuming a reasonable size fire in a business, you're almost guaranteed to have multiple 911 calls originating from employees that don't have a clue that other calls are already in progress. By using the call dumping approach, you couldn't possibly program a resonable dialplan that takes every assumption into consideration, regardless of how you program it. Murphy's law also says your system/dialplan will fail at the most inopportune time. Therefore, if you don't have an alternative plan (that does not rely on *), we'll watch for your case to show up in the court records. /* end of comments on this thread for me */ ___ 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
Re: [Asterisk-Users] 911 context, is this right?
On Fri, 2005-06-03 at 08:28 -0600, Rich Adamson 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) 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... Regards, Adam ___ 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
Re: [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? 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
Re: [Asterisk-Users] 911 context, is this right?
On Sun, 2005-06-05 at 21:13 -0600, Rich Adamson wrote: 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 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. What is better about dbput/dbget compared to setgroup/checkgroup ?? Also, how do you ensure that the db value will be removed at hangup time? setgroup/checkgroup do this automatically for you ... But as mentioned previously, you've made a large number of assumptions to even think you can place a 911 call this way. Like what? (Seriously...) You could probably do something like that with an AGI script, and have a fair amount more intelligence in the decision tree. Of course, but there is a lot that you *can* do in an AGI that you *can* do in the dialplan... It might look better/cleaner as an AGI, but the dialplan would probably have lower overhead Also, do you want to rely on some external scripting language for emergency calls? What if someone upgraded your version of (for example) perl, so that now your AGI doesn't work?? or some module has been removed etc... 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. Again, how do you remove that global variable ?? I thought about those two option before discarding them and proposing the above If you could let me know why you think global variables or db values are 'better' I'd appreciate it. Regards, Adam ___ 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
Re: [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? 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. ___ 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
RE: [Asterisk-Users] 911 context, is this right?
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:[EMAIL PROTECTED] 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 [EMAIL PROTECTED] ___ 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 ___ 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