I got myself a free Linksys SPA2102 SIP-to-PSTN adapter from a friend. However, to my disappointment, it is locked to iTalkBB and cannot be used with other providers. I searched for various methods and shared some of my finding here.
First, the SPA2102 supports both lines, namely Line 1 and Line 2. Some operators only lock Line 1, leaving Line 2 configuration free to change. If that is the case for your device and you only need to use a single line, simply use Line 2.
If that is not the case, enter the configuration menu (****) and try a user reset (877778#). Only do a factory reset (73738#) at a last resort! A user reset will only clear the SIP account settings whereas a factory reset will clear everything, including the web portal access passwords and set them back to manufacturer defaults. For an unlocked device, this will usually be either empty or easy-to-remember password (e.g. 0000). However, for a locked unit, this is a random number set by the SIP provider that locks the device on a per-unit basis. If you factory reset and get your device to this state, you may as well buy a new one.
Next, try to enable the web portal access by 723646# and enter password 78778839#. After that, connect the WAN port to router and access Http://[ip address]:1980. Login with the following username/password pairs: user/1234 or admin/58724687.
If the password is rejected, you’ll need to find out what the password is. Luckily, the locked device will keep on posting to the settings provisioning server looking for updated SIP server settings, using the username/password in clear text. You need to use a network capture tool such as WireShark, and look for the following data packet from the ATA:
When you have successfully opened the Admin portal, remove all items from the Restricted Access Domains list. You should be able to configure both lines.
If none of the above helps, try to do a firmware update. There are 2 ways, one is by following this guide which basically asks you to open a URL on the device web portal, pass in the firmware URL and wait for flashing to be done. Another way is to flash via a Windows tool, see this.