It is recommend you choose a port within the dynamic RPC ranger (1024-65535).
Static port for MAPI Service on CAS server
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeRpc\ParametersSystem (need to create a Dword called "TCP/IP Port" with value as you define)
Static port for Address book Service on CAS server
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\MSExchangeAB\Parameters (need to create a key called parameter under that Dword called "RpcTcpPort" with value as you define)
Note: Earlier without service pack 1, changes were to be done in file called "Microsoft.exchange.addressbook.service.exe.config" with having "RpcTcpPort” keyword with desired value.
Static port for Public folder service on MBX Server
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeRPC\ParametersSystem (need to create a Dword called "TCP/IP Port" with value as you define)