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

 

Categories
Case Studies

Asterisk install in a campus style school

In late 2005 We we approached to replace an aging Panasonic system for a British Public School.
The driving force for moving to voip was that the site was spread over a wide area and different buildings and to provide telephones to the remote buildings would prove too expensive.
The system was replaced with a central Asterisk server with nearly 80 extensions. The core LAN was upgraded to Netgear Layer 3 switches with Powerdsine POE midspans.
The remote buildings added extra complexity as one was on the other side of a public road.

To overcome this, this building was connected to the main site via a “Point to Point” Wifi link. The other building was closer and could be connected via a Fibre Link between the it and the main building.

Campus Site

The system was configured to use account codes in public areas, These handsets can only make emergency or internal calls unless a validated account code is entered.
The handsets used were a mix of Aastra 480i and 9133i because of build quality, reliability and BLF support.

The system has now been in place for over 2 and a half years now and in that time the only faults have been either ISDN failing or cable faults. This is a great demonstration of the reliabilty of Asterisk and Aastra handsets and voip in general.

UPDATE

We have since writing this post updated the system on new hardware as part of a refresh. They are now running on a newer version of Asterisk and have more buildings connected to the network.

Categories
Products

Handsets,Gateways and Cards

We supply VoIP Hardware, Phone Systems, IP Phones & VoIP Equipment from all Major Manufacturers.

Aastra Polycom Snom
Digium Openvox Patton
Grandstream Vegastream Redfone
Citel Linksys  We also supply

YeaLink

Gigaset

Please contact us with

your requirements


Please contact us for pricing
Categories
Case Studies

Solicitors Group

We were approached to provide a Voip solution for a London Solicitors. They were moving from a Single office to two offices in different parts of the city.

At the Primary office we installed an Asterisk server that was connected to the ISDN30e link where all DDI numbers were delivered for both sites. This site also had its own VOip connection as well

At the main site the operators were based using the Asternic FlashOsPanel for displaying extension status for both sites.

A key feature of the system was to provide a flexible system for out of hours callers to contact the duty Solicitor. This was provided so that callers on calling out of hours  can leave a message for the next day or press an option to contact the Duty solicitor. The Duty solicitor can call into the system and change the contact number at will if for example they are busy with a client.

A SIP trunk connected both sites together over a 20Meg link that was used for both voice and data.

The new sites were not in the exchange area of the original phone number so this was ported to Gradwell.net so that it could be delivered via an IAX2 connection to the relevent server.

The handsets used were a mixture of Aastra 53i and 55i with an xml appliction to set DND status in the Flash ops panel and light the light on the handset.

Categories
Headsets

Eartec Office Headset Connection Leads

A wide selection of connection leads and accessories are available for all handsets. Please call or email so we can make sure you get the correct lead.

Eartec Office RJ9 QD Connecting Leads

Connects headsets to Phones. many connections are available can be changed to match different kinds of IP Phones
QD (Quick Disconnect) cord perfectly suited for people who use headset regularly.
You can hold on calls and move away from desk easily without removing the headset off your head.

Y Training Cord/ Y Cords for Call Center Headsets. This lead allows two headsets to operate with one talking and other listening. For training or monitoring purpose with one volume controller and Mic mute key.

The Eartec Office EAR-QD007J lead comes with a 3.5mm Jack plug on one side and a Jabra quick disconnect on the other. With its 4 pole connector you are able to use the speakers and microphone on your smartphone giving you better experience.

The eartec office USB3UC cable offers you the complete unified communication solution. The stylish contemporary design of the Inline UC Controller provides you with a more efficient communication saving time.

  • Compatible with most UC software
  • Inline Volume / mute Controller
  • Plantronics quick disconnect
  • 2 Year’s Warranty

Coloured Foam Ear Cushion for Headsets eartec, Jabra and Plantronics

Our coloured foam ear cushions come in various colours and fit all popular headsets.

  • 1. Colours: Blue, Red, Green, Pink, Yellow, Orange and the original colour Charcoal.
  • 2. Size: 50*50mm
  • 3. Fits on: All eartec headsets, Jabra GN BIZ 1500 & Plantronics HW251, HW261, HW111, SP11/12
Categories
Blog

10, 20 and 30 years on.

This week has been full of memories spread over the last 30 years.

So 30 years ago, in Sept 1981 I had left school that summer and had started work at what is now known as BT, What brought back memories was that I recently went to a year of 1981 school reunion, Not the type that you see in the Cinema but a good old fashioned drink, Judging by some of the Facebook comments after, some may have drunk a tiny bit too much, But hey that’s what makes these things fun. This brought back many memories from school including the feeling of impending terror as we heard the clicking of Mrs Alcocks heels heading towards us. But also the good times, School trips, Bunking off and Under-age drinking in the very same pub that We met in for the reunion.. It was really strange and really great to see people Ive not seen in 30 years, and in many cases see how little people have changed.

I will now step forward 10 years to September 1991, I had now left BT which by now had gone through many changes, and was now cycling across Nepal,

My Bike in Nepal Travelling across SE Asia by as many different means as possible, including a Smuggling Boat from Singapore to Sumatra before finally arriving in New Zealand. This was a great and in many ways a care free time for me, Cycling where I wanted when I wanted.

image

Moving forward to 2001 I was now married and We didn’t know it but the World was about to change. The week started as normal, I was in Ipswich at NTL’s Network Operations Centre training staff. The 11th started as normal The mornings training had gone well, but then just before 2pm there call from the NOC, We rushed in to see the feed from Sky on the screen and people standing transfixed, staring at a burning tower on the screen, We continued to stand transfixed as the second plane hit. The day continued in a surreal manner as companies called in asking why they could get though to their US offices. In many cases this was just congestion because the lines were busy but in some cases this was for what was by now a far more obvious and chilling reason.

That was 10 years ago and it heralded a change in the world order, and its fair to say not for the better, We are in a recession again as it was when I left school in 1981, War unrest and intolerance abound as it did in Kosovo and the Gulf in the early 1990’s.

So what has those 30 years brought us for the better, Well the one massive thing has been the growth of the Internet and communications, This has allowed people to get and keep in touch in a way they never would have been able to back in 1981 or even for that matter in 1991. Social media has made the World a smaller place, You can Tweet or post on Facebook as soon as something happens and its read on the other side of the world almost as it happens. Perhaps a Tweet is finally proof of the “Butterfly effect”* be it a 21st century one:

*”The phrase refers to the idea that a butterfly’s wings might create tiny changes in theatmosphere that may ultimately alter the path of a tornado or delay, accelerate or even prevent the occurrence of a tornado in another location. The flapping wing represents a small change in the initial condition of the system, which causes a chain of events leading to large-scale alterations of events”

This effect was most recently seen in the Middle east where dictators have been overthrown and people liberated.

So maybe in the next 10 years the flapping of those tiny wings will bring peace and stability again to this world,

Lets all hope so.