Поиск по моему блогу

Install Skype for Elastix (Asterisk) - Установка Skype на Elastix (Asterisk)

Introduction
===========

Previous to the release of Skype for Asterisk, many users have implemented a range of Third Party products and tools that required usually a separate machine as a Skype Gateway. It was a messy way of implementing it as the Skype API was more of a high level API and it was the only way of implementing it. Whilst commercially these gateways were used, they were not an ideal commercial solution with increased points of failure and complexity.
Recently Skype had a change of mindset and started working with a few interested parties to implement a more integrated approach  with a lower level API, which means a cleaner integration. Asterisk was one of these parties and  have worked together with Skype to produce a product call Skype for Asterisk.
It does have a cost, but to be fair, it is quite a reasonable one for the functionality, and there is licenced proprietary code which needs to be paid for. Now there have been a few people saying that $US66 is expensive to pay per channel, many of them who run an Asterisk based systems at home. Most businesses who recognise the value and want this functionality, will dismiss the cost immediately. With 405 million registered Skype users world wide, and based on the fact that 30% of these users are business users, leaves you with 121 million potential people who can call your business directly for free (especially if your product is an international product), whether it is for support, ordering a product or your own remote offices that already have Skype installed on their desktop, it is a very small cost to pay.
Now before you get started. There is one very important concept that is important and something that you may not have come across before. The Skype account must be a Skype Business Account http://www.skype.com/business/products/business-control-panel/ . Now don’t panic as you see all the monetary values on the Skype page. The business control panel was not purely setup for Skype for Asterisk. This business control panel was originally setup to allow businesses to control and monetarily monitor their employees Skype usage. This mechanism however is the only way that it can be implemented. It is not a big deal, just a matter of registering, and once completed, create a username under that account that will be used for your Skype for Asterisk.
Now before you start, I recommend have a brief read through the document on the Digium website as it does contain some additional information that doesn’t required repeating here. https://www.digium.com/en/supportcenter/documentation/viewdocs/SFA
Now the other reason to go to that website is to confirm the latest versions of software and their links. Likewise you may need to replace the links in this tutorial with ones more suited to your setup (e.g. you might need the x64 versions). The tutorial below is based on the Elastix 1.6 on a 32bit platform (previous to this it worked fine on a 1.5 – possibly with yum updates which brought the Asterisk version up to the required level).

Installing the Asterisk files
=======================
The first part is to purchase at least a licence for Skype for Asterisk from the store. You just need one channel to allow a single Skype for Asterisk call. http://store.digium.com/productview.php?product_code=1SFA0001
As soon as your email with your Skype for Asterisk licence code arrives, move onto the next part
This part installs the registration component
cd /usr/src
wget http://downloads.digium.com/pub/register/x86-32/register
chmod 500 register
./register

follow the rest of the prompts which will include  the area to enter your code that you receive from Digium
cd /usr/src
wget http://downloads.digium.com/pub/telephony/skypeforasterisk/asterisk-1.4/x86-32/skypeforasterisk-1.4_1.0.6-x86_32.tar.gz

tar -xvzf skypeforasterisk-1.4_1.0.6-x86_32.tar.gz
cd skypeforasterisk-1.4_1.0.6-x86_32
make
make install
make samples

Now we need to make changes to the config file directly. Leave the rest as default (for the moment) and make only the changes I have done in bold below. I have placed some comments in curly brackets, these curly brackets and info between them should not be typed in.
nano /etc/asterisk/chan_skype.conf (remember nano is an editor that I prefer – you can install it by yum install nano)
; The username that will be used for outgoing calls and
; presence requests if no explicit username is specified
;
; default value: none
default_user=voiceintegrity
{what your outbound calls will go out as – replace with your Skype Business user name}
; *************
; USER SECTIONS
; *************
; Each section identifies a Skype user (by Skypename) that the
; channel driver should log in to the Skype network
[voiceintegrity]
{this is the Skype User you created – replace with your Skype Business user name}
; The user’s password
;
; default value: none
secret=somepassword
{the password you set for the Skype Business User Name}
; The dialplan context that incoming calls for this user
; should be directed to
;
; default value: default
context=from-pstn
{default context that will be matched for the incoming call from Skype}
; The extension in the target context that incoming calls for this
; user should be directed to
;
; default value: (the user’s name)
exten=voiceintegrity
{we are not using an extension, we are setting a inbound route with a DID of your skype user name}
; The codecs that should be allowed for calls to/from this
; user; use ‘disallow’ to remove codecs from the list, ‘allow’ to
; add them
;
; default value: ulaw, alaw and g729
;disallow=all
;allow=ulaw
{for the moment, at least until you have the basics working, leave as default, works fine}
Save it  and that’s done…..
Now for Freepbx
Freepbx Setup – Incoming Call Functionality
===================================

