Asterisk Wi-Fi HotSpot Finder
This application works only for zip codes in the United States. This tools is not available for commercial use. However we can use this for educational and personal use. The application pull up information from 4INFO.net’s WAP service.
There are certain prerequisites to make the application works.
1) Internet connection enabled asterisk server for pulling information from 4INFO.
2) Ceptral voice synthesizer for asterisk
Add a SIP user with an that points to the context “hotspot” with extension 9434 which is actually WiFi on the keypad of the softphone or mobile phone.
Add dialplan for the context hotspot in extension.conf.
[hotspot]
exten => 9434,1,Answer
exten => 9434,2,Wait(1)
exten => 9434,3,Set(TIMEOUT(digit)=7)
exten => 9434,4,Set(TIMEOUT(response)=10)
exten => 9434,5,Flite(“At the beep enter the zip code for the Why Fye Hot Spots list to retrieve.”)
exten => 9434,6,Read(ZIPCODE,beep,5)
exten => 9434,7,Flite(“Please hold a moment while we contact Four Info dot Net for your report.”)
exten => 9434,8,AGI(nv-wifi.php|${ZIPCODE})
exten => 9434,9,NoOp(Wave file: ${TMPWAVE})
exten => 9434,10,Playback(${TMPWAVE})
exten => 9434,11,Hangup
Log on to the server as root and navigate the folder “/var/lib/asterisk/agi-bin” using the terminal.
cd /var/lib/asterisk/agi-bin
wget http://nerdvittles.com/wp-content/nv-wifi.zip
mv nv-wifi.php nv-wifi.old.php
unzip nv-wifi.zip
rm -f nv-wifi.zip
chmod 775 nv-wifi.php
chown asterisk:asterisk nv-wifi.php
vim /var/lib/asterisk/agi-bin/bv-wifi.php
Update this variables.
$paywifi = 1 ;
$freewifi = 1 ;
$ttspick=1;
We have to create a tts directory which is the place where sound files created during the execution of AGI.
Log on to the server as root and navigate the folder “/var/lib/asterisk/sounds” using the terminal.
cd /var/lib/asterisk/sounds
mkdir tts
chmod 775 tts
chown asterisk:asterisk tts
Done with configurations. You have to clean the tts folder on a periodic basis, use some crontab for that. If you are not doing this some kind of issue may pop-up which destabilize the asterisk sever with signal and sound issues.
How it operate with a phone?
1) Dial 9434
2) It will prompt you to enter a 5 digit zip code in US.
Now you can hear hear the report, if you are not hearing anything, that means no hot spot available.
Tweet This Post
Delicious
Digg This Post
Facebook
MySpace
Ping This Post
Reddit
Stumble This Post
If you enjoyed this post, make sure you subscribe to my RSS feed!


Sanil S is a technology consultant, social media consultant and an entrepreneur from gods own country, Kerala. He blog regularly about...
No Responses
Leave a comment