Categories
System Status

DNS issues affecting calls and routing

On 21-10-2016 there had been a widespread DDOS attack initially in the USA. This has affected service of some of our key voice and DNS service suppliers.

We monitor many sites and run monitoring ourselves and receive status updates from suppliers.

Below are some of the recent ones and some sites reporting the issue

http://www.diario4v.com/tendencias/2016/10/21/ataque-hacker-afecta-twitter-amazon-spotify-reddit-11816.html (you will need to translate)

http://money.cnn.com/2016/10/21/technology/ddos-attack-popular-sites/

https://www.dynstatus.com/incidents/nlr4yrr162t8

Update
Dyn Managed DNS advanced service monitoring is currently experiencing issues. Customers may notice incorrect probe alerts on their advanced DNS services. Our engineers continue to monitor and investigate the issue.

Customers with questions or concerns are encouraged to reach out to our Technical Support Team.
Posted 4 minutes ago. Oct 21, 2016 - 18:23 UTC
Update
Our engineers continue to investigate and mitigate several attacks aimed against the Dyn Managed DNS infrastructure.
Posted 34 minutes ago. Oct 21, 2016 - 17:53 UTC
Update
This DDoS attack may also be impacting Dyn Managed DNS advanced services with possible delays in monitoring. Our Engineers are continuing to work on mitigating this issue.
Posted about 2 hours ago. Oct 21, 2016 - 16:48 UTC
Investigating
As of 15:52 UTC, we have begun monitoring and mitigating a DDoS attack against our Dyn Managed DNS infrastructure. Our Engineers are continuing to work on mitigating this issue.
Posted about 2 hours ago. Oct 21, 2016 - 16:06 UTC

Gradwell:

Our upstream supplier is investigating a DNS issue, which is believed to be causing the problem.

Magrethea

We are now able to confirm that two nodes on our network where impacted by DNS issues between 17:13 and 17:45 today. As many of you will be aware there have been some major DOS attacks today which impacted a number of key sites at this time so we are attributing this issue to that attack.

We will continue to monitor and apologise for the inconvenience this outage has caused our customers.

As can be seen this is out of our control and is affecting many users worldwide.

Categories
Blog Knowledge Base

Planning for a Successful VoIP deployment

Before you deploy voice-over-IP or a Hosted PBX service in your office there are a few considerations you must first address.  Switching from traditional telephone service to voice-over-IP (VoIP) requires sufficient bandwidth, a proper switch and router, and a good battery backup solution to protect you from power failures.

The key voice-over-IP requirements discussed in this article are:

Bandwidth – Determining how much bandwidth you will need for voice-over-IP in your office is your first step.

The Router – Choosing a low quality or under performing router is a costly mistake which will degrade your call quality.

Quality of Service – You must decide whether voice traffic will be separated from regular internet users or if it will share the same network.

VoIP Equipment – There are many digital office phones, soft phones, headsets and telephone adapters on the market to choose from.

Power Failures – Voice over IP does not work when the power goes out so you should install a battery backup system and possibly a Power-over-Ethernet switch if your budget permits it.

How much bandwidth do I need?
Voice over IP needs a certain amount of bandwidth in order to keep your conversations clear and free of disruptions.  Bandwidth is the amount of information which your internet connection can send and receive in a certain period of time.  Your first step should be to use an online speed test to find out what your maximum upload stream and download stream is.  We suggest you do this test using a fixed connection to the internet rather than using your wifi (wireless) connection to get accurate results.  Try to use numerous tests during different times of the day to get a good average of what you can expect from your internet connection.  Bandwidth is normally measured in kbps or kilobits per second.
You will need to have a high speed (broadband) connection to use voice-over-IP.  A typical DSL connection will be rated at 600 kbps for the upload stream and 5000 kbps on the download stream.  You will notice that your upload stream is almost always smaller than your download stream which becomes your limiting factor for using VoIP service.
Your next step is to determine how many people in your office are likely going to be using the phone at the same time.  For instance, having ten people on the phone will require ten times as much bandwidth as having one person on the phone.  Below is a chart which will help you calculate how many people can be on the phone at one time:
Ask your voice-over-IP service provider what audio codecs they offer as there is a trade off between audio quality and bandwidth usage…

Full Quality Audio (G711 Codec)\- Uses 87 kbps for each concurrent phone call (NEB)
Compressed Audio (G729 Codec)\- Uses 33 kbps for each concurrent phone call (NEB)

