Continuing on with the theme of NBN in my past few posts I thought I would make one about how you can do away with the crappy Optus branded CPE’s that are supplied for home and small business users and still use the voice service(s) that came attached to it. If you’re relatively tech savvy you should be able to flick through this grabbing the details you need. We’re going to configure a Cisco SPA112 (or SPA122) to work on the Optus VoIP network after extracting the VoIP details (user/pass) from our Sagemcom modem/router and configure it so that it will work for both voice and fax.
This article is accurate as at 21st September 2017. I take no responsibility for the content and whether Optus wish to lock down their Sagemcom modems more than they have already, preventing your freedom to use standard VoIP hardware for more functionality and flexibility.
- To start you’ll need to have your Optus branded Sagemcom plugged in and fired up with factory default settings and be able to login to the admin interface. Head over to the management part of the modem and download a configuration backup. This file will be encoded and so will need to be decoded. This is AES-256 encoded and should end in .conf
- Download and fire up the decoder software available from here. I take no responsibility for this software or it’s use, there is NO WARRANTY and attribute sincere thanks to the original author, whom I don’t know. Use at your own risk. Read the disclaimer, launch the exe and make sure the backupsettings.conf file is in the same directory then decode. Copy and paste the data from here into notepad so you don’t need to decode it each time.Alternatively if you are an OSX/Linux user you can use a Python script created by mattimustang to descrypt the backupsettings.conf file. Please follow the instructions on the Github repo when using the python version.
- Now that you’ve done that you’ll be able to see down in the file and search for VoiceProfile instance=”1″. This section will contain some items you need being:
- Proxy Server
- Outbound Proxy
- Auth Username
- Auth Password
- Within those four items, the “Auth Password” is encoded using base64 encoding. A useful site to decode this password into plaintext is https://www.base64decode.org/
- With these four items (which includes our decoded password) we can now throw away (not really, but disconnect) our Sagemcom and get into our Cisco SPA112 or SPA122 to configure some settings. So fire up a web browser and log into your SPA112 so we can punch in some settings.
- Setup the SPA112 generally with a static IP address, the correct timezone, DNS servers, region etc. After this is all done head over to the Voice menu item and click on ‘SIP’ on the left hand menu. Here we will configure RTP Packet Size to 0.030. I find this seems to work best on Optus VoIP especially for fax.
- Head into Line 1 and change some settings here:
- Set Preferred codec in Line 1 (assuming you’re using this) to G711a and set Use Pref Codec Only to yes
- Proxy is the ims01 or dns name that doesn’t resolve publicly as pulled from your Optus router.
Outbound proxy to the IP address pulled from your Optus router.
Use Outbound Proxy as yesA good alternative is to use both outbound proxies from the Optus router. This can be done by using the string
“proxies:SRV=188.8.131.52:5060:p=1:w=50|184.108.40.206:5060:p=2:w=50″Remember to replace the two IPv4 addresses shown with those pulled from your router.
Use DNS SRV: Yes
Proxy Fallback Intvl: 15
- Display Name using 61xxxxxxxxx, User ID and Auth ID using +61xxxxxxxxx, Use Auth ID seems to work both on yes and no
- NAT Mapping Enable to yes and NAT Keep Alive Enable to yes. This will of course depend on your situation with SIP ALG in your router.
- Set your Dial Plan to (*xx.|#xx.|xxxxxxxxS0|1800xxxxxx|13xx.|xx.) (thanks Andrew)
- I also got the fax working with a FaxStream result of Excellent on every test (Transmission level -18.4 and Line noise -55.1) at 14400 bits/sec with 0 bits error rate. Some additional options for fax:
– Fax Passthru Codes to G711a
– Fax Enable T38 to yes
– FAX T38 Return to Voice to no
– Network Jitter Level to medium from the default of high
– Silence Threshold to medium
– Echo Canc Enable to no
– FAX Codec Symmetric to no
– FAX Process NSE to no
– FAX Disable ECAN to no
- Lastly we can also add some regional settings (such as dialtone, hangup tone etc.). Thanks to Wahroonga Farm for compiling this document, please give credit where it’s due. Please follow the “Regional Settings” heading in bold in the document which applies here.
I’d like to thank Ken Van Mierlo (aka RedSector) for his contribution to this guide, specifically base64 decode, proxies, regional settings and troubleshooting (end of this post). I’d also like to thank PrideKnight for the suggestion of linking to the python script. Also big thanks to those such as Wahroonga Farm, mattimustang and the original author of the decryption exe file for their various resources they have made publicly available.
Please see below some screenshots of the configuration. I hope this helps you.
If you have sock_sendmsg() failed witherror -22 in the log file of SPA112 or can’t make calls but can receive them. Please look at Audio Configuration shown above use only G711a and make sure Use preferred Codec only. You will then be able to call out.