Howto: Skype + Asterisk + FreePBX

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
Dear all

Here is the configuration for chan_skype from Digium. It's not free, it's $66 USD, but I can see that in certain commercial environments, it could be very useful, and if you get an extra customer or two because of it, then it may pay for itself.

1. Purchase, download, and install Skype from Asterisk, from here - http://www.digium.com/en/products/software/skypeforasterisk.php. You've got some hoops to jump through, but you will get there in the end.

You are going to have to upgrade asterisk to later than 1.4.25.2 to have this working. PiaF in its standard configuration will not work.

2. Download and install the register utility and register your product. You are going to have a problem if you are doing this on Proxmox with a Venet interface, as there is no eth0, but there is a workaround.

3. STOP - READ THIS.
You need to register your skype account via https://secure.skype.com/business and configure your new skype name in the business support panel.

Existing Skype accounts DO NOT WORK. You need to add your new account via the business portal - it's free, but that took me about 3 hours to work out yesterday. I should have read the FAQ first.

4. Next you need your config file. /etc/asterisk/chan_skype.conf


When you take out all the comments, it should look like this:-
Code:
[general]

default_user=your-skype-user-name

[your-skype-user-name]
secret=skype-secret-password
context=from-trunk
disallow=all
allow=ulaw
allow=alaw
You need to give it asterisk ownership

Code:
chown asterisk:asterisk /etc/asterisk/chan_skype.conf
Issue amportal kill, then amportal start at the command line to bring everything on line.

5. Configuring inbound calls
In inbound DID, add a new DID, and in the DID field, put your-skype-user-name and point it to the desired destination. FreePBX will ask you if you know what you are doing, answer yes! Confirm and reload. You can now dial into your PBX from Skype.

6. Configuring extensions to call other Skype users.

Add a new extension, of type "custom" give it an extension number, and in the dial string put:-
Code:
Skype/some-skype-user
Confirm and reload

Now dial the extension number, and some-skype-user's Skype will ring.

7. Using Skype as an outbound trunk to call the PSTN
Once you have some Skype credit, you can use skype to call the PSTN. Calls must be sent to Skype in full international format with a leading +, e.g. +19739616000 (Newark Airport IVR) or +441179117933

I've not tested this, so corrections welcome.

Create a trunk of type Custom, and in the dial string put

Code:
Skype/$OUTNUM$
and in outbound dial prefix, put + to prefix the + sign on every outbound call.

Now set up your outbound routes to use the Skype channel, and make the modifications to the trunk dial rules to send the call out in international format.

8 Proxmox + Venet modifications to allow the asterisk register utility to work.

the Digium register utility ties the license to eth0, which of course does not exist in openvz configured with a venet interface, which is the best to use as it is the fastest, and is the default configuration, so we have to fool the register utility into seeing an eth0 interface, without breaking anything else.

First, get a copy of the MAC address of eth0 in the Hostnode by typing ifconfig

Go to /etc/vz/conf and edit the conf file for the container you want to use, e.g. 101.conf At the bottom of the file, add this line.

Code:
NETIF="ifname=eth0,mac=xx:xx:xx:xx:xx:xx,host_mac=yy:yy:yy:yy:yy:yy"
Where xx:xx:xx:xx:xx:xx is the the MAC of eth0 on the hostnode, discovered by typing ifconfig, and yy:yy:yy:yy:yy:yy is a made up MAC made up of hexadecimal numbers.

Restart the Container, and then log in and check eth0 is in the container by issuing ifconfig -a, and eth0 should show up.

The above no longer seems to work, but
vzctl set 101 --netif_add eth0 --save
seems to work, and adds a netif line. This is going to make life easier to script. see install-dahdi-on-proxmox.sh at

This trick can be used with g729 and fax licenses as well for registration utility.

Interestingly, the MAC the register utility uses is that of the hostnode, and one wonders whether you could have multiple containers on Proxmox, all using the same license key! Of course I have not tried this, as that would be dishonest!


