Search

Saturday, August 31, 2013

Auto-provision Yealink IP Phones

Auto-provisioning allows us to conveniently mass deploy IP phones.  Generally, we put a set of configuration files containing the sip credentials and other phone settings on a tftp server.  When the IP phones boot, they download the configuration from the tftp server and self configure to work with the IP PBX.

This blog describes the steps taken to auto-provision Yealink T20P and T28P.

When Yealink phone boots, it looks for auto provision information in order of PnP, DHCP option 150 and DHCP option 66.  We therefore could configure our DHCP server to supply the tftp server address via option 66.

For illustration, below shows how to specify tftp server address in /etc/dhcpd.conf in CentOS.

subnet 192.168.2.0 netmask 255.255.255.0 {
        option routers                  192.168.2.1;
        option subnet-mask              255.255.255.0;
        option nis-domain               "pbx";
        option domain-name              "bx";
        option domain-name-servers      192.168.0.20;
        option time-offset              28800; # Asia/Hong_Kong
        option ntp-servers              192.168.2.1;
        option tftp-server-name         "192.168.2.1";


Yealink phones expect two types of XML configuration files: model-oriented cfg and mac-oriented cfg.  A full list of the configuration parameters could be found here.

The model-oriented.cfg for T20 and T28 are given below.

T20 y000000000007.cfg
T28 y000000000000.cfg

A mac-oriented.cfg would look like  0015652e9af6.cfg.

By preparing a set of cfg, we could easily deploy a large number of Yealink phones.





Monday, August 05, 2013

Setup Elastix SIP trunk to Skype with SkypeConnect


What is SkypeConnect

Skype Connect is the official Skype-to-SIP gateway offered by Skype.  

You can subscribe this service via the Skype Manager's Features Menu.  It works like a SIP trunk whereas you will be given a SIP account and a password for your SIP PBX, for example, Elastix, to register to sip.skype.com which is the gateway between your PBX and the proprietary Skype network.

By gaining connectivity with the global Skype community, your business can get improved customer exposure. 

You can place a Skype button on your web site and your visitors can instantly talk to your service staff through a mouse click and at zero IDD cost -- What a easy way to setup a toll-free inquiry to your product !  

Incoming call is eventually handled by your PBX and therefore call management like IVR, Call Queue, Auto Attendant andconversation recording becomes possible.


What is more, 
you can take advantage of the wide coverage of Skype Numbers to allow international visitors to contact you via their local telephone network.    

Your SIP Profiles

You can setup more than one SIP profiles in Skype Manager.  A SIP profile is basically a SIP account with which your SIP-based PBX uses to register to sip.skype.com.  
Next, go to Profile settings|Incoming calls, we add business account or Skype Number to establish a connection with our SIP profile with a particular Skype identity.  Incoming calls to this Skype id or Skype Number will be diverted to our SIP trunk and be eventually handled by our Elastix.

Note that Skype enforces a ceiling on the maximum number of concurrent calls per profile.

Setup SIP trunk in Elastix

We go to PBX|Trunks|Add SIP Trunk and input the account credentials in PEER Details and Registration sections.

username=<refer to your SIP profile in Skype Manager>
type=peer
secret=<refer to your SIP profile in Skype Manager>
nat=yes
insecure=port,invite
host=sip.skype.com
disallow=all
canreinvite=no
allow=alaw&ulaw

Registration

To verify whether we can successfully register to Skype, we can use below command in Asterisk CLI.

CLI > sip show registry

You should see that your SIP account is reported as 'registered'.

Setup Inbound Route in Elastix

To route the Skype incoming calls to an Elastix destination, we have to setup an inbound route in PBX|Inbound Routes.
Simply specify the Skype SIP username in the DID number field and choose a destination, such as IVR or ring groups.
Then you can receive calls from Skype and could take advantages of numerous call management features in Elastix.

Yet world is not perfect

At the time of writing, we experience a consistent long delay (around 1min) after clicking a Skype Button and before our Elastix sees the incoming traffic.  
When you google 'skype connect long delay', you should find more than a few posts about similar situation.  Apparently, this issue has been brought to Skype support and is still awaiting resolution.