
Sipdroid is a free application for Android that provides SIP client functionality, enabling you to connect to a SIP-based IP PBX, such as Asterisk, over both WiFi and 3G networks (provided that your operator supports it).
Before the Android device can be used as a remote extension, there are a number of pre-requisites that need to be satisfied on the server:
The Asterisk server must have a ‘real world’, ‘routable’, ‘public’, or ‘Internet-facing’ IP address that is available from the Internet. Without this, no remote connectivity will be possible.
If the server is behind a firewall, then UDP port 5060 should be allowed through to the server from the Internet, for SIP signalling traffic. The UDP port range 10000 to 20000 must also be allowed through for RTP traffic (the ‘media’ of the telephone conversation).
The Asterisk server must also be ‘made aware’ of its own external IP address as well as the local network on which it sits:
Log into the admin interface for the server via the web interface and browse to Tools → Config Edit. Locate the ‘sip_nat.conf’ file and add the following lines:
nat=yes externip=81.138.13.178 localnet=10.0.0.0/255.255.255.0
(you will need to substitute the above IP details for the configuration of your own external and internal network addressing scheme).
Once these pre-requisites have been satisfied, you must now create an extension on the system for the phone to register as.
Within the admin interface, add an extension in the correct number range (1xx would be suitable for remote extensions to identify them as such and separate them from the 2xx internal extensions, for example).
Set the Outbound CID number to match that of the person’s desk extension.
Set the secret to password or something suitable.
Set the NAT field to ‘yes’
Disable voicemail.

(Optional)
Create a ring group and add the person’s desk extension and the Android handset as members. Set the Inbound route for the person’s DDI to point to the ring group.
Set the ring strategy to ring all.
Submit and Apply the changes.
Now we are ready to configure the Sipdroid client on the Android device.

Enter in the extension number in the Username field, and the password as defined in the properties of the extension ('sippassword' in this case).
Enter in the external IP address or DNS name of the Asterisk server.
That should be all you need to enter. Should you need to enter additional settings including dial prefixes, advanced options are available:

Provided that the device is able to contact the server, you will be logged in automatically and any calls made from the Sipdroid client will be routed via the Asterisk server:
