I recently worked with a client who had a branch site in Mexico and decided to do an office move. Part of this office move was getting new connectivity. Axtel was the chosen carrier for Internet and SIP service because they are one of the largest providers in Mexico. This was my first experience with Axtel and it was a bit rocky. There are a couple of things I want to go through in this blog.
- How to setup an AudioCodes SBC to register to a SIP provider over the internet
- How to do message manipulation when your inbound invite and your To field do not match.
I won’t be covering how to configure the AudioCodes from scratch as there are many blogs on how to do this.
One note I’d like to make is that Axtel has two was to do registration.
- Each number/line has to register
- One registration for all numbers
From my testing it appears in order for a line or number to register it needs to place an outbound call, at which point Axtel sends a 401 not authorized and the SBC sends the authorization back. This is not idea if you have inbound needs but no outbound needs. We have a few Auto Attendants and some Response Groups that wont be making outbound calls. Therefore there will be no registration and the inbound side would never work for those numbers. For these reasons we decided to choose the one registration for all numbers method. I’ll explain the issue later that this presented.
First, to setup registration is simple. You need to have the registration info which is a phone number, username, password, domain, and public IP address.
On the SBC go into Setup –> Signaling & Media –> SIP Definitions –> Accounts and click New
A couple quick things to note about the account setup. The group at the top is your Served IP, this is who the registration is for (the PBX), in my case Skype for Business. The Served IP Group is Axtel in my case, this is who you want to send the registration to. Once you have the registration all setup and save the SBC will try and register.
The registration process is this.
- SBC sends SIP Trunk provider a register message containing the username only
- The SIP Trunk provider sends back a 401 unauthorized, this prompts the SBC to send back password information.
- The SBC sends username and password in MD5 hash to the SIP Trunk provider
- The SIP trunk provider registers
In the SBC you can go to Monitor at the top –> VOIP Status –> Registration Status and see your trunk is registered.
Now that your SBC is registered you should be able to make and take calls. In my case outbound calls were working as long as the phone number in the From field matched a DID in the range provided by Axtel. Full disclosure Axtel provided a set of DID’s for the client to use, these were not configured and my outbound calls were getting a 403 forbidden. Axtel likes to use a “test” set of DID’s before provisioning the real ones. Once I had that list outbound calls were flowing just fine.
Now for the fun part, inbound calling. When you decide to use one registration for all numbers with Axtel the Invite message shows the billing telephone number while the TO Field shows the actual called number.
For example calling DID 812xxxxxxxx36 while the billing number is 812xxxxxxxx35 shows this type of invite to the SBC
*NOTE* using private IP addressing so no need to hide that in the SBC message.
Because I like doing things the right way I configured an outbound manipulation rule towards my PBX (SFB) to add +52 to make the number E.164. This caused the SBC to take the Invite number and place it in the TO Field. The AC SBC “Destination Username Prefix” rule does not look at the invite field.
Here is an example if you use manipulation rules under Setup –> SBC –> Manipulation –> Outbound Manipulation
The result of this is below
We have to take this one step further and do a message manipulation on the invite header before we do the phone number manipulation. Here is how.
Go to Setup –> Message Manipulation –> Message Manipulations –> New. Create the below rule and Apply the “man set id” to your Axtel IP Group “Inbound” set.
Here is a table in case you need to copy paste. You’ll have to excuse the horrible formatting.
|Index||Manipulation Name||Man Set ID||Message Type||Condition||Action Subject||Action Type||Action Value||Row Role|
|4||Copy_DestNum_to_URI||3||invite.request||header.request-uri.url.user||2 (Modify)||Header.To.Url.user||0 (Use Current Condition)|
Once this last rule is applied calls flow inbound with no problem.
Hopefully this helps everyone dealing with a SIP trunk provider with this specific requirements.