[Asterisk-Users] 911 context, is this right?
Adam Goryachev
mailinglists at websitemanagers.com.au
Sun Jun 5 20:29:59 MST 2005
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
More information about the asterisk-users
mailing list