Using KiwiVoIP with Orcon's Netcomm NF4V Router

I wanted to use KiwiVoIP with my Netcomm NF4V router supplied by Orcon. However, the fields to modify the settings are readonly. Luckily that can be solved a little JavaScript :)

Log on to the router and head to the Voice -> SIP Basic Setting. Once there run the following JavaScript in the developer console.

(function() {
	var readonly = document
		.querySelectorAll('frame[name="basefrm"]')[0]
		.contentWindow
		.document
		.querySelectorAll('input[readonly]');

	for (var i = 0; i < readonly.length; i++)	{
		readonly[i].removeAttribute('readonly')
	}
})();

Now there are no more readonly fields and you can change the configuration to work with KiwiVoIP as shown below.

Kiwi VoIP Configuration

You can check to see if it worked by going to Voice -> VoIP Status

Kiwi VoIP Status

Hope someone finds this useful.

Disclaimer, don't blame me if you do it wrong or get in trouble :)