stole this off http://lists.digium.com/pipermail/asterisk-users/2010-September/254263.html