If the device detects a gun-shot, it locates the shooter through triangulation of the sound and image recognition. Non-lethal defenses would be deployed automatically to prevent continued shooting: e.g. stun grenade/flashbang, tear gas, electric shock. After detecting a gun-shot, the device would record audio/video and call 911 automatically. The shooter's escape could be tracked through a network of the devices.
http://en.wikipedia.org/wiki/Electroshock_weapon#Wireless_lo...