So the calculation for a typical DSL connection would be:

DSL connection:600 kbps upload / 5000 kbps download
Gives us (Full Quality):600 kbps / 87 kbps = 6 concurrent calls
Gives us (Compressed Quality):600 kbps / 33 kbps = 18 concurrent calls

Notice we used the upload bandwidth in our calculation as this is the limiting factor for voice-over-IP.  You also don’t want to push your connection to the limit as most cable and DSL connections do not have guarantees in terms of how much bandwidth they will deliver.  If you Internet connection drops in bandwidth at some point during the day you don’t want your call quality to be affected.  Other factors affecting voice-over-IP are the latency of your connection and how much packet loss there is on it.

Choosing a router
A router is the device that connects all your computers and network equipment to your Internet connection.  It is an often overlooked piece of the puzzle that can have a major impact on the success or failure of your voice-over-IP implementation.  There are many routers on the market, some are very cheap (less than $40) and others can cost you thousands of dollars.  There is nothing worse than putting a poor quality or underpowered router in your office which could cause an otherwise good VoIP installation to go bad.
Your router needs to be powerful enough to handle the number of phones you will have in your office and should also work flawlessly with voice-over-IP equipment.  A good place to start when deciding on your router is to speak with your voice-over-IP service provider. We also recommend checking to make sure that your router is compatible with voice-over-IP services.
The following is a list items which will help you to determine whether your router is right for voice-over-IP:
How many voice-over-IP phones will you be connecting to the router? The more phones you will be connecting, the more powerful the router needs to be. Don’t use a £40 router to run an office with 10 IP Telephones.
Will your voice-over-IP phones have their own dedicated Internet connection? If not, a router with a quality of service (QoS) setting to prioritize voice traffic over regular traffic is an absolute must. Without QoS you will encounter poor quality telephone calls regularly.
What other functions will the router need to perform? You might need your router to handle VPN connections, allow wifi (wireless) connections or perform other tasks.
Make sure you can bridge your router to your modem. Routers that are not bridged can cause problems with voice-over-IP installations.
Never use more than one router or nat gateway on the network at a time as this will cause problems for IP Telephones when they attempt to do NAT.
Make sure your router is compatible.
It is always best to get a recommendation from your voice-over-IP service provider as some routers are known to perform very poorly with VoIP phones.

Quality of service
Call quality is a function of your network and the public internet. Some delays and network congestion cannot be avoided due to information traveling over the public internet while other types can be avoided. Good network design is critical to a stable and reliable voice-over-IP implementation.
Quality of service (QoS) refers to the ability for your router to prioritize voice traffic (VoIP) differently than regular internet traffic on your network or the separation of voice traffic.  Voice over ip is a real-time protocol which means that if information is lost or delayed it will result in a noticeable drop in call quality or a complete loss of it. Symptoms of network congestion include garbled audio, dropped calls and echo.   When setting up voice-over-IP in your office there are three possible ways handle voice traffic. Some customers report perfectly good results without any quality of service (especially in a small 1-2 person office) and others report worse results with quality of service enabled on their router as some routers do a poor job of implementing this. Generally speaking however the best way to deliver reliable voice-over-IP service is through a dedicated internet connection that is only used by the voice-over-IP equipment rather than sharing the internet with computers. Below are the different methods of doing quality of service:

No QoS – Voice traffic and regular internet traffic in your office are sharing the same internet connection.  No prioritization of voice traffic over regular traffic is being performed and thus there is the high potential that voice quality could be degraded if there is insufficient bandwidth for both voice and regular traffic. Some customers experience very few problems using this method while others report a high frequency of poor quality calls, dropped calls and garbled voices. It all depends on how much network congestion your office has. Most internet connections are more likely to be upload bound which generally results in people not being able to hear you, because all of your upload bandwidth is being consumed by something on your network.

Router enabled QoS – Voice traffic and regular internet traffic in your office are sharing the same internet connection, but your router is able to distinguish between voice traffic and regular internet traffic and give the voice traffic a higher priority.  The problem with this method is that routers can only prioritize upload bandwidth which means your voice will be clear but the router cannot ensure that download bandwidth will be prioritized. If employees on your network are downloading often this will cause a noticeable drop in call quality but this method is better than no quality of service. Some internet providers can prioritize the download bandwidth using TOS or COS methods from their end which will create an end to end quality of service solution. Most customers find that even prioritising upload bandwidth for voice-over-IP offers a dramatic improvement in call quality because most internet connections are limited by their upload bandwidth and have lots of download bandwidth free.

