Add replace global variables with class variables.
Add functionality to connect to asterisk db

This sort of complicates the process, but the speed gains are
incredible.
Merge branch 'master' of github.com:dhahn/elastix into refactor