VoIP is slowly becoming the new standard for replacing your old PBX infrastructure, but one of the common issues is “What to do with your old analog phones?”. An example of this can be the doorphone, which has some buttons, programmed to called certain internal or external numbers.
At OrbitOne, we fully replaces our Cisco telephone system with Lync Server 2010 – and all outgoing calls are handled through Lync. But, we do have some doorphones (which are just analog phones), connected to our Cisco CallManager (CME / CCME) through an ATA, which should be able to dial internal as well as external numbers. There are some solutions available on the market today to do so, AudioCodes for example has some hardware and software to integrate your classic analog phones into Lync, but if you already have a Cisco infrastructure, you can just as well use your existing hardware and configure your Lync to support these devices.
Topology

The figure above illustrates our current Topology. Our doorphones (which, in our case, are Fasttel doorphones) are connected to Cisco ATA-188 and ATA-186 Analog Telephone Adapters. These ATAs are connected through our network to the Cisco Call Manager, which holds the configuration for these ATA devices. The Cisco CallManager has no telephone lines connected, and no SIP trunk configured, it is just connected to our Lync Mediation Server through our network.
The Lync Mediation server communicates with our Lync Front-End server, and is connected to our SIP trunk, which is deliverd by Telenet.
The goal is easy: configure Lync and our CCME so that:
- The doorphones are reachable from Lync with a short internal number
- The doorphones can dial to Lync clients
- The doorphones can dial externally through the Telenet SIP trunk
CCME configuration
In order to achieve our goal, we needed to configure our CallManager to be able to route calls to Lync (both for internal and external calls). In fact, our CallManager isn’t aware if the dialed number is internal or external, he just sends the call through Lync, and it is Lync who decides if the number is a Lync client of an external number. This is also because we don’t use internal numbers for Lync clients, every user has a full E.164 telephone number.
First of all, we have chosen to define internal short numbers for our doorphones. This can be done through an ephone and ephone-dn configuration. An example, let’ say we wan to use 91-99 for doorphones:
ephone 91 description doorphone example mac-address 0011.2121.29F3 max-calls-per-button 2 type ata button 1:91 ! |
(MAC address of ATA)
(Connect port 1 to ephone-dn 91) |
ephone-dn 91 number 91 description doorphone example name doorphone example ! |
(Internal number of the phone)
|
Next, we configured a dial-peer to dial-out through Lync:
|
dial-peer voice 1 voip tone ringback alert-no-PI description Lync Server translation-profile incoming LyncToCisco translation-profile outgoing CiscoToLync destination-pattern T session protocol sipv2 session target ipv4:192.168.0.189:5060 session transport tcp incoming called-number . dtmf-relay rtp-nte codec g711alaw ip qos dscp cs3 signaling no vad ! |
(described below) (described below) Apply for all destinations We are talking SIP Lync Mediation listening port Lync SIP = TCP traffic, not UDP Apply for all called numbers |
|
voice translation-profile OCStoCisco translate called 1 ! voice translation-profile CiscoInternaltoOCS translate calling 2 ! |
called = destination
calling = source number
|
|
voice translation-rule 1 rule 1 /^003293301591$/ /91/ ! voice translation-rule 2 rule 1 /91/ /+3293301591/ ! |
Optional, only needed if you want to dial from outside to your device
Needed for dialing outside! |
Voice translation-rule 1 is optional, and only required if you want to dial from the outside world to your doorphone or analog telephone. Because it’s a doorphone, we don’t want this option, we only want the doorphone to dial outside, so we configured only the 2nd translation rule.
So far, so good, no we only need some Lync configuration and we’re all done!
Lync configuration
First, we need to route calls to the internal numbers to our CCME. (And if needed, also for the external numbers of our doorphones). To do so, configure your telephone routing for these numbers (2digit numbers, starting with a 9, and numbers with format +329330159.) to route to your Cisco CCME instead of the SIP trunk you are using. To do so, you need to add your Cisco CCME as Voice Gateway in your lync topology and add it to your Mediation server as Voice Gateway!
After doing so, you are able to dial to your doorphones using internal (and optionally external numbers), but your doorphones can’t dial to the outside world yet. To allow this, you need to configure CsAnalogDevices through Lync PowerShell.
Create a CSAnalogDevice through Lync PowerShell with the New-CsAnalogDevice command:
New-CsAnalogDevice -LineUri tel:+3293301591 -DisplayName "Doorphone Example" -RegistrarPool pool.company.com -AnalogFax $False -Gateway 192.168.123.123 -OU "ou=Doorphones,dc=contoso,dc=com"
The LineUri is the doorphone’s external number in E.164 format. RegistrarPool is the name of your Lync pool. AnalogFax is set to false because we are not configuring a fax device. Gateway points to your CCME (which, in this example, has IP 182.168.123.123). OU is the place in AD where you want to store the AnalogDevice object.
After doing so, you need to grant a Voice Policy that allows your device to dial outside. Create a Voice Policy that has Enterprise Voice enabled, and grant the policy through PowerShell. In our example, we created a VoicePolicy DoorphonePolicy:
Grant-CsVoicePolicy –Identity "DoorPhone Example" –PolicyName "DoorphonePolicy"
As Identity, select the Identity of the CSAnalogDevice your just created. PolicyName refers to your VoicePolicy.
After doing so, and if your Policy is configured correctly, your doorphones or analog devices should be able to dial to both Lync clients and external numbers.
Good luck migrating to Lync!