Separated Traffic – Voice traffic and regular internet traffic are separated onto two different internet connections and networks. This is especially critical for larger offices with 5 or more employees.  Voice traffic is carried on one internet connection and data from computers is carried on the other connection. In this case no prioritization is required by your router because voice traffic has its own dedicated internet connection.  This is the best way to ensure clear voice communications and the method we generally recommend customers whenever possible.

The method you decide on largely depends on how much bandwidth you have, what you are using your internet connection for besides voice-over-IP and the level of call quality desired.  Many offices report perfectly good results without using any QoS, while others find that it makes a major difference in the quality of their calls.

Choosing VoIP phones and equipment
Before deploying voice-over-IP in your office you will need to decide how each employee will be connected to your voice-over-IP provider.  There are many choices on the market today.
Digital IP Telephones – These types of phones look just like regular multi-line business telephones except that they connect directly to your internet connection using a network cable.
Soft Phones – A soft phone is a software program running on your computer that looks and feels just like a real telephone.  This requires you to purchase a USB headset which connects to your desktop or laptop so you can make and receive calls.
Wifi Phones – A wifi phone looks and feels very much like a regular cell phone except that it connects to your wireless router in the office.
Analog Telephone Adapters (ATA) – An ATA is a small box which connects to your router and allows you to plug in regular analog telephones so they can work with voice-over-IP.  ATAs are generally low cost alternatives to digital office phones and are easy to take with you when you travel.
Battery backup and Power-over-Ethernet
With voice-over-IP and most office telephone systems you must consider what happens when the power goes out.  For some offices this can be a regular occurrence and for others it might happen with a very low frequency.  Once of the things you will need to decide is whether or not you will install a battery backup system.
Here are a few important terms your should know:
Power over Ethernet (PoE) – Is a technology that allows VoIP over ip telephones to be powered using regular network cables rather than power adapters which plug into the wall.  This has the advantage that you can power all the phones in your office from a single source and makes installing a battery backup unit much easier.
Uninterruptible Power Supply (UPS) – Is a device that powers your equipment when you lose power at the office.  The system has a built in battery which keeps your network devices operational when the power goes out.
The easiest way to protect your phone system from a power outage is to power all the phones using a Power-over-Ethernet switch that would normally be connected in the back room where your router and cable/DSL modem is located.  This has the advantage that all your phones are drawing power from a single source which you can backup using an uninterruptible power supply (UPS).  All you need to do is plug in your PoE switch, router, and DSL/cable modem into a sufficiently powerful UPS device so that when the power goes out all your phones remain up and running.

Categories
Asterisk Support Elastix Support Knowledge Base

Installing DynDns update script on Centos

The following is a simple run-through on installing the dyndns client for updating the ip address on your hosts.

cd /usr/src

wget  http://cdn.dyndns.com/ddclient.tar.gz
tar -xzvf ddclient.tar.gz

cd ddclient-3.7.3/

mkdir /etc/ddclient

mkdir /var/cache/ddclient
cp ddclient /usr/local/sbin

cp sample-etc_ddclient.conf /etc/ddclient/ddclient.conf

cp sample-etc_rc.d_init.d_ddclient /etc/rc.d/init.d/ddclient
chkconfig --add ddclient

cd ..

vi  /etc/ddclient/ddclient.conf

add at the bottom of file

#
use=web
login=USERNAME
password=PASSWORD
server=members.dyndns.org  
protocol=dyndns2
# add your DNS name here as below 
DNSNAME.dyndns.biz
#
/etc/init.d/ddclient start

You will then need to check that your host address has updated on the dyndns site.

If you get perl io ssl errors in the logfile then:

yum install perl-IO-Socket-SSL
Categories
Knowledge Base

ETHERACCESS LA210

The unit is referred to as the Network Termination Equipment (NTE) or RAD box.

It is used to ‘bond’ the multiple lines that are used on an EFM connection into one circuit. There are RJ45 Network ports on the rear that allow you to plug your own equipment such as routers in.

Front View

The front of the LA-210 includes LED lights that can indicate the state of the unit and the connection.

LA210_front

Rear view

The LA-210 has 4 RJ-45 network ports that the you can plug your own router into.

LA210_rear

ls120led LED STATUS


