MS LCS 2005 / SER / Asterisk Integration

How to integrate MS LCS 2005 / SER / Asterisk Integration

This is a tutorial on how to setup calling to/from MS LCS 2005 using SER and Asterisk. In this case LCS is acting as the IM/Presence/VoIP server, SER converts protocols TCP2UDP and Asterisk is a SIP to ISDN gateway. This setup allows for outbound calls from Microsoft Office Communicator - OC to a normal telephone and inbound calls from a normal telephone to Microsoft Office Communicator - OC. This also allows you to access services provided by Asterisk such as Meetme Conferencing. You can also use Windows Messenger 5.1 instead of OC client.

Contents

  • Goals
  • Legend
  • Outbound Calling
    • Asterisk Setup
    • SER Setup
    • LCS 2005 Setup
    • LCS Clients Setup
  • Inbound Calling
    • Asterisk Setup
    • SER Setup
    • LCS 2005 Setup
    • LCS Clients Setup

Goals of the Project

  • Outbound from LCS Call Completion - Yes
  • Inbound into LCS Call Completion - Yes
  • DTMF (touch tone) - Yes
  • Far End Disconnect/Hangup - Yes
  • Near End Disconnect/Hangup - Yes
  • LDAP Lookup SAMaccountname to telephone number - Yes

Legend / Key

Asterisk 1.0.10
  • IP address - 1.1.1.1
SER
  • IP address - 2.2.2.2
LCS server 1
  • FQDN - lcsa.domain.com
  • IP address - 3.3.3.3
LCS server 2
  • FQDN - lcsb.domain.com
  • IP address - 4.4.4.4

Outbound Calling


Outbound Diagram

SIP Outbound Flow - OC CLIENT >>> tls >>> LCSA >>> tls >>> LCSB >>> tcp >>> SER >>> udp >>> ASTERISK
RTP Outbound Flow - OC CLIENT >>> rtp >>> ASTERISK

Asterisk 1.0.10 Setup

Please refer to other guides for normal Asterisk setup. I will cover just what is needed for this configuration.

sip.conf <<< general section
  • disallow=all
  • allow=gsm
  • allow=ulaw
  • dtmfmode=rfc2833 <<< The OC client uses rfc2833 for DTMF

LDAP lookup in Asterisk
  • In LCS the SAMaccountname of the OC client end-user is the Asterisk variable CALLERIDNUM
  • The files below will allow you to lookup the SAMaccountname and setup the outbound callerid to the telco.

extensions.conf
  • exten => XXX,1,SetVar(x=${CALLERIDNUM})
  • exten => XXX,2,LDAPget(a=getnum)
  • exten => XXX,3,AGI(ldap.agi,${a})})

ldap.conf <<< Requires files @ http://www.mezzo.net/asterisk/app_ldap.html
  • host = active.directory.domain.com
  • version = 3
  • user = xxxxxx
  • pass = xxxxxx
  • base = xxxxxx
  • filter = (&(objectClass=person)(|(samaccountname=${x})))
  • attribute = telephoneNumber
  • convert = UTF-8,ISO-8859-1

ldap.agi <<< Requires Asterisk-Perl @ http://asterisk.gnuinter.net/files/asterisk-perl-0.08.tar.gz
Image


SER setup

Please Note
  • modparam("rr", "enable_double_rr", 0) <<< The default double record route feature in SER prevents far-end disconnects from working properly
  • Use record_route();

Ser.cfg
Image


Microsoft LCS 2005 Outbound Telephony Setup

Please refer to MS documentation on setting up the LCS servers, server certificates and backend SQL DB's. This tutorial will cover just the telephony aspect. If you are NOT using TLS for your OC clients you can skip-down to Server 2 Setup.

Server 1 Setup
  • Server name - lcsa.domain.com (lcsa)
  • Run TLS on port 5061
  • OC client registers to lcsa

Telephony Setup for lcsa.domain.com
Open a console view of your LCS forest
Right click the lcsa server and select Properties
  • Select the Routing Tab
    • Click Add
    • Add Static Route dialog box opens
      • Matching URI
        • User = *
        • Domain=lcsa.domain.com
        • Phone URI = CHECK
      • Next Hop
        • Network Address = lcsb.domain.com
        • Transport = TLS
        • Port = 5061
        • Replace Host in Request URI = DO NOT CHECK

Server 2 Setup
  • Server name - lcsb.domain.com (lcsb)
  • Run TLS on port 5061 <<< Only if you are using TLS on LCS Server 1
  • Run TCP on Port 5060

