Integrating Skype Connect and Asterisk

Skype Connect is a new Skype product which allows you to connect Skype Business accounts and numbers directly to an Asterisk PBX using a SIP trunk and the Skype Manager portal. Whilst this product is not a direct replacement for traditional SIP trunking as it does not allow Emergency Dialing it can be used to allow your staff or customers to make inbound calls to your office Skype business account for free from the Skype client. This article will detail how to configure a Skype Connect SIP trunk to allow inbound and outbound dialing on a standard Asterisk installation. We will cover FreePBX configuration in a separate article. To use this service you will need a Skype account which is registered for the Skype Manager service. If you do not currently have a suitable account you can create a new profile or register your existing Skype account for free via this link.  This account will be used to administer your company account, so it is generally recommended to create a new account specifically for this purpose. You can add your own personal/business accounts as a member of the company account in the later stages. Once you are logged into the Skype Manager interface you will need to create a new SIP Profile which we will use to connect Skype Connect to the Asterisk PBX. Creating the SIP Profile

  1. Click the ‘Features‘ link in the top navigation menu,
  2. Select ‘Skype Connect‘ in the left navigation menu,
  3. Click the ‘Set up a SIP Profile‘ button,
  4. Enter a unique name for the SIP profile you are creating then click ‘Next‘ to continue. We recommend using something which allows you to easily identify the system you intend to connect this trunk to, for example the office location or Hostname. Profile Name
  5. Next we will need to setup the channel subscriptions for this profile. Each channel allows for a single concurrent inbound or outbound call so ensure you select an appropriate number of channels for your anticipated usage. You can enable upto 300 channels per SIP profile. It is possible for you to increase or decrease the channel allocations at a later date if you find you require additional channels.
  6. Click ‘Next
  7. Your SIP profile should now be active and the registration details should be visible as below: Registration Details The password will not be visible via the Skype Manager portal and is randomly generated – It is automatically emailed to the email address that is associated with the Skype Manager account. You will need to retrieve this password to continue with the registration process.

Enable inbound calls: Skype Connect with Skype Business Account To enable inbound calls over the Skype Connect profile you will need to add a Skype Business account, Skype Number (Or combination of both!) to the SIP profile. Note,  if you attach a business account to your SIP profile you will no longer be able to log into that account from the desktop Skype client. To attach a business account to your SIP profile you will need to log into the ‘Skype Manager‘ portal then follow these steps:

  1. Click ‘Features‘ and select ‘Skype Connect‘ from the left-hand navigation menu. You  will then be presented with a list of all available SIP profiles, and presented with the option to create a new profile if required,
  2. Select the SIP profile we created earlier in this article by pressing the ‘View Profile‘ button next to the profile name,
  3. In the ‘Incoming Calls‘ section press the ‘Add a number or business account‘ link,
  4. Select the ‘Add Business Account‘ tab
  5. If using an existing business account enter the account name in the first text box, then select it from the drop down box. If you require a new account press the ‘Create a new account‘ and follow the on-screen instructions.
  6. In the ‘Extension Number‘ text box we will need to enter an extension number that Asterisk can use to recognise and direct the call through the dial plan. This number is limited to 10 numerical characters.

Registering from Asterisk Using the SIP Profile credentials we generated above we will need to configure Asterisk to register with the Skype SIP servers. To do this we must take the following steps:

  1. Connect to your Asterisk server via SSH and navigate to the Asterisk root directory ‘/etc/asterisk/
  2. In your favourite text editor open your SIP configuration file (This may be ‘sip.conf‘, ‘sip_custom.conf‘, ‘sip_registrations.conf‘ or ‘sip_registrations_custom.conf‘ depending on the flavour of Asterisk you are using.)
  3. In the head of this file we will add a register string for the Skype Connect profile we have created: register => Remember to update the parts in bold to reflect your own SIP profile settings!.
  4. Reload the SIP settings on asterisk:
    user@computer:$ asterisk -rx "sip reload"
  5. Check that the registration has completed successfully by issuing the following command, you should see ‘Registered’ in the State column if we have been successful:
    user@computer:$ asterisk -rx "sip show registry"
  6. Your Skype business user should now show as permanently online and able to receive calls via the Skype client. Note, this will only work with voice calls – Video and text messaging are currently not supported via Skype Connect.

You should now be able to generate inbound calls to your Asterisk server directly via your Skype phone number and via the Skype client.  Note, when you receive an inbound call from a Skype user via the Skype client (rather than via your Skype number) the caller ID will show as “Anonymous” however you are able to retrieve the callers username via SIP Headers or by using the ${CALLERID(name)} variable. Enabling outbound calls Setting Asterisk up to use the Skype channel as an outbound route is relatively easy.  First we must create an entry in your SIP configuration file for the trunk to use. Open ‘sip.conf‘ in your text editor of choice then add the following entry, replacing the bold sections with the settings from your Skype business account:

username = Your Username
fromuser= Your Username
secret = Your Password
type = friend host =
fromdomain =

You will then need to create a new outbound context to handle calls via the skype trunk, for example:

; Outbound calls consisting of an 11 digit telephone number prefixed with 7594 will be dialed via Skype Connect
exten => _7594XXXXXXXXXXX,1,Dial(SIP/skype/${EXTEN})

Notes on using Skype Connect While Skype connect can be handy for allowing free inbound calls from customers and staff who use the Skype messaging platform, it is important that we acknowledge there are a few draw backs  to the service. In our opinion it is not yet ready to act as a suitable replacement for traditional SIP trunking providers, however it can be used to provide supplemental features to an existing system. When using Skype connect please keep in mind:

  • Skype DO NOT support emergency calling via their network. You will be unable to dial the emergency services on any number via this trunk.
  • There can be a significant delay on calls that route via the Skype network, with delays of upto 30 seconds between a user initiating a call and hearing the first stages of ringing and the call actually being presented to the Asterisk server.
This entry was posted in Asterisk and tagged , , , , , , , , , . Bookmark the permalink.

Leave a Reply