One possible solution is that you grant Asterisk access to the mailboxes with as a master user with a (strong) master password. See the wiki for more information:http://wiki.dovecot.org/Authentication/MasterUsers
Excellent, that looks like a perfect solution to the problem.