Cool. My first attempt would have been to find out how to use asterisk variables in the dialplan since I can set those like crazy mad via an AGI. Then i would have cried and become horribly demotivated.