Does anyone know how I would do this-

 

For all users who have PSTN access, they are assigned a number in the MySQL alias table which matches a PSTN DDI number.

e.g. user 8000 has an alias of 2071231234, so on an incoming call the lookup(“aliases”) function correctly matches the DDI to the user.

 

I want my ser.cfg to rewrite the user on an outgoing call, if a number exists in the alias table for that user

Obviously, the rewriteuser function will be used, but what do I put in after that?

I have tried rewriteuser (lookup (”aliases”))  but that doesn’t work

 

Can anyone help?