to configure the asterisk (freepbx) with microsoft lync ... web view1st create extension on asterisk...

13
To Configure the Asterisk (FreePBX) with Microsoft Lync 2010 or 2013. Asterisk version 11.2.1 FreePBX 1 st Create extension on asterisk and check by login into 3cx or X-lite softphone. 2 nd Create the Asterisk SIP Trunk to Lync 3 rd Create the Inbound/Outbound Routes 4 th Configure Additional Parameters

Upload: truongque

Post on 30-Jan-2018

270 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: To Configure the Asterisk (FreePBX) with Microsoft Lync ... Web view1st Create extension on asterisk and check by login into 3cx or X-lite softphone. 2nd Create the Asterisk SIP Trunk

To Configure the Asterisk (FreePBX) with Microsoft Lync 2010 or 2013.

Asterisk version 11.2.1 FreePBX 1st Create extension on asterisk and check by login into 3cx or X-lite softphone. 2nd Create the Asterisk SIP Trunk to Lync 

3rd Create the Inbound/Outbound Routes

4th Configure Additional Parameters

1 st Create extension on asterisk and check by login into 3cx or X-lite softphone.

Page 2: To Configure the Asterisk (FreePBX) with Microsoft Lync ... Web view1st Create extension on asterisk and check by login into 3cx or X-lite softphone. 2nd Create the Asterisk SIP Trunk

Example create 3000 to 3010 extensions in FreePBX with context: from-internal in extensions and let the rest of the settings as default. (Make sure context : from-internal)

2 nd create the asterisk SIP Trunk to Lync

Page 3: To Configure the Asterisk (FreePBX) with Microsoft Lync ... Web view1st Create extension on asterisk and check by login into 3cx or X-lite softphone. 2nd Create the Asterisk SIP Trunk

transport=tcp,udpqualify=yespromiscredir=yesport=5060type=friendinsecure=veryhost=192.168.50.161 Lync Server IPfromdomain=192.168.50.220 Asterisk Server IPcontext=from-internal Must match the context of the users created in Step 1canreinvite=yes

Page 4: To Configure the Asterisk (FreePBX) with Microsoft Lync ... Web view1st Create extension on asterisk and check by login into 3cx or X-lite softphone. 2nd Create the Asterisk SIP Trunk

Next, ensure that in the Incoming Settings section, the USER context and USER details fields are left blank.

3 rd Create the Inbound/Outbound Routes Let's create the Inbound route from Lync first. At the FreePBX Admin top menu bar, select Connectivity->Inbound RoutesThen scroll down and choose Trunks in the Set Destination section and select the Lync Trunk created in Step 3 in the dropdown. Leave all other fields default. Then click Submit to create the inbound route.

Outbound RoutesTo create the outbound route, click on Connectivity->Outbound Routes and in the Add Route page, give it a suitable name and in the Dial Patterns sectionSince we are using 4-digit extensions in Lync starting with 7XXX we will enter that. Then scroll down and in the Trunk Sequence section, select from the dropdown the Trunk created in Step 3. Then click Submit Changes to create the route.

Page 5: To Configure the Asterisk (FreePBX) with Microsoft Lync ... Web view1st Create extension on asterisk and check by login into 3cx or X-lite softphone. 2nd Create the Asterisk SIP Trunk

4 th Configure Additional Parameters

There are 2 additional parameters required on Asterisk which unfortunately cannot be changed using the FreePBX Admin GUI. These parameters are required in order to for Asterisk to communicate with Lync using TCP. Many blogs recommend the use of WinSCP but I prefer to login directly onto the CentOS console and configure the parameters. We will use the VI editor to edit the parameters file so run the command "vi /etc/asterisk/sip_custom.conf". this will open the file and you should see a blank file. Hit the "i" key to enter input mode and type in the two lines as shown below. Then type ":w" to save the file and then ":q" to quit VI editor.

Tcpenable=yes Transport=tcp

Next restart Asterisk by running the command "/etc/init.d/asterisk restart".

Page 6: To Configure the Asterisk (FreePBX) with Microsoft Lync ... Web view1st Create extension on asterisk and check by login into 3cx or X-lite softphone. 2nd Create the Asterisk SIP Trunk

That's all that's needed on the Asterisk side. Next we will configure the Lync server. We will revisit the CentOS console later for troubleshooting

Additional Option:To activate Video calling in asterisk edit sip_general_custom.conf file which is located in /etc/asterisk.

Videosupport=yes Allow=h263

e.g : vi /etc/asterisk/sip_general_custom.conf

Note: After editing the sip_general_custom.conf file,reboot the asterisk FreePBX machine and login into X-lite SIP extension and start making video calling.

Now you can use XLITE which can be found using google and is easily downloadable. Download it and register the extension 3000 using XLITE. You can also use 3COM to register asterisk extension.

End of Asterisk Configuration

Page 7: To Configure the Asterisk (FreePBX) with Microsoft Lync ... Web view1st Create extension on asterisk and check by login into 3cx or X-lite softphone. 2nd Create the Asterisk SIP Trunk

Lync Configuration Details:1. Logon to Lync Control Panel using required administrative credentials.

2. First you need to create user on Active Directory e.g. TestUser.

3. Then from Lync Control Panel Go to Users pane.

4. Click Enable Users.

5. Click Add and then click find.

6. Select the user e.g. TestUser and Click OK

7. Click UPN radio box.

8. In Telephony Select Enterprise Voice

9. In Line URI type tel:+7000.

10. Now Open Lync Topology Builder and download the current topology.

11. Give any name to save the file.

12. Right click PSTN gateway and click NEW IP/PSTN Gateway.

13. Type IP 192.168.50.220.

14. Type Listening port 5060.

15. Goto top in topology builder window and right click Lync server and Click Publish Topolgoy.

Don’t forget to do 15.

16. Configue Voice Routing from Lync Control Panel as shown in below snapshots

Page 8: To Configure the Asterisk (FreePBX) with Microsoft Lync ... Web view1st Create extension on asterisk and check by login into 3cx or X-lite softphone. 2nd Create the Asterisk SIP Trunk

1. Go to NEW in Dial plan window under Associated Normalization Rules.

2. Type Name Asterisk Extension, Type 3 in starting Digit, give length Exactly 4 and digits to add and remove should be kept 0 and Click OK and Click on commit all for the changes to be accepted.

Page 9: To Configure the Asterisk (FreePBX) with Microsoft Lync ... Web view1st Create extension on asterisk and check by login into 3cx or X-lite softphone. 2nd Create the Asterisk SIP Trunk

3. Now goto VOICE POLICY and click NEW to create new Associated PSTN Usages.

Page 10: To Configure the Asterisk (FreePBX) with Microsoft Lync ... Web view1st Create extension on asterisk and check by login into 3cx or X-lite softphone. 2nd Create the Asterisk SIP Trunk

Type the Name of the PSTN Usage and Click NEW in the Associated Routes.

Page 11: To Configure the Asterisk (FreePBX) with Microsoft Lync ... Web view1st Create extension on asterisk and check by login into 3cx or X-lite softphone. 2nd Create the Asterisk SIP Trunk

Give the Name to the Route and add only 3 as starting digit.

Click add under associated trunks and add the PSTN GATEWAY having ip 192.168.50.220.Click OK until you get back to the voice policy front panel menu. After that commit all the changes. Configuration completed. Now start testing the calls between lync and Asterisks extension e.g from 3000 to 7000 and vice versa.

Page 12: To Configure the Asterisk (FreePBX) with Microsoft Lync ... Web view1st Create extension on asterisk and check by login into 3cx or X-lite softphone. 2nd Create the Asterisk SIP Trunk