Categories
Knowledge Base

VoIP – Per Call Bandwidth

These protocol header assumptions are used for the calculations:

  • 40 bytes for IP (20 bytes) / User Datagram Protocol (UDP) (8 bytes) / Real-Time Transport Protocol (RTP) (12 bytes) headers.
  • Compressed Real-Time Protocol (cRTP) reduces the IP/UDP/RTP headers to 2or 4bytes (cRTP is not available over Ethernet).
  • 6 bytes for Multilink Point-to-Point Protocol (MP) or Frame Relay Forum (FRF).12 Layer 2 (L2) header.
  • 1 byte for the end-of-frame flag on MP and Frame Relay frames.
  • 18 bytes for Ethernet L2 headers, including 4 bytes of Frame Check Sequence (FCS) or Cyclic Redundancy Check (CRC).

Note: This table only contains calculations for the default voice payload

Codec Information Bandwidth Calculations
Codec & Bit Rate (Kbps) Codec Sample Size (Bytes) Codec Sample Interval (ms) Mean Opinion Score (MOS) Voice Payload Size (Bytes) Voice Payload Size (ms) Packets Per Second (PPS) Bandwidth MP or FRF.12 (Kbps) Bandwidth w/cRTP MP or FRF.12 (Kbps) Bandwidth Ethernet (Kbps)
G.711 (64 Kbps) 80 Bytes 10 ms 4.1 160 Bytes 20 ms 50 82.8 Kbps 67.6 Kbps 87.2 Kbps
G.729 (8 Kbps) 10 Bytes 10 ms 3.92 20 Bytes 20 ms 50 26.8 Kbps 11.6 Kbps 31.2 Kbps
G.723.1 (6.3 Kbps) 24 Bytes 30 ms 3.9 24 Bytes 30 ms 33.3 18.9 Kbps 8.8 Kbps 21.9 Kbps
G.723.1 (5.3 Kbps) 20 Bytes 30 ms 3.8 20 Bytes 30 ms 33.3 17.9 Kbps 7.7 Kbps 20.8 Kbps
G.726 (32 Kbps) 20 Bytes 5 ms 3.85 80 Bytes 20 ms 50 50.8 Kbps 35.6 Kbps 55.2 Kbps
G.726 (24 Kbps) 15 Bytes 5 ms 60 Bytes 20 ms 50 42.8 Kbps 27.6 Kbps 47.2 Kbps
G.728 (16 Kbps) 10 Bytes 5 ms 3.61 60 Bytes 30 ms 33.3 28.5 Kbps 18.4 Kbps 31.5 Kbps
G722_64k(64 Kbps) 80 Bytes 10 ms 4.13 160 Bytes 20 ms 50 82.8 Kbps 67.6Kbps 87.2 Kbps
ilbc_mode_20(15.2Kbps) 38 Bytes 20 ms NA 38 Bytes 20 ms 50 34.0Kbps 18.8 Kbps 38.4Kbps
ilbc_mode_30(13.33Kbps) 50 Bytes 30 ms NA 50 Bytes 30 ms 33.3 25.867 Kbps 15.73Kbps 28.8 Kbps

Explanation of Terms

Codec Bit Rate (Kbps) Based on the codec, this is the number of bits per second that need to be transmitted to deliver a voice call. (codec bit rate = codec sample size / codec sample interval).
Codec Sample Size (Bytes) Based on the codec, this is the number of bytes captured by the Digital Signal Processor (DSP) at each codec sample interval. For example, the G.729 coder operates on sample intervals of 10 ms, corresponding to 10 bytes (80 bits) per sample at a bit rate of 8 Kbps. (codec bit rate = codec sample size / codec sample interval).
Codec Sample Interval (ms) This is the sample interval at which the codec operates. For example, the G.729 coder operates on sample intervals of 10 ms, corresponding to 10 bytes (80 bits) per sample at a bit rate of 8 Kbps. (codec bit rate = codec sample size / codec sample interval).
MOS MOS is a system of grading the voice quality of telephone connections. With MOS, a wide range of listeners judge the quality of a voice sample on a scale of one (bad) to five (excellent). The scores are averaged to provide the MOS for the codec.
Voice Payload Size (Bytes) The voice payload size represents the number of bytes (or bits) that are filled into a packet. The voice payload size must be a multiple of the codec sample size. For example, G.729 packets can use 10, 20, 30, 40, 50, or 60 bytes of voice payload size.
Voice Payload Size (ms) The voice payload size can also be represented in terms of the codec samples. For example, a G.729 voice payload size of 20 ms (two 10 ms codec samples) represents a voice payload of 20 bytes [ (20 bytes * 8) / (20 ms) = 8 Kbps ]
PPS PPS represents the number of packets that need to be transmitted every second in order to deliver the codec bit rate. For example, for a G.729 call with voice payload size per packet of 20 bytes (160 bits), 50 packets need to be transmitted every second [50 pps = (8 Kbps) / (160 bits per packet) ]

 

