|
You are expected to already know how to install software on your platform and
how to configure Asterisk/FreePBX/trixbox/Elastix/PBX-in-a-flash peers, extensions and routes.
When configured correctly, you will have multiple channel inbound and outbound Skype calling abilities
integrated into your Asterisk/FreePBX/trixbox/Elastix/PBX-in-a-flash server.
You can install everything on the same box if you desire.
Here are some Linux instructions for those who need a little extra help. Install the applications Install Asterisk, PBX-in-a-Flash, trixbox, Elastix or other SIP PBX. Some tutorials are here: PBX-in-a-Flash without tears Elastix without tears trixbox without tears Install Sun/Oracle's Java 1.5 JRE or higher (Linux Users - Do NOT use openjdk). Download Skype client, install and create skype accounts for as many Skype channels as you need. Note: You can use a single Skype account if you are going to use stsProxy or make outgoing calls only. SipToSis must be run on the same computer as the Skype client. Download the latest SipToSis SIP Skype Bridge and extract into a new folder 'siptosis'. Download the latest SipToSis Skype Trunk Builder for your platform and extract into a new folder 'stsTrunkConfig'. Make sure to keep the folder/path structure contained in the archives. For linux only, install Xvfb if you don't already have it installed. (Example: yum install xorg-x11-server-Xvfb or sudo apt-get install Xvfb) - Some sort of X server is required. Configure a functional test channel first. It will be easier to correct a problem with a single channel. On linux: If you plan on using snd-dummy, test it thoroughly on this test channel. Basic SipToSis setup is similiar to a SIP device - see the SipToSis ATA Setup Guide for initial setup. This setup is expecting that you register SipToSis with the PBX. Look for #Sample Asterisk registration example section in siptosis.cfg. In addition to the registration, here are some recommended changes to make in siptosis.cfg for a PBX (Single or Multi channel).
For plain Asterisk:
Add to sip.conf
[skypetestuser]
username=skypetestuser ; use same as in brackets above
type=friend
context=default ; correct as needed by your setup
secret=siptosisregpassword
host=dynamic ; if not dynamic, you will need to set port also
nat=no
dtmfmode=auto
canreinvite=no ; possibly set to yes if you know what you are doing
qualify=yes ; optional
defaultip=siptosisip ; optional - fix the ip if used
incominglimit=1
outgoinglimit=1
call-limit=1
busylevel=1
Add to extensions.conf:
exten => _7.,1,Dial(SIP/skypetestuser/${EXTEN:1})
;you would then dial 7 and the number you want to call
For FreePBX and variants (PBXinaflash/trixbox/Elastix): Screen shots
Create a SIP trunk:
Maximum Channels: 1
Dial Rules: .
Trunk Name: skypetestuser
Peer Details:
username=skypetestuser
type=friend
secret=siptosisregpassword
context=from-trunk
host=dynamic ; if not dynamic, you will need to set port also
nat=no
dtmfmode=auto
canreinvite=no ;(possibly set to yes if you know what you are doing)
qualify=yes ; optional
incominglimit=1
outgoinglimit=1
call-limit=1
busylevel=1
Create an Outbound Route:
Dial Patterns: 7|.
Trunk Sequence:
0 SIP/skypetestuser - click Add
Submit, Apply configuration changes.
Dial 7 and anything else from an extension and it calls out via the trunk.
For incoming calls, you should create a catch all inbound route and/or ring group. See screen shots Screen shots for example.
Dialing Note: Normal Asterisk PBX's can strip the prefix in extensions.conf file like this:
exten => _7X.,1,Dial(SIP/skypetestuser/${EXTEN:1}) or exten => _901.,n,Dial(SIP/skypetestuser/${EXTEN:3}) If your PBX can't be configured this way, then you can work around the PBX limitation by adding entries to SkypeOutDialingRules.props like this: If your PBX dialing prefix is 7 you could add the following line: ^7([1-9][0-9]{10})$:+$1 The $1 will only capture what's in the parenthesis. In the example above, the 7 will be left out when making the SkypeOut call with 11 digit dialing. If 713051234567 was sent to the gateway, SipToSis would transform it to +13051234567. For other prefixes, change the 7 to the new prefix. Tip: make sure no other rules make the same match. Read up on regular expressions if you need to get more complicated. After you have tested your single channel test configuration completely you are ready to build the multi channel trunk. Scroll down to the Linux section or for Windows click here. |
Linux Skype Asterisk/FreePbx/PBX-in-a-flash/trixbox/Elastix Trunk with SipToSis and the latest stsTrunkBuilder.The generated scripts were tested on CentOS 5.2/5.3/5.4 and Ubuntu 9.04/10.04 using Xvfb (X Virtual Frame Buffer) to create X sessions. You can change it to use vnc and whatever X window manager you want (twm, ratpoison, etc.)
Initialize the stsTrunkBuilder
Create the Asterisk Skype Trunk Channel Configurations
Add your custom startup commands to stsControlBase if any
Prior to trunk builder 20100227 you will have to add a path to /sbin on CentOS so the script can find the lsmod command. gedit (or vi) stsControlBase export PATH=$PATH:/sbin
X Display methods:
Sound Device:
Generate the trunk scripts
Run the patch command (not needed if cloning) (20100402+ stsTrunkBuilder versions)
Add the Asterisk Skype trunk channel information to Asterisk
Create an Outbound Route:
Dial Patterns: 7|.
Trunk Sequence:
0 SIP/stsTrunk_01 - click Add
1 SIP/stsTrunk_02 - click Add
2 SIP/stsTrunk_03 - click Add
3 SIP/stsTrunk_04 - click Add
etc.
Submit, Apply configuration changes.
Change 7 above to your desired dialing prefix.
Configure the Skype instances for operation
Starting the Skype Asterisk trunk.
Stopping the Asterisk Skype trunk.
You can also take screenshots of the Xvfb window as a diagnostic aid like this: ./stsTrunk_Control snapscreen xx (Change xx to the specific 2 digit channel number)
Making it start automatically at boot
That's it. I hope you got it working, if not the SipToSis Skype Gateway Troubleshooting may offer some additional help. If you get stuck, leave a comment on the SipToSis Skype Gateway Forum and I will try to help you. I do not have the time to test every OS, Asterisk flavor or PBX. If you find an error/problem please post the correction to the Forum. |
Windows Skype Asterisk Trunking with SipToSis and the latest stsTrunkBuilder.It was tested on Windows XP Pro 32 bit and Vista 64 bit. Windows 2000 forward should work.
Initialize the stsTrunkBuilder
Build the Asterisk to Skype Trunk Configuration
Run the patch command (not needed if cloning) (20100408+ stsTrunkBuilder versions)
If using RunAs option (not recommended), create a windows account for each channel.
Add the configuration information to Asterisk
Starting it all up (Each channel is a different Skype Account)
Starting it all up (Each channel is the same Skype Account)
Shutting down the Skype to Asterisk trunk channels. (Not using Appicus)
Shutting down the Skype to Asterisk trunk channels. (With Appicus)
Automatic startup
|