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:-
You need to give it asterisk ownership
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:-
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
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.
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
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
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
Code:
chown asterisk:asterisk /etc/asterisk/chan_skype.conf
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
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$
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"
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
seems to work, and adds a netif line. This is going to make life easier to script. see install-dahdi-on-proxmox.sh atvzctl set 101 --netif_add eth0 --save
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