📜 ⬆️ ⬇️

Skype and Google Talk integration with Lync

At TI Systems, we always strive to simplify communications. Especially for you, we have prepared an article in which we will describe how to combine Skype and GTalk with Lync, for the convenience of your communication.
This article will help you install Asterisk, set up Asterisk-Skype, Asterisk-GTalk collaboration, and also integrate Asterisk into your existing Lync architecture.

Part one. Installing Asterisk on CentOS 6.2



First we need CentOS 6.2. We will assume that you have already installed CentOS 6.2 and made the initial setup of the system, so let's proceed directly to installing Asterisk:
')


Part two. Integration of asterisk and Lync 2010



For stable operation of ip-pbx Asterisk and Lync 2010, we need to perform the following steps:
1. In Lync 2010 Topology Builder, add our Asterisk to PSTN gateways, specifying TCP port 5060
2. After that add routing of calls from Lync to Asterisk internal numbers:

image

(In this case, all calls to internal numbers [2,3] xxx from Lync will be transferred to Asterisk. In the examples below we will use numbers 2001, 2002).

3. Add to the Asterisk configuration file sip.conf :
[Lync_Trunk] Trunk Name for Link
type = friend
port = 5068 (This port uses the Lync server)
host = xxxx.xxx.xxx.xxx IP address of our Lync server
dtmfmode = rfc2833
context = from-lync
qualify = yes
transport = tcp

4. Add the from-lync context to the extensions.conf configuration file to service calls from Lync to Asterisk:
[from-lync]
exten => _ 2XXX, 1, Dial (SIP / $ {EXTEN})
exten => _ 2XXX, 2, playback (vm-nobodyavail)
exten => _ 2XXX, 3, playback (vm-goodbye)
exten => _ 2XXX, n, hangup ()

Now, when you call an Asterisk 2002 extension from Lync, the call will be transferred to Asterisk to the extension.

In addition, to make calls from internal Asterisk numbers to internal Lync numbers, we need to add routing rules to the Asterisk extensions.conf configuration file. For example, in the context of the default add:
exten => _ 2XX, 1, Dial (SIP / Lync_Trunk / $ {EXTEN})
exten => _ 2XX, n, hangup ()
exten => _ 3XX, 1, Dial (SIP / Lync_Trunk / $ {EXTEN})
exten => _ 3XX, n, hangup ()
Now we will be able to make calls from Asterisk 2xxx and 3xxx numbers to Lync extension numbers (in our example 2 and 3).

Part Three Configuring Asterisk-GTalk Integration



This integration will allow you to receive calls from Gtalk to Asterisk to an extension number, to Asterisk IVR or to Lync IVR (in our example, we will show how to make an incoming call from GTalk to the Lync call group):

1. To register Asterisk with GTalk, we will need an account with google. Create it. After that we add the following to the gtalk.conf configuration file:
[general]
context = from-gtalk Incoming call context
bindaddr = local_ip Internal address of the Asterisk server
externip = external_ip The external white address of Asterisk
allowguest = yes Ability to receive calls from people outside the GTalk list
[guest] Parameters of a special guest account
disallow = all Disable all codecs
allow = ulaw Only allow ulaw
context = from-gtalk Specify the call handling context
[account] In this section, we specify the login from Google account
username= YOUR_ACCAUNT@gmail.com
disallow = all
allow = ulaw
context = from-gtalk
connection = gtalk_account Connection is specified from the jabber.conf configuration file

2. After that, we change the Asterisk jabber.conf configuration file:
[gtalk_account] GTalk Account Setup Section
type = client Connection type
serverhost = talk.google.com Registration Server
username=YOUR_ACCAUNT@gmail.com/Talk Account.
secret = YOUR_PASSWORD Password
priority = 1 Resource Priority Level
port = 5222 Server port, default 5222
usetls = yes Use tls or not
usesasl = yes Use sasl or not
status = available Presence status
statusmessage = “Only Voice” Status Message

3. Now we set up call routing from GTalk to Lync. To do this, add the route to the Asterisk extensions.conf configuration file:
[from-gtalk]
exten => s, 1, NoOP (Call from Gtalk)
exten => s, n, Set (CALLERID (name) = Google Talk)
exten => s, n, Dial (SIP / Lync_Trunk / 3xx) 3xx - number for the Lync call group.

4. To make outgoing calls to certain accounts in GTalk, we can create a “virtual” number in Asterisk. To do this, in the Asterisk extensions.conf file, write the following:
exten => 3333,1, Dial (gtalk/gtalk_account/call_name_user@gmail.com)

Part Four Setting up Asterisk-Skype integration



At the moment, the integration of Asterisk with Skype is paid. To integrate, we need to buy Skype Connect and Skype online number.

1. Register with Skype Manager and then create a Skype Connect profile (https://manager.skype.com/features/sip). In the authorization settings you will see your SIP User and Password, as well as the connection address (sip.skype.com) and the connection port (UDP 5060).

image

Now you need to buy an online Skype number. It can look like this (+ 4420xxxxxxxx).

We add this data to the [general] section of the sip.conf Asterisk configuration file:
register => 990xxxxx: 9Jxxx@sip.skype.com/990xxxxxx

Add a new section called SIP User:
[990xxxxx]
type = friend
dtmfmode = rfc2833
context = default
host = sip.skype.com
username = 990xxxxx
secret = 9Jxxx
disallow = all
allow = ulaw
allow = alaw
allow = g729
nat = yes
canreinvite = no
fromdomain = sip.skype.com
insecure = invite

After that, we configure the rules for processing incoming calls from Skype and outgoing calls to international numbers via Skype. To do this, add the following to the Asterisk extensions.conf configuration file:
exten => 4420xxxxxxxx, 1, Answer
exten => 4420xxxxxxxx, n, Dial (SIP / Lync_Trunk / 3xx) 3xx - number for the Lync call group

This will allow you to take a call from Skype and transfer it to a Lync call group.
You can also assign an international number to a virtual number in Asterisk (for example, 2001). This will allow us to make calls from Lync by calling 2001 via Asterisk-> Skype worldwide. To do this, configure the rule for processing outgoing calls in Skype in the same configuration file extensions.conf (for testing, you can use the free Skype number + 17606604590)
exten => 1001,1, Answer
exten => 1001, n, Set (CALLERID (num) = 990xxxxx)
exten => 1001, n, Dial (SIP / + 17606604590 @ 9990xxxxx)
exten => 1001, n, Hangup

We hope that our article could help you!


In the article we used the following materials:

• Chapter 11: Interoperability with Asterisk and Skype (available here www.microsoft.com/download/en/details.aspx?displaylang=en&id=22644 )
• Protection of Asterisk or several ways how to protect against selecting a password for a SIP account (http://subnets.ru/blog/?p=1552)
• Protection of asterisk from hacking (http://www.mahno.su/freebsd/asterisk-freebsd/zashhita-asterisk-ot-vzloma)

Source: https://habr.com/ru/post/137357/


All Articles