A method for providing least-cost routing of calls for a roaming mobile wireless device having a home phone number associated therewith, the method comprising:
- obtaining local wireless service for the mobile wireless device, including associating a local phone number with the mobile wireless device;
- detecting the association of the local phone number with the mobile wireless device using an agent on the mobile wireless device;
- establishing a wireless connection between the mobile wireless device and an enterprise network;
- registering the mobile wireless device with a common registrar coupled to the enterprise network, including providing an indication of a current location of the mobile wireless device;
- sending an acknowledgement from the common registrar to a local voice over internet protocol (VoIP) gateway coupled to the enterprise network;
- sending information from the common registrar to a home VoIP gateway coupled to the enterprise network, the information including the indication of the current location of the mobile wireless device;
- routing an inbound call to the home number associated with the mobile wireless device from the home VoIP gateway to the local VoIP gateway;
- originating an outbound call from the mobile wireless device;
- selecting, using the agent, the enterprise network for handling the outbound call, wherein the agent chooses a least cost route for the outbound call in accordance with routing rules for where the mobile wireless device is currently attached;
- providing the outbound call from the mobile wireless device to the local VoIP gateway;
- routing the outbound call from the local VoIP gateway to the home VoIP gateway;
- and
- forwarding the outbound call from the home VoIP gateway to a destination of the outbound call.