In conclusion
This gives an opportunity for free calls, to take advantage of Skype DID and termination (which is not that cheap) as well as well as providing a popular route of calling your business free of charge, or staff working at home, without running into any NAT issues. No changes or configuration needs to be done to your firewall.

Have fun

Joe Roper
skype:star2billing.sales
 

jehowe

Guru
Joined
Nov 14, 2007
Messages
288
Reaction score
4
Thanks Joe, those instructions are very clear. I was checking into bringing in Skype for one install not 12 hours ago.

They also offer a 'Skype for SIP' product (beta), that appears to offer SIP credentials that would make for a simpler setup, and both asterisk and non-asterisk friendly. I don't know the costs (guessing it's the same as the asterisk product), or major differences. Both require business accounts and use the business control panel from what I can tell.
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
Hi

I spotted the SIP for Skype link, right after a paid my $66USD to Digium, and sat here scratching my head on why I could not get my domestic account working, until I logged into Skype business.

That's something for another day. For the moment, I've achieved my objective of getting Skype presence working for Star2Billing, and I have also got it working as an access method for calling card, and call through services.

Joe
 
Joined
Apr 17, 2009
Messages
829
Reaction score
9
Hi

I spotted the SIP for Skype link, right after a paid my $66USD to Digium, and sat here scratching my head on why I could not get my domestic account working, until I logged into Skype business.

That's something for another day. For the moment, I've achieved my objective of getting Skype presence working for Star2Billing, and I have also got it working as an access method for calling card, and call through services.

Joe


I would love to hear more on this sometime.

from what I understand for $2.95 a month USD you can have unlimited US calling with skype. so to me it seems as though that would be a hell of a benefit to pay a 1 time $66 fee and only $2.95 month to have unlimited calling
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
I wish:-

Here's a quick reminder that Skype's subscriptions are for individual use only and do not include calling from or through multi-user devices such as PBXs - as stated in our Fair Use Policy. Any members of your Business Control Panel who call landlines or mobiles from such devices will be charged at our standard call rates.

However, they can still benefit from their subscription when calling directly from the Skype software or a stand-alone Skype-enabled device. Please sign in to to your Business Control Panel to manage your members' subscriptions.

Joe
 

sukasem

Guru
Joined
Sep 13, 2008
Messages
142
Reaction score
26
Hi,
Have you try 3CX phone system?
3CX provide free Skype Gateway software but it's on Windows tho.
You have to have 2 servers running.

I haven't tried to link asterisk with 3cx yet. I did try Skype Gateway plugin and it works and it's free.

Cheers,
Sukasem
 

wiznet

New Member
Joined
Jan 3, 2008
Messages
11
Reaction score
0
Skype for Asterisk is a one time cost of $66 The Skype for SIP is $8 per month forever or $96 per year.
 

jrglass

Guru
Joined
Oct 18, 2007
Messages
302
Reaction score
20
To use on a new install of Piaf is it best to use 1.6 or or upgrade to a 1.4 later than 1.4.25.2?

Thanks

Jeff
 

sike

New Member
Joined
Feb 18, 2009
Messages
11
Reaction score
0
I have come a long way..

-I managed to buy the Chan Skype from Digium
-And managed to install it
-And even register it

Now when I do a: skype show users

I get:
pbx*CLI> skype show users
Skype Users
UserName: Logged Out

If I type: skype login user UserName

Nothing happens. I have tried setting skype to debug bu am getting no joy.

I am running Asterisk 1.4.31
 

tomsyr

Guru
Joined
Oct 26, 2007
Messages
266
Reaction score
1
Skype useraname

I have come a long way..

-I managed to buy the Chan Skype from Digium
-And managed to install it
-And even register it

Now when I do a: skype show users

I get:
pbx*CLI> skype show users
Skype Users
UserName: Logged Out

