Android 2.3 (Gingerbread) and newer versions support a built in SIP/VoIP (Voice over IP) functionality. This widget has two buttons: the left one gives you a shortcut to the SIP settings. The second one allows you to select how calls should be routed primarily: you can select whether all calls should be made via SIP by default, only Internet calls via SIP, or if you want to be asked before each call.
For Cyanogenmod-Devices, there's a quick settings tile available.
For Android 5 (Lollipop) devices and newer:
Google changed the SIP API, so the functionality has changed. The left button now redirects to call settings, it's one click from there to SIP settings. A direct link to SIP settings is currently not possible due to restrictions of Android 5, sorry. The right button (and also the quick settings tile) now switches whether all calls are made through SIP, or only ones going to a SIP address. Please set "Ask first" for "Make calls with" in "phone account settings", then this button will toggle between asking and making calls through cell phone network by default.
Please note that by default the built in SIP functionality on Android only works via Wifi on most devices! Furthermore, some ROMs of network providers (branded phones) disable the SIP functionality. If you can't find SIP settings in your phone's settings, this widget probably won't work correctly.
You can find the source code of this widget on GitHub:
* Support for Android 5 Lollipop (please read description, functionality is different for Android 5 devices!)
* More language localizations
* For Cyanogenmod-Devices: tile in quick settings available
* Improved icons