Bandwidth Calculation Formulas

These calculations are used:

  • Total packet size = (L2 header: MP or FRF.12 or Ethernet) + (IP/UDP/RTP header) + (voice payload size)
  • PPS = (codec bit rate) / (voice payload size)
  • Bandwidth = total packet size * PPS
Categories
Gateways

Redfone FoneBRIDGE

The foneBRIDGE is a T1/E1 PRI-to-Ethernet Bridge. It is an integrated black box appliance designed to streamline installation and enable redundant design of open source telephony based VoIP systems such as Asterisk®, Elastix, Trixbox, FreeSwitch and others.

Features

Failover and HA Enabled
• Flexible Configuration
• Highly reliable design
• Simple Install
• Form factor independent
• Single, Dual, Quad and Octal Port models

Applications

• T1/E1 PRI Trunk termination
• Legacy PBX-to-Asterisk integration
• Simple, single server installs
• Complex, HA Asterisk clusters
• Channel Bank connectivity
• Mixed telephony environments (T1 and E1)
• Blade Servers where PCI slots are not available

Download Datasheet here

Price excluding VAT:

  • Non ec Single e1 £430
  • Non ec Dual e1 £850
  • Non ec Quad e1 £1200
  • ec Single e1 £640
  • ec Dual e1 £1200
  • ec Quad e1 £1700
*ec = Hardware echo cancelation
Categories
Calls and Lines Connectivity

MPF ADSL

Advanced Broadband will give you the fastest download speed you can get from your exchange, a generous bandwidth limit and direct connection to the Gradwell VoIP network, making it a perfect partner for Internet telephony.

  • No BT Line Rental
  • £25 pm
  • Generous 100Gb Peak Data Transfer per month
  • FREE Thomson Wireless Router
  • Voice prioritisation to support VoIP users
  • Get the fastest speed your line can give you, up to 16Mbps
  • 12 month contract, rolling monthly thereafter (30 day notice period)

Premier Broadband has all the benefits of our Advanced Broadband package, and more. 200Gb peak bandwidth and assured throughput mean you have the optimum amount of bandwidth for up to 10 concurrent Internet telephony calls.

  • No BT Line Rental
  • £50 pm
  • Enhanced Care and Service Level Agreement
  • 200Gb Peak Data Transfer per month
  • FREE Thomson Wireless Router
  • Assured throughput of at least 512Kb/s
  • Upload speeds of up to 1Mbps and download speed of up to 16Mbps
  • 12 month contract, rolling monthly thereafter (30 day notice period)

Premier Plus With Enhanced Care, a Service Level Agreement, fantastic upload speeds and assured throughput, Premier Plus Broadband is perfect for the largest of small businesses.

  • No BT Line Rental
  • £60 pm
  • Enhanced Care and Service Level Agreement
  • 200Gb Peak Data Transfer per month
  • FREE Thomson Wireless Router
  • Assured throughput of at least 1Mb/s
  • Upload speeds of up to 2.5Mb/s and download speed of up to 16Mb/s
  • 12 month contract, rolling monthly thereafter (30 day notice period)
Categories
Gateways

Digium G100/G200

Built on a powerful combination of the Asterisk Open Source communications engine and a state-of- the-art embedded platform, Digium VoIP Gateways provide the best value for Asterisk connectivity.

The gateway software is based on the Asterisk communications engine and is managed through Digium’s intuitive point-and-click GUI interface, which allows for easy navigation and effortless setup. VoIP gateways feature a power-saving embedded design with a highly efficient digital signal processor (DSP) handling all media-related operations.

The Digium G100 VoIP Gateway includes a single software-selectable T1/E1/PRI interface and supports up to 30 concurrent calls. It is built to support TDM-to-SIP, SIP-to-TDM and SIP-to-SIP (transcoding) applications. In a TDM-to-SIP deployment the VoIP gateway significantly reduces operating costs by connecting a legacy business phone system with dynamic SIP trunking services. SIP-to-TDM deployments use the VoIP gateway to connect a modern SIP communications system with T1/E1/PRI service from legacy carriers.

