Hi,
As mention everything work fine while working on Intra zone
Make sure the following points while working on Relay server environment.
1. Rs config need to be properly configured
2. Outbound enabler should be properly configured and communicating with relay server
3. Ports between relay server and public ip should be open ( 80,443).
4. port between afaria server and relay server should be open (Telnet and ping enabled).
5. SSL certificate need to be configured on relay server
6. SSL certificated should be browse at the time of installation of IPHONESERVER package.
7. On Afaria console make sure to configure proper setting of CA , Enrollment server.
8. Relay server setting on console should be disable.
9. check the tiny url path.