Cisco SPA112 SPA122 Configuration for Optus VoIP Phone Service

Cisco SPA112 SPA122 Configuration for Optus VoIP Phone Service

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.

  1. 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
  2. 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.

  3. 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:
    1. Proxy Server
    2. Outbound Proxy
    3. Auth Username
    4. Auth Password
  4. 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/
  5. 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.
  6. 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.
  7. Head into Line 1 and change some settings here:
    1. Set Preferred codec in Line 1 (assuming you’re using this) to G711a and set Use Pref Codec Only to yes
    2. 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=210.49.224.68:5060:p=1:w=50|210.49.225.68: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
    3. Display Name using 61xxxxxxxxx, User ID and Auth ID using +61xxxxxxxxx, Use Auth ID seems to work both on yes and no
    4. 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.
    5. Set your Dial Plan to (*xx.|#xx.|[23478]xxxxxxxxS0|1800xxxxxx|13xx.|xx.) (thanks Andrew)
  8. 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
  9. 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.

Credits

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.

 

Troubleshooting advice:
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.

9 comments on "Cisco SPA112 SPA122 Configuration for Optus VoIP Phone Service"

  1. Andrew says:

    I have been trying since my switch over to NBN, one month ago, to have my multifunction printer send and receive facsimiles like it did when connected to DSL. These are the only configuration settings that worked on first run. Thank you very much. People may need the Optus Dial Plan too: (*xx.|#xx.|[23478]xxxxxxxxS0|1800xxxxxx|13xx.|xx.)

    1. Matt says:

      Thanks Andrew! I have just updated the post with the dial plan

  2. Damo says:

    On the screenshots
    these settings are different
    Use DNS SRV: Yes
    Proxy Fallback Intvl: 15
    what are the correct settings ?

    1. Matt says:

      Hi Damo,

      Settings you listed are only required if using the failover feature for the proxies on the spa112. These were added the other day after some great feedback from a reader hence the screenshots not being up to date.

      Matt

  3. Chris says:

    Hey Matt,

    I have tried everything. I’ve got inbound calls no worries, but cannot for the life of me call outbound calls to connect. I have a dial tone, but I just get dead air for 5 seconds and then an engaged signal.

    I’ve tried using different dial plans, checked my SIP ALG is off on the router, and just about everything else I can find online to play with.

    Any other ideas?

    Thank you so much for the guide though, it was the first thing that let me get authentication happening (I’m PrideKnight by the way)

    Cheers

    1. Matt says:

      Hi Chris, did it stop working recently when it was working previously? Or has something else changed? A lot of what I wrote in this guide was all trial and error over a good day or so and then quite a number of helpful people have submitted feedback publicly and privately to me which I have added to it.

      I’d say backup the config and start from a factory reset of the SPA112 if you haven’t already just to see whether some other value has been modified during your troubleshooting that you don’t remember or didn’t intentionally do. Then perhaps try another router, different make/model if you can get your hands on it to rule that out. Personally I use MikroTik almost everywhere due to the extensive advanced featureset and low cost.

      Sorry I can’t offer more of a concrete solution as it has been a lot of trial and error for me as well.

  4. Chris says:

    All good mate, I was actually trying again off a factory reset tonight when I sent this. I seem to recall that when I first got it working with your instructions that I could make outbound calls. I’ll keep playing. Thanks again for your help!

  5. DCS730 says:

    Hi all – For those who are having an issue with making outgoing calls, read the instructions above. I missed it a number of times.

    I registered ok, about to recieve calls, but NOT make any out going calls at all. Either an engaged signal or total DEAD silence.

    Then I stumbled across the Troubleshooting Advice.

    Troubleshooting advice:
    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.

    And also implement the same changes as per the screen shot. Worked for me.

    I overlooked it a number of times and was going crazy. Felt like I was so close… Then it worked.

    Love your work guys.

    1. Matt says:

      Thank you!

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact

We'd love to hear from you.

Level 1, 191 St Georges Tce
PERTH WA 6000
Australia View map

Phone (WA):
08 6388 8090

Phone (NSW):
02 8234 8870

Phone (VIC):
03 9452 6930

Email:
support@spiderwebsolutions.com.au