Applications

Digium VoIP Gateways are flexible solutions that fit a variety of communications applications. The applications listed below represent some of the most widely used, today. The flexible configurtation options and standards-based connectivity mean Digium’s gateway appliances can support a wide range of custom applications.

Public Switched Telephone Network T1/E1/PRI to VoIP:

VoIP Provider to Legacy PBX:

Specifications

Interfaces / Connections

  • 1/2 T1/E1/PRI w/ RJ-45
  • 1 10/100/1000 Ethernet

Benefits

  • Hardened
  • Cost effective
  • Low power consumption

Features

  • Intelligent call routing
  • Easy-to-navigate GUI
  • Fax and modem support
  • Solid state (no moving parts)
  • Remote configuration and software updates
  • Octasic™ DSP processor
  • Up to 60 concurrent calls

Price excluding VAT : G100 £820.00 G200 £1370.00

Categories
Knowledge Base

Sip debugging with wireshark

Wireshark and Cloudshark are invaluable tools for debugging sip and iax issues on your Asterisk server.

Here we have a short Video that goes over the basics of getting a call captured and opened in Cloudshark

we also have a short tutorial for download here in PDF format

First we need to get the packets we want. This is far simpler than its thought. We use a simple command line tool called tcpdump, if its not installed install it now, You wont be able to live without it.

Here we have 2 commands, The first captures packets on interface eth0, -n means we won’t convert addresses, -w means we just capture raw packets and udp means its only the udp packets we want and finally port 5060 means its only the sip messaging we want. In the second we dont specify port 5060 so that we get the rtp stream as well.

/usr/sbin/tcpdump -n -i eth0 -w /tmp/wireshark.pcap -s2000 udp port 5060
 /usr/sbin/tcpdump -n -i eth0 -w /tmp/wireshark.pcap -s2000 udp
screen -S "udpDump" -dm tcpdump -n -i eth0 -C 9 -W 15 -w /var/log/asterisk/dumpsip.pcap -s2000 udp port 5060

The command above will write to file in the background and will rotate at 9 meg so suitable for cloudshark

Once you have started the capture and made a call as required you will get a file called for example /tmp/wireshark.pcap copy this to your workstation via ftp or sftp as you would copy any file.

Categories
Knowledge Base

General Configuration Guide Skype for SIP and Asterisk

 

If you are new to SIP, Asterisk is a useful, open-source (GPL) platform with which to test and experiment with the Skype for SIP. This is a guide on how to install Skype for SIP on a system agnostic or “vanilla” Asterisk server.

 

To install Asterisk on your server, please see the Digium documentation here http://www.asterisk.org.

 

This configuration guide is based on Debian Linux (Lenny 64bit). With a basic installation of Debian you can install Asterisk by issuing the following APT command at the command line:-

apt-get install asterisk

 

 

Configuration Files for Vanilla Asterisk

 

In configuring Skype for SIP on a vanilla Asterisk system we are primarily concerned with two configuration files:-

 

  1. sip.conf (located in the /etc/asterisk/ directory)
    The sip.conf file holds the registration details for the Skype for SIP channel
  2. extensions.conf (located in the /etc/asterisk/ directory)The extensions.conf holds the dial plan telling Asterisk what to do with incoming and outgoing calls.-

 

Let’s do a walkthrough of the configuration steps.

 

Configuring the sip.conf File

 

Step 1

 

The sip.conf file has two sections that need to be completed. The “General” section (denoted in the file with the [general] heading) and peer section denoted in the file with the [peers] heading.

 

In the General section we need to add a “register” line. This tells Asterisk to register with Skype at the Skype local point of presence.

 

Add the following, under the “[general]” section in the file, substituting your 9905xxxx number and password with your actual credentials for the Skype for SIP profile you wish to use. Your SIP Profile details can be found in the Skype Business Control Panel (BCP):-

 

register => 99051000xxxxxx: PaSsW0rD@sip.skype.com /99051000xxxxxx

 

Step 2

To ensure that we also receive the callerID from Skype clients we also should add:-

 

trustrpid = no

sendrpid = yes

 

 

Step 3

