Outbound call whitelisting

Hi,

I needed a tutorial on how to make a file based whitelist for outbound calls. Since I could not find one, I wrote my own, and I am posting it here if anyone else has a use for it:
http://binaryheartbeat.blogspot.com/2014/03/asterisk-outbound-whitelisting.html

If you have any ideas on improving it, please post here.