This is a follow on from Part 1 – found here.
In this post I am going to walk through the process of creating the Elastix server and the configuration of the Elastix PBX to speak to the SipGate Basic sip trunk and the configuration to speak to Skype for Business.
Access via your IP of the PBX using your preferred browser – accept the website’s security certificate.
Administrative access is gained using the admin username.
On the system bar of Elastix select the PBX button.
Select trunks, and then Add SIP Trunk.
First trunk we will configure is the Elastix to and from SIP connection to Skype for Business.
First up is the Lync Trunk:
Fill in with the appropriate trunk name and user context fields
For you to cut and paste – just amend with your required IP addresses.
Next is the creation of the SipGate trunk. I have anonymised the number, but you will want the full DDI in non E164 format.
An important note around Skype for Business and SipGate SIP routing: If your username has a letter in it, for example mine originally had a random e towards the end, your username will be all characters before the letter. Skype for Business has difficulty trying to normalise any numbers with a letter in the dialled number.
When an inbound call occurs on the SipGate trunk and is passed to Skype for Business it will use the SipGate trunk to pass this call over. If the SipGate trunk name has a SIP ID with a letter within it will fail normalisation on the Skype for Business side.
again for your cut and pasting:
Once this complete the next step is to configure two outbound routes.
One is going to be a route to the SipGate trunk and the other is going to be a route to the Skype for Business trunk
For SipGate we use a Match dial pattern of N. and this will pass to the SipGate trunk only.
All inbound calling from the PSTN is going to be at least 11 digits long. For most of my lab requirements, this will be more than enough as I don’t anticipate any long distance or shorter 6 digit UK dialing to occur as part of my testing. All calls that have 11 digits will be passed to the Lync Trunk.
Next stage is to configure the inbound routes, select Inbound Routes under Inbound Call Control,
Delete any existing inbound routes and create the following:
No DID number, no CallerID and have this go to a set destination of Trunks, and select your Lync Trunk.
We are going to do some fine tuning on the SIP Trunks now. From the PBX menu, select the downward arrow on the top bar. This will provide us the option to select Security.
While in Security Settings choose Advanced Settings.
From Advanced Settings toggle the Enable direct access (non-embedded) to FreePBX to On
Select the PBX button again from the menu on the top and select the bottom option, Unembedded FreePBX
Within this menu we are going to hard code some options onto the SIP trunks. Some of these may not be required by you however I found that I noticed one way media traffic and without some of the latter configuration of the Advanced General Settings it simply was only one way media.
To configure the Sip Trunks, from the menu click on Settings, then chose Asterisk SIP Settings.
Configure any netting configuration that may be required. Identify any Public IP and natting information that is relevant to your configuration.
Lower on the screen under Other SIP Settings, you must put:
Tcpenable=yes, Skype for Business will use TCP to the Elastix PBX.
Some networks work differently and will allow the traffic through. I found that I required the additional configuration items added.
To validate that everything is working as expected and to aid in any troubleshooting, use Putty to allow a direct connection to the Elastix PBX.
Once connected, use the username Root. Your password you entered upon installation of the PBX for the Root
To gain access to the PBX function of the Linux server type Asterisk –rvvvv
The most useful took I have found within this is the SIP show peers. This will provide the connection status of the SIP Connections to and from the Elastix PBX. As Qualify=yes in the Lync trunk configuration the server and PBX will continuously send packets to each other to validate the service is working.
From your Skype for Business front end open topology Builder, select the correct Shared Components, in this case it’s the PSTN Gateway, right click and add. Ensure that the PBX has its name correctly configured in DNS.
As we are not using TLS between the Elastix PBX and Skype for Business 5060 can be provisioned as a listening port and a mediation listening port.
Once this is complete publish the topology and ensure replication occurs to all the front ends within the pool.
If Enterprise Voice has not been configured before – this will require you to bootstrap your sever to ensure the additional roles are added.
Log onto the Skype for Business Control Panel. I have used https://www.lyncoptimizer.com/ to configure the default and basic routes required for my lab. In addition, I have anonymised my SipGate normalisation rule slightly.
Create a new Dial Plan – this will take our potentially truncated SipGate SIP ID and then turn this into a User telephone number.
The one we are concerned about most is the SipGate rule for this user –
This translated rule will then be applied to the user with that number applied to him or her.
When watching the sip stack and ladder diagrams remember that the inbound connection will not be from the E.164 of the dialing number but it will be SIP ID from the SIP Gate trunk.
Good Luck! Have fun! If you need any help or have any questions feel free to comment and share!