If I type: skype login user UserName

Nothing happens. I have tried setting skype to debug bu am getting no joy.

I am running Asterisk 1.4.31


I'm at the same point (logged out)- has there been any changes to chan_skype.conf? I added in the settings as per what Joe wrote about in the general section.
Thanks,
Tom
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
Hi

Two points to note


You are going to have to upgrade asterisk to later than 1.4.25.2 to have this working. PiaF in its standard configuration will not work.

and

3. STOP - READ THIS.
You need to register your skype account via https://secure.skype.com/business and configure your new skype name in the business support panel.

Existing Skype accounts DO NOT WORK. You need to add your new account via the business portal - it's free, but that took me about 3 hours to work out yesterday. I should have read the FAQ first.

Can you confirm you have fulfilled these two requirements?

Joe
 

tomsyr

Guru
Joined
Oct 26, 2007
Messages
266
Reaction score
1
Hold on...

I got this - so it could be that i just need to fix this:
pbx*CLI> skype login user escotts
The account could not log in due to an incorrect password. This could
be due to the password being incorrect or because the account was
not created by the Skype Business Control Panel by clicking 'Create business
account'. Please be advised that the account that administers the BCP will not
work, nor will normal accounts that have been invited by the BCP. To verify
that the account is a BCP account, log into the Skype website at
https://secure.skype.com/account/login with the account and verify that
there is a box at the top of the screen saying 'You are a member of a
Business Control Panel'. If that message isn't there, you will need to create
a user from the Business Control Panel by clicking 'Add Members' and then
'Create a business account'.
 

tomsyr

Guru
Joined
Oct 26, 2007
Messages
266
Reaction score
1
Ok - now that I've followed the directions correctly:wink5:,
I was planning on using a mobile phone to make the skype call to connect, which does work. I have it pointed to go to DISA, but there is no keypad so that I can input the passcode, or even then dial out.
Is there a way to have a keypad? I'm using the Skype client on the Droid.
Even just calling into a IVR would be impossible without being able to dial numbers...
 

sike

New Member
Joined
Feb 18, 2009
Messages
11
Reaction score
0
Hold on...

I got this - so it could be that i just need to fix this:
pbx*CLI> skype login user escotts
The account could not log in due to an incorrect password. This could
be due to the password being incorrect or because the account was
not created by the Skype Business Control Panel by clicking 'Create business
account'. Please be advised that the account that administers the BCP will not
work, nor will normal accounts that have been invited by the BCP. To verify
that the account is a BCP account, log into the Skype website at
https://secure.skype.com/account/login with the account and verify that
there is a box at the top of the screen saying 'You are a member of a
Business Control Panel'. If that message isn't there, you will need to create
a user from the Business Control Panel by clicking 'Add Members' and then
'Create a business account'.

I had this one on the back burner. But it works now thanks to this post!

Good call. I set up a new account through the BCP as you suggested and it works like a charm!! Thanks!!

Is there any way to convert existing accounts?
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
I have read through what I can find at the Digium site, and elsewhere - but I dont think I have found a definitive answer to this question: Does the Skype Channel support video yet? I see Digium saying its a goal - but that was back some time ago.

Does anyone know - or can point me to a definative source of accurate info?

Theres a large installed base of skype users - and I think it would be much easier to interest users in video telephony if we could interoperate with that (or any other large and recognizable) group of users.
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
Ok I chatted with the digium folks today. The Skype Asterisk channel development is "on hold", and no video support is planned at this time.

My impression is that Skype is putting their efforts into a different direction - which you can read about on their site. It seems like they are working on making a SIP gateway for their service - which won’t need special channel drivers. The current version does not seem to support video - but their isn’t any way to get a live person into chat or a phone call to ask direct questions to that I could find.
 

Members online

No members online now.

Forum statistics

Threads
25,782
Messages
167,509
Members
19,202
Latest member
pbxnewguy
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top