Now that we have configured Skype, we need to tell Elastix what to do with the calls that come in from Skype…..
So in the Elastix PBX GUI or via unembedded Freepbx, setup a new  inbound route. You might ask, where is the trunk setup. This is already done by chan_skype and the config that we have already filled out. You will note above that we have already provided it with a context (from_pstn), the codec selection, username, password, the same information that you would normally add to a trunk.
Anyhow onto the inbound route setup
SkypeInboundRoute
Now this inbound route is no different from the normal inbound routes that you setup….
You will note the main items that have been added and the reasons why…..
1) Description : Skype
This is just a description. This is for you to identify the route….important if you want to setup a couple of different skype users and have them go to different areas. This name is not critical in what you name it.
2) DID number : voiceintegrity
Note this is going to be the username that you have setup under skype and also what you have entered into the previous config. Naturally, like the chan_skype config  you are not going enter voiceintegrity as the username, it will be whatever account that you setup under Skype.
3) CID name Prefix : Skype
This again can be anything you like. As these calls will be coming into your PBX, just like normal calls, it is nice to identify to the personal about to pickup the phone that this call is coming through Skype
4) Destination : YourIVR/ringgroup
Finally the last piece of the freepbx setup for inbound is to point it somewhere. In this case we have it pointing to our IVR, but like all inbound routes, it can point to a ring group, queue, announcement, voicemail etc…
Reboot your system. Once the reboot has completed just run this following test to make sure that your chan_skype is running.
Under the Asterisk CLI (type asterisk -r -vvvvvvvvvv at the linux prompt)
skype show
skypeshowusers
This should show your Skype user logged in.
skype show licences
skypeshowlicences
If your tests appear to be successful then you can now test with a real skype call. Naturally you should have a separate skype account to call into your system, but this is most likely the case since you probably had to setup a separate Skype Business account for your Elastix Skype.
Freepbx Setup – Outgoing Call Functionality
===================================

Now you have tested the basic incoming functionality…..you may be wondering how to make outgoing calls on Skype. I have to admit, I have not spent too much time on this particular area as I only require incoming functionality and only call a few Skype Users.
As there is no special way of being able to type someone’s name from the telephone (not supported by the Freepbx), you can’t just type a name and have it dial out via your telephone (not yet anyhow). But what you can do is add these common ones that you dial (e.g. well known contacts and possibly remote workers running Skype) as custom extensions in Freepbx. So as you add more, you can enter them in the Freepbx or Elastix GUI.
For instance I chose the extension range of 900-999 for all called Skype Users. This does not mean that it is limited to holding 99 Skype users, just change the range that you want to call e.g. 1000-1999 – now you are ready for 1000 Skype Users.
So this is how you setup a Custom Extension in Freepbx for the Skype Users. Add an extension and in the drop down box select Other (Custom) Extension.
customextensionskype
So for this one, I am setting extension 901 as John Smith. his Skype name is johnsmith and you will note that the important part that actually makes this all happen is the entry in the dial entry which is Skype/johnsmith. That is it…..Now to call your client or user that uses Skype, just dial extension 901 and the call will be connected.
As this is setup this way, especially if they are remote staff in your organisation, they can have voicemail, they can be selected as IVR endpoints. As they are part of the Freepbx fabric, many of the options that apply to normal extensions should work, but be aware, I have not tested it against Ring Groups or other components that rely on round robin style calling of extensions.
There is a lot more that can be done with Skype for Asterisk. What I have provided is the basic in/out functionality and how to get it working in Elastix. The next part is to have a read of the extensive documentation from Digium and look if you can work out other ways to perform functions that you may want. Enjoy!!
Troubleshooting:
==============
skype show did not show my user logged in
Check that you have the user correctly setup and that you have setup a Skype for Business Account (this is imperative).
Skype show users comes back no such command
This sounds like chan_skype is not actually running. This can be the result of a few things such as configuration file incorrect. Go back and check your configuration file. It could also be that you need to be running Asterisk 1.4.25 at least. Check this by logging into your asterisk cli and it will tell you in the first couple of lines what Asterisk you are running. The other possibility is that you have not completed the install correctly.

Источник: Elastix Blog и Digium

Комментариев нет:

Реклама от BigBN