Next, we add a section for the peer, in the “[peers]” section of the sip.conf file. Again we substitute the 9905xxxxx number and password with the SIP Profile credentials from the Skype Business Control Panel (BCP):-

 

[99051000xxxxxx]

type = peer

username = 99051000xxxxxx

fromdomain = sip.skype.com

fromuser = 99051000xxxxxx

realm = sip.skype.com

host = sip.skype.com

dtmfmode = rfc2833

secret = PaSsW0rD

nat = no ;This should be set to reflect your network NAT configuration

canreinvite = no

insecure = invite

qualify = yes

disallow = all

allow = alaw

allow = ulaw

;allow = g729 ; Uncomment this if you have G729 licences

amaflags = default

trustrpid = no

sendrpid = yes

context = skype_in

 

Please Note:

If your Asterisk PBX is behind a NAT device, you should set “nat = yes” in this section.

 

If your Asterisk PBX has a dedicated internet IP address, set this to “nat = no”.

 

Step 4

After setting these changes, reload the Asterisk’s SIP module by typing:-

 

asterisk -rx “reload chan_sip.so”

 

…….at the command line.

 

Step 5

After the SIP Module has reloaded enter asterisk -rx “sip show peers” at the command line, which should return:

 

pbx*CLI> sip show peers

Name/username Host Dyn Nat ACL Port Status

99051000xxxxxx/99051000xx 193.120.218.68 5060 OK (52 ms)

 

Then enter asterisk -rx sip show registry” which should return:

 

pbx*CLI> sip show registry

Host Username Refresh State Reg.Time

sip.skype.com:5060 99051000xxxx 105 Registered day, dd mmm yyyy hh:mm:ss

 

If you see output similar to the above, then you are registered to the Skype SIP gateway and ready to make and receive calls.

 

We now need to setup the extensions.conf so that we have a dialplan setup and Asterisk knows how to deal with incoming and outgoing calls.

 

Configuring the extensions.conf File

 

The extensions.conf file requires a “context” and an “extension” to be added for incoming Skype calls, plus an extension to be added to the context that users use for outgoing calls.

 

Incoming “context”

 

Add the following lines to the [context] section of extensions.conf, substituting 9905xxxxxxx with the 9905 number for the SIP Profile. Again you can find the details of your Skype SIP Profiles in the Skype BCP:-

 

[skype_in]

exten => 99051xxxxxxxx,Noop(${CALLERID(name)} , ${CALLERID(num)})

exten => 99051xxxxxxxx,n,Dial(SIP/100,30,t,r)

exten => 99051xxxxxxxx,n,voicemail(100|u)

 

This is a simple “vanilla” context that shows us the callerID name and number, dials extension 100 for 30 seconds and finally, if unanswered, goes to voicemail. This sequence will need to be amended to suit your requirements. If you are planning on having many SIP Profiles or Online Numbers that all need to end up at the same destination, or the destination is decided by the Skype Business Account that the online number is registered against, a more complicated Dialplan can be used. For example:-

 

[skype_in]

exten => 99051xxxxxxxx,1,Noop(${CALLERID(name)} , ${CALLERID(num)})

exten => 99051xxxxxxxx,n,Queue(sfs|r|||40)

exten => 99051xxxxxxxx,n,voicemail(100|u)

 

 

Outgoing “Context”

 

The outgoing context must be included in the context for your user’s phones. Usual security measures apply. Do not include this in a context for incoming calls.

 

[skype_out]

 

exten => _90Z.,1,Set(CALLERID(num)= 99051xxxxxxxx)

exten => _90Z.,n,Dial(SIP/0044${EXTEN:2}@99051xxxxxxxx)

 

exten => _900.,1,Set(CALLERID(num)= 99051xxxxxxxx)

exten => _900.,n,Dial(SIP/${EXTEN:1}@99051xxxxxxxx)

 

 

In the sip.conf add the following to create user 100

 

[100]

secret=secret

mailbox=100

callerid=”myskypetrunk” <100>

type=friend

host=dynamic

context=international

;nat=no

nat=yes

canreinvite=no

dtmfmode=rfc2833

pickupgroup=1

callgroup=1

subscribecontext=default

notifyringing=yes

disallow=all

;allow=alaw

allow=ulaw

allow=gsm

 

in the extensiosn.conf add the following to the default context

 

exten => _XXX,1,Dial(SIP/${EXTEN},20)

 

Also create a context called international

 

[international]

include => default

include => skype_out