Is there a way to add prefixes to outgoing numbers before they get send to the rewritehost?

I need to take a number like 800-555-1212 and change it into 3338005551212

thanks

Andrew