Telephony Setup for lcsb.domain.com
Open a console view of your LCS forest
Right click the lcsb server and select Properties
  • Select the Routing Tab
    • Click Add
    • Add Static Route dialog box opens
      • Matching URI
        • User = *
        • Domain=lcsa.domain.com
        • Phone URI = CHECK
      • Next Hop
        • IP Address = 2.2.2.2 <<< This will be the IP address of your Iptel SER redirect server
        • Transport = TCP
        • Port = 5060
        • Replace Host in Request URI = CHECK

  • Select Host Authorization Tab
    • Click Add
    • Add Host Authorization dialog box opens
        • IP Address = 2.2.2.2 <<< This will be the IP address of your Iptel SER redirect server
        • Outbound Only = DO NOT CHECK
        • Throttle as Server = CHECK
        • Treat As Authenticated = CHECK

Microsoft LCS 2005 Outbound Client Setup

Microsoft Office Communicator Registery Modifications
  • There are a few registry settings that might need to be modified so you can make pc to phone calls
  • Please be CAREFUL when modify your registry.
  • You can also copy between the VVVVV's using a text editor and save as voip.reg then run.

VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Communicator]
"EnablePC2Phone"=dword:00000001
"EnablePhoneControl"=dword:00000000
"EnableConferencingService"=dword:00000000


VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV

Microsoft Office Communicator client configuration
  • Select Actions - Options... - Phones Tab
  • Make sure Default device = Computer

Windows Messenger 5.1 Registery Modifications
  • This is required to get the option to make pc to phone calls
  • There is one registry settings that might need to be modified.
  • Please be CAREFUL when modify your registry.
  • You can also copy between the VVVVV's using a text editor and save as phone.reg then run.

VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Policies\Microsoft\Messenger\Client]
"CorpPC2Phone"=dword:00000001


VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV

Inbound Calling

There are several issues that need to be addressed for inbound dialing to work properly. This has only been tested on Asterisk 1.0.10. Feel free to review and modify for newer Asterisk releases. Please post your LCS/Asterisk modifications so others review/learn/deploy.

Inbound Diagram

SIP Inbound Flow - ASTERISK >>> udp >>> SER >>> tcp >>> LCSB >>> tls >>> LCSA >>> tls >>> OC CLIENT
RTP Inbound Flow - ASTERISK >>> rtp >>> OC Client

Asterisk 1.0.10 Setup

Replace chan_sip.c file
  • chan_sip.c file
    • Replace chan_sip.c with the modified file below.
      • Located in /.../asterisk/channels/
    • Remember to make a copy of the orginal chan_sip.c file
    • Run Make and Make Install from Asterisk source directory
    • Stop/Start Asterisk

chan_sip.c
Image


SIP URI must be created correctly inside of Asterisk
  • extensions.conf
    • exten => XXX,1,Dial(SIP/user@domain.com,20,tr)
    • exten => XXX,2,Voicemail(${EXTEN}@default)
    • exten => XXX,3,Hangup

Route to SER for UDP to TCP conversion
  • Modify Asterisk server host file to point "domain.com" to the SER server IP address
    • There may be cleaner ways to route the call
    • Make sure this change does not break other services

SER Setup

  • No modifications required if you are using the provided ser.cfg

Microsoft LCS 2005 Inbound Telephony Setup

  • This is only required if you are using TLS for your OC clients and have deployed a LCS telephony Server - Server 2.

Server 2 Setup
  • Server name - lcsb.domain.com (lcsb)
  • Run TLS on port 5061 <<< Only if you are using TLS on LCS Server 1
  • Run TCP on Port 5060

Telephony Setup for lcsb.domain.com
Open a console view of your LCS forest
Right click the lcsb server and select Properties
  • Select the Routing Tab
    • Click Add
    • Add Static Route dialog box opens
      • Matching URI
        • User = *
        • Domain=domain.com <<< Must match the SIP URI created in Asterisk
        • Phone URI = DO NOT CHECK
      • Next Hop
        • Network Address = lcsa.domain.com
        • Transport = TLS
        • Port = 5061
        • Replace Host in Request URI = DO NOT CHECK

Microsoft Office Communicator and Windows Messanger Inbound Setup

  • No modifications required

Inbound Modification Logic
Asterisk would need to be modified to add a proprietary “epid� parameter in the From field of all requests sent to LCS 2005. Different documents from Cisco, Polycom and newsgroups postings lead me to this conclusion. Each of the products had to be modified to work correctly with LCS 2005. Outbound works because Asterisk simply ignores the epid parameter sent by LCS 2005
  • Cisco - Cisco CallManager Release 4.1.3sr2-PBX Interoperability: Microsoft LCS Server 2005 Using SIP (TCP) with Microsoft Office Communicator Client - page 2 of 26
  • Polycom - http://www.polycom.com/common/pw_cmp_updateDocKeywords/0,1687,4922,00.pdf - page 81 of 166
  • Newsgroup - http://www.eggheadcafe.com/forumarchives/livecommdeveloper/Aug2005/post23318622.asp

Comments Appreciated.

81012

Created by: voipen, Last modification: Mon 11 of Jun, 2012 (05:05 UTC) by admin


Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+

Page Changes | Comments

 

Featured -

Search: