MS Lync: Personal Call Identification

    Our office recently switched to using MS Lync as a telephony solution: Siemens PABX (by the way, very high-quality and reliable) has long been outdated and should have been replaced. It turned out that of all the alternatives, MS Lync with Enterprise Voice is the most profitable. In addition to the price, the choice was influenced by the fact that some branches of the company in other countries already used Lync, though without telephony, since this is Lync Online from Office 365. Nevertheless, the possibility of the coexistence of these systems (Lync Hybrid) seemed useful to management.

    One way or another, a decision was made; and besides many other problems, it became necessary to identify personal calls. Workers are allowed to use the phone for personal purposes, but, of course, and pay for them themselves. With the “old” PABX, the implementation was as follows: after entering a personal PIN code and before dialing a number, it was required to enter 0 for a “for work” call or 1 for personal calls. This information was stored and periodically exported in CSV format for subsequent import into SAP using WinShuttle. With MS Lync, you can implement everything in exactly the same way (well, or almost), but there is one significant feature: unlike classical telephony, most calls from Lync are not made by dialing, but by searching for a contact (for example, by name) or even by clicking by the email sender field in Outlook - so, Identification of personal numbers with a prefix no longer seems to be an ideal solution. In addition, since the Lync client uses the same contact database as, for example, the user's mobile phone connected to the corporate Exchange server, adding a prefix to the contact number will interfere / complicate making regular (non-Lync) calls using a mobile phone.

    We have come up with three options for solving this problem. Details under the cut.

    Option # 1 - Using Prefixes

    Lync version - Lync 2013 Standard Edition
    Gateway - Audiocodes Mediant 1000
    Access to PSTN - E1 or SIP trunk via Internet with IP authorization
    Billing information source: Lync Server Monitoring Reports + provider billing

    In this solution to the problem, we will use two replacements, namely 1) “normalization” of the number entered by the user in the Lync Control Panel; and, 2) normalization of the number before transferring the call to the SIP trunk in Audiocodes SBC. The reason is simple: Lync understands only e.164 standard numbers, so the call to the number “10041221234567” will not work. To get around this, you can use the following replacement: numbers with the prefix 0 (work calls) are converted to standard e.164 (for example, 00041221234567 -> +41221234567) and transferred to the trunk as is, and with the prefix 1 (personal calls) to pseudo- e.164 replacing the prefix with +83 or any other unused(for example 10041221234567 -> +8341221234567) and further on the SBC completely deleted, leaving only the real e.164 number. The difference will be that personal calls will be recorded in the Lync database with the prefix +83, with the help of which these calls can be easily identified by comparing with the list of calls / invoice provided by the telephony operator.
    The block diagram of this solution looks like this:

    How to make?

    The normalization rule for personal calls of the type “10041221234567 -> +8341221234567” is created in the Lync Control Panel in the Voice Routing section:

    This replacement will look like in the Lync client when dialing with a prefix:

    Next, to make this call reach the desired party, we replace “+83” to “+” before transferring the call to the Audiocodes Mediant 1000. For the E1 trunk, this is configured in the section Voip> GW and IP to IP> Manipulations> Dest Number IP-> Tel :

    Pros : the procedure for dialing a “personal” number is saved such same as it was on the old PABX
    Cons: It is inconvenient to use saved contacts if you cannot add a prefix to the address book numbers using unincorporated channels, for example, from a mobile phone with the same contact base.

    Option number 2 - "Manual mode"

    Lync version - Lync 2013 Standard Edition
    Gateway - it doesn’t matter
    Access to PSTN - it doesn’t matter
    Billing information source: Lync Server Monitoring Reports + provider billing

    This option is quite simple: they installed a web-based application on .Net that reads information about calls from the database and gives users the ability to "mark" which of the calls are private. I can’t add anything special here, since this is more a development area. I can only note that numbers marked as personal calls are remembered by the system and are automatically applied to future calls, so that users will spend less time each time on the process itself.

    Web application interface

    Pros : no change in dialplan and call flow
    Cons : you have to rely on user awareness - not everyone bothers, especially if there are a lot of calls

    Option number 3 - FreeSwitch + outbound IVR

    Lync version - Lync 2013 Standard Edition
    Gateway - FreeSwitch
    Access to PSTN - SIP trunk over the Internet with IP authorization and billing ID support Billing
    information source: SIP provider billing
    The idea is this: every time you make a call to PSTN, the system will ask if it is a personal call . The user sends DTMF 0 (if not) or 1 (if the call is personal), then the call is transferred to the provider's gateway: in the first case, without changes (for example 41221234567), in the second case with a special billing ID prefix (for example 600100141221234567). Billing ID (in our example - 6001001) is ignored by the provider when routing the call, but is recorded in the billing database. Further, when processing bills from the provider, we simply filter the entire call-log and hang all expenses for calls with the prefix 6001001 for the corresponding user.

    The call route in this case will look like this:

    How to make?

    We will not describe FreeSwitch integration with MS Lync, it is well described here (they themselves were guided by this article, thanks olegbaturin ). To activate outbound IVR, add the following segments to the configuration file:

    Section section dialplan

    In the menus section

    Do not forget to write and place the corresponding wav files in the ivr folder (menu.wav should report on the options: “dial 1 if this is a personal call ...”)

    Pros : convenient for the user (one additional step), no need to change phone numbers in contact base, which means the ability to use contacts outside of Lync.
    Cons : the provider must support billing id prefix *, it is impossible to use the existing gateway from AudioCodes (I had to raise the VM for freeswitch).

    * - if the provider does not support billing id prefix, this option can still be applicable: in this case, the call information can be written to some web server using REST api by turning on the curl module for freeswitch, and then compare this data with billing from provider (it will be necessary to match the call time and numbers)

    Also popular now: