[Asterisk-Users] Automatic Follow-Me Forwarding Based on Cell GPS

Joseph Gutowski asteriskdump at gmail.com
Wed Apr 27 18:42:47 MST 2005


Hello-

Before you all get bent out of shape, let me give you the background
on what I have -- what I need help with should be rather easy, but I
can't seem to find it on the Wiki.

All of my business cell phones are subscribed to a "tracking" feature
which uses GPS and/or tower location to send automatic alert emails
that include the telephone number and the pre-defined "zone" that
person is currently in. I already have the appropriate scripts to
parse these emails, find the telephone number and zone, and save it to
a file called agentsnumber.dat with just one word in it -- the current
zone.

What I need is a dirty and simple way to make it so when Asterisk gets
a call for exten X, the dial plan has something similar to DBGet which
will read this file and set $agentzone to whatever is in that file.
Then I can use simple gotoif statements to direct where I need the
calls to go. I'm trying to get around writing an AGI because first I
suck, and second I want it  to be obvious to anyone how to edit the
dialplan to update things -- I was hoping there was a simple way to do
this if what I want the variable to equal is the only thing in that
file.

I realize it's not perfect due to the nature of the technology, but
what I'm trying to accomplish is when a person is outside of all zones
-- calls just go to their cell phone. If they're in the "office" zone,
it will ring the cell phone and office phone. If they're in the "home"
zone, it will ring the cell phone and the home phone. Simple enough to
do, once I manage to get an Asterisk variable set to the zone name.

I've already spent a lot of time narrowing down the "zones" for our
users, and they're pretty darn good considering the majority of the
time the phone doesn't have a GPS fix (inside). I'm leaving calls to
the cell phone at all times, so calls aren't lost if someone is just
around the zone but not actually in the office.

Thank you for any suggestions.



More information about the asterisk-users mailing list