When you initialize an UDP port, e.g. through the command UDPSocket1.Initialize("UDP", 5000, 8192) it works correctly but only over WiFi (LAN?).
With the above example, messages that are received on the other end indeed come from port 5000 and replying to port 5000 works as it should. However, once you disable WiFi on you phone and you're connected to the internet through 3G, the sending port is apparently chosen random. Messages arrive on the other end and replying to that port works ok, but they do not come from the port that was set in the Initialize command. Checking UDPSocket1.port just before sending data still gives port "5000" as if it is initialized correctly, so the port number somehow gets overruled....