Does anyone know how to rewrite the From: URI for an incoming call?

All the rewrite functions are for outgoing URI’s – i.e. local users, but I want to rewrite a URI that is incoming from the PSTN to one of those users.

 

This is so I can add a prefix to it, so that if you dial a missed call, the prefix is automatically there so it will go out to the PSTN