That's an interesting idea; fetching a PHP file that actually does "the
thing".  I'm not quite smart enough to implement this but maybe this will
spark some ideas with Curt.

On Tue, Mar 31, 2015 at 2:35 PM, Tilghman Lesher <[email protected]>
wrote:

> Instead of directly loading HTML files, does the application allow you
> to load, for example, a PHP file?
>
> absent.php:
>
> $db->query("UPDATE presence SET location='away' WHERE user='chris'");
>
> present.php:
>
> $db->query("UPDATE presence SET location='campus' WHERE user='chris'");
>
> Asterisk func_odbc.conf:
>
> [PRESENCE]
> readsql=SELECT location FROM presence WHERE user='${ARG1}'
>
> Asterisk extensions.conf:
>
> exten => s,n,GotoIf($[${ODBC_PRESENCE(chris)}=away]?deskphone:cellphone)
> exten => s,n(deskphone),Dial(...)
> exten => s,n,Voicemail(...)
> exten => s,n,Hangup
> exten => s,n(cellphone),Dial(...)
>
>
> On Tue, Mar 31, 2015 at 1:02 PM, Chris McQuistion
> <[email protected]> wrote:
> > That's not a bad idea, Kent, but I believe our DHCP lease is 24 hours
> > (perhaps longer), so it would take a very long time to release.
> >
> > My most recent idea is to use IFTTT to download a web file to my Dropbox
> > when I'm entering an area or leaving an area.
> >
> > The web server will have a log of that file being accessed and the
> contents
> > of the file is unimportant, as is it's existence in Dropbox.  The
> important
> > part is that the web server logs would know when the file is accessed.
> That
> > access stamp can be used to perform an action on the server and there
> would
> > be no need for the server to download any files or have any 3rd party
> > software installed.
> >
> > When I roam INTO the geographic area of work, IFTTT (on my behalf)
> downloads
> > examplesite.com/present.html to my Dropbox.  When I road OUT of the
> > geographic area or work, IFTTT downloads examplesite.com/absent.html to
> my
> > Dropbox.  Additionally, I set up the "DO" app on my phone with two
> buttons
> > that do the same thing, so I can manually enable or disable forwarding by
> > going and fetching those files.
> >
> > On Tue, Mar 31, 2015 at 12:52 PM, Kent Perrier <[email protected]>
> > wrote:
> >>
> >> What is you DHCP lease length? Can you have something that that checks
> the
> >> for the mac address of the phone in the DHCP leases and if it is there,
> do
> >> the needful on VOIP box, otherwise don't forward calls to your cell
> phone?
> >> If the lease is short enough, that could work.
> >>
> >> Kent
> >>
> >> On Tue, Mar 31, 2015 at 12:17 PM, Tilghman Lesher <[email protected]
> >
> >> wrote:
> >>>
> >>> I suspect the Google Docs/Dropbox is simply manipulating various URLs
> >>> via some RESTful API.  If you can instead load an arbitrary URL, I'd
> >>> suggest one that hooks into a CGI script running on your Asterisk
> >>> server (or another local web server) that simply sets a value in a
> >>> database row.  Your PBX can then reference that database row using my
> >>> func_odbc module (built-in to Asterisk since the 1.4 days).
> >>>
> >>> On Tue, Mar 31, 2015 at 12:05 PM, Chris McQuistion
> >>> <[email protected]> wrote:
> >>> > Some good ideas here (multiple sensors (maybe low-power bluetooth) to
> >>> > detect
> >>> > incoming path vs outgoing path) and some not-so-good-ideas
> (implanting
> >>> > sensors inside of my body....)
> >>> >
> >>> > iOS (and I assume Android as well) have low power background app
> >>> > refresh (at
> >>> > least this is what Apple calls it) that you can use for geo-location.
> >>> > It
> >>> > isn't actually using GPS, as that would chew up battery power.  It
> is a
> >>> > background process that uses info from WiFi networks, cell towers,
> etc,
> >>> > to
> >>> > determine location "passively", so it doesn't chew up a lot of
> battery
> >>> > power.
> >>> >
> >>> > What I got working yesterday was two IFTTT "recipes" to create files
> in
> >>> > Google Docs and Dropbox for each time I enter or exit the Watkins
> area.
> >>> > That part actually works.  The next step is doing something with that
> >>> > information (from Google Drive or Dropbox) to launch an action on our
> >>> > VoIP
> >>> > server.
> >>> >
> >>> > It still seems kludge-y to me, but I haven't heard a better
> suggestion
> >>> > that
> >>> > less power (and is fully automated.)
> >>> >
> >>> > Chris
> >>> >
> >>> > On Tue, Mar 31, 2015 at 6:02 AM, JMJ <[email protected]> wrote:
> >>> >>
> >>> >> On 03/31/2015 12:54 AM, Tilghman Lesher wrote:
> >>> >>>
> >>> >>> That's also why I suggested that you place two proximity detectors
> >>> >>> along a single path.  The order in which they activate then
> indicates
> >>> >>> ingress or egress.
> >>> >>
> >>> >>
> >>> >> And since nobody has mentioned using a Raspberry Pi yet... you could
> >>> >> make
> >>> >> a proximity detector out of a Raspberry Pi with a camera and/or a
> USB
> >>> >> Bluetooth gadget.
> >>> >>
> >>> >> If the work schedule is consistent, you could just schedule the PBX
> to
> >>> >> route calls based on the time of day.  Yeah, I know... who has a
> >>> >> consistent
> >>> >> work schedule any more?  heh heh
> >>> >>
> >>> >> JMJ
> >>> >>
> >>> >>
> >>> >> --
> >>> >> --
> >>> >> You received this message because you are subscribed to the Google
> >>> >> Groups
> >>> >> "NLUG" group.
> >>> >> To post to this group, send email to [email protected]
> >>> >> To unsubscribe from this group, send email to
> >>> >> [email protected]
> >>> >> For more options, visit this group at
> >>> >> http://groups.google.com/group/nlug-talk?hl=en
> >>> >>
> >>> >> --- You received this message because you are subscribed to the
> Google
> >>> >> Groups "NLUG" group.
> >>> >> To unsubscribe from this group and stop receiving emails from it,
> send
> >>> >> an
> >>> >> email to [email protected].
> >>> >> For more options, visit https://groups.google.com/d/optout.
> >>> >
> >>> >
> >>> > --
> >>> > --
> >>> > You received this message because you are subscribed to the Google
> >>> > Groups
> >>> > "NLUG" group.
> >>> > To post to this group, send email to [email protected]
> >>> > To unsubscribe from this group, send email to
> >>> > [email protected]
> >>> > For more options, visit this group at
> >>> > http://groups.google.com/group/nlug-talk?hl=en
> >>> >
> >>> > ---
> >>> > You received this message because you are subscribed to the Google
> >>> > Groups
> >>> > "NLUG" group.
> >>> > To unsubscribe from this group and stop receiving emails from it,
> send
> >>> > an
> >>> > email to [email protected].
> >>> > For more options, visit https://groups.google.com/d/optout.
> >>>
> >>>
> >>>
> >>> --
> >>> Tilghman
> >>>
> >>> --
> >>> --
> >>> You received this message because you are subscribed to the Google
> Groups
> >>> "NLUG" group.
> >>> To post to this group, send email to [email protected]
> >>> To unsubscribe from this group, send email to
> >>> [email protected]
> >>> For more options, visit this group at
> >>> http://groups.google.com/group/nlug-talk?hl=en
> >>>
> >>> ---
> >>> You received this message because you are subscribed to the Google
> Groups
> >>> "NLUG" group.
> >>> To unsubscribe from this group and stop receiving emails from it, send
> an
> >>> email to [email protected].
> >>> For more options, visit https://groups.google.com/d/optout.
> >>
> >>
> >> --
> >> --
> >> You received this message because you are subscribed to the Google
> Groups
> >> "NLUG" group.
> >> To post to this group, send email to [email protected]
> >> To unsubscribe from this group, send email to
> >> [email protected]
> >> For more options, visit this group at
> >> http://groups.google.com/group/nlug-talk?hl=en
> >>
> >> ---
> >> You received this message because you are subscribed to the Google
> Groups
> >> "NLUG" group.
> >> To unsubscribe from this group and stop receiving emails from it, send
> an
> >> email to [email protected].
> >> For more options, visit https://groups.google.com/d/optout.
> >
> >
> > --
> > --
> > You received this message because you are subscribed to the Google Groups
> > "NLUG" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> > http://groups.google.com/group/nlug-talk?hl=en
> >
> > ---
> > You received this message because you are subscribed to the Google Groups
> > "NLUG" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to [email protected].
> > For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> Tilghman
>
> --
> --
> You received this message because you are subscribed to the Google Groups
> "NLUG" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nlug-talk?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "NLUG" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the Google Groups 
"NLUG" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nlug-talk?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"NLUG" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to