I have seen repeated instances where folks try to configure their trunking in sipxecs using the onboard pseudo-sbc for trunking and get it mostly configured, only to end up with audio issues, or inbound issues, or both.I have found voip.ms ridiculously easy to setup, probably because I have done it more than a hundred times. So I am going to try to remove the mystique from it.
- A working sipxecs installation with devices properly registered and that can call each other (internally).
- A properly configured firewall (see our post on pfsenses in this blog, http://blog.myitdepartment.net/?p=37).
- A properly configured account at voip.ms.
- A properly configured gateway in sipXconfig.
This posting tackles items three (3) and four (4).
Creating an account at voip.ms is easy. You can deposit a few dollars in the account,, and setup the options. Even if it is for testing, it costs nearly nothing to maintain an account and can be used on any system. voip.ms also has neat failover options for inbound calls and allows you to setup "sub"accounts, so you can have multiple registrations with them and do some unique call routing or centralized accounting for multiple branches. We find it very helpful to setup customer systems on the fly and test against a subaccount before having the customer get their own account.
Customer: "We use this online carrier, but we can't call this particular credit union in Minnesota."
US: "Let's see if you have these same issues calling that number using this carrier."
<BOOM!> Five minutes later the customer is ready to sign up and we can use a known working carrier with sipXecs installations.
So after you setup the voip.ms account, you will need to tweak the account setting as follows:
Dealing with Step 3, online with voip.ms.
At the voip.ms portal:
Main Menu > Account Settings (for a main account, not subaccounts) >Account Restrictions
Adjust the call timer restrictions here for US and International calls as desired.
- Click GENERAL>Music on hold = No Music-Silence [APPLY]
- Click INBOUND SETTINGS > Protocol = SIP, Device Type = IP PBX Server, Asterisk or Softswitch (otherwise ALL your DID calls use the account number in the invite). [APPLY]
- Click DEFAULT DID ROUTING>Choose the default city your calls should go to when setting up new numbers and what account/subaccount should be used by default for new numbers. [APPLY]
- Click ADVANCED>NAT = No, DTMF Mode = AUTO (or RFC2833, either is essentially the same with sipx, since it only uses RFC2833/sip), Allowed Codecs = G.711 (uncheck the others) [APPLY]
After you purchase a DID number, ensure it is pointed to the city where you have a registration and the account associated with that registration (We'll use Atlanta in this example).
Account 123456 is my main account with voip.ms. So when I create or edit DID 4345551234 I make sure it points to SIP/IAX account  and set the DID Point of Presence for "Atlanta, GA". Change the dialtimeout to 300s, and [APPLY].
Dealing with Step 4, in sipxconfig.
We will create the gateway, apply it, register it, confirm it at both sides instantly, assign a DID and send and receive a call.
Create the Gateway. I'll make it easy with screenshots:
Devices>Gateways>AddNewGateway (link at top right), choose SIP Trunk
enable it, give it a name, and choose the voip.ms template from the list, change the "address to match the city name (i.e. atlanta.voip.ms), CLICK APPLY.
Now set the dial plan up in sipxecs for outbound calls. voip.ms requires number formats in US/48 to be 1NPANXXyyyy (1+10 digits). We use tyically 4 dialplans with sipx, your needs might be different.
We create custom dialplans, and use them in this order:
In our instance if someone dials a local 7 digit number, where we have a single local area code, we simply prepend our area code to the outbound calls. With the other three rules, we ensure only 10 digits gets sent to the gateway (we strip the "1" or "+1"). In the dialplan config for the gateway we add the "1" again before sending to the provider. This helps us be able to move dialplans to different providers without having to actually edit the dialplans themselves, just the gateway configuration. If this isn't something you need or do differently, by all means do it in a way that ensures outbound calls match what the provider requires. Add the "1" in prefix, choose your dialplans you already have created in sipxconfig. [APPLY]
Now finish the gateway config for the ITSP account.
There are three fields here. username/authentication username. These are the same values, which is the account/subaccount number you have with voip.ms. The password is the sip password (not the portal password) in your voip.ms portal for the account/subaccount.[APPLY]
You will be asked to restart several services, you should do so and then wait 15 seconds or so and check to see if it is registered.
Go to Diagnostics>SIP Trunk SBC Statistics
If you did this correctly the account will show registered. NOW, go to voip.ms and see if they concur and have the proper IP:port listed.
At the voip.ms website, login, Portal home page...it should show a green REGISTERED State. Hover over the dot to the right of registered, You should see your public IP address that sipx is using (you did this setting up the firewall porting, system>server>NAT and set the static IP here or are using STUN to determine it). The IP should show your port as "5080". if it does not, you should go back and address your firewall configuration.
Dialing out it simple.
Dialing in requires the DID be put in the service DID field or user ALIAS field in the format of NPANXXYYYY (4345551234). If you used this for an auto attendant or other service, you will need to restart services prompted in order to apply this setting, user aliases do not require services restart/reload.
You should be able to set the default caller ID in the gateway (if it needs a glocal setting, or leave blank and set the caller ID in each user line as desired, don't leave both blank).
Congratulations, you have trunking and DID services setup without any paperwork in 15 minutes!