How to connect Skype to 3CX - [Part 2]

Posted by Ahsan Tasneem | 10:21 AM | , , , , | 0 comments »

How the multichannel 3CX to Skype trunk works

First, you install Skype client on PC. Then you create some Windows users. Under each user you will
start individual Skype instance with its own Skype account. You must use different Windows users,
because of inability to start several Skype instances under the same Windows user.

After that you create several VoIP trunks in 3CX (equal to number of Skype accounts you plan to use).

But how to connect these trunks to Skype instances? For this purpose an addition to SipTheeSkype
was developed. It called
stsTrunkBuilder. This is a set of scripts and command files that installs
into the same folder where SipTheeSkype was placed. It uses data from
stsTrunkDef.cfg (you add
data to it) to generate the new set of command files (
bat) and configuration files (cfg) for each
SipTheeSkype trunk (channel).

Each of the generated
bat files start its own Skype instance under individual Windows user,
and its own SipTheeSkype, using
individual configuration file cfg for that trunk. So every
bat file start its own complete SipTheeSkype trunk. Note that every trunk use its own SIP
port for communications starting from port 5070 (5070, 5071, 5072 and so on).

You may create as many trunks as you want. This is limited only by your hardware capacity.
The author of SipTheeSkype has tested 20 trunks on standard P4 machine.

Creating multichannel trunk

1. Download and unzip
stsTrunkBuilder in the C:\ststrunkbuilder
2. Copy content of
C:\ststrunkbuilder (with subfolders) to the SipTheeSkype folder. In
Part 1 it was C:\siptheeskype. Copy content of C:\ststrunkbuilder\samples to C:\siptheeskype
also. Now we don't need
C:\ststrunkbuilder folder anymore.
3. Open in Notepad
C:\siptheeskype\stsTrunkDef.cfg file and change it as follows:

skypeUserList=first_Skype_account, second_Skype_account..., N_Skype_account - I
created these example accounts:
skype_3cx_trunk_1, skype_3cx_trunk_2, skype_3cx_trunk_3.

targetPlatform=windows - We are using stsTrunkBuilder on Windows platform

stsBaseConfigFile
=/siptheeskype/siptheeskype.cfg - Name of the folder were the main
SipTheeSkype configuration file,
siptheeskype.cfg, be found. We created it in Part1.

passwordSeed=makeupsomethinghere Do not change! Password(s) for SipTheeSkype trunks
that you creating (
Authentication Password in 3CX) will be generated automatically. Then
we simply will copy it to the Add VoIP provider wizard in 3CX.

trunkNameBase=stsTrunk_ Username mask (Authentication ID in 3CX) of the trunk. Then
we will simply copy them to the Add VoIP provider wizard in 3CX. You can change it, but you do
not have to. I have not changed it.

osUserBase=stsTrunk_ Windows username mask. You can change it, but you do not have to. I
have not changed it.
Important! If your do not change it, the users that you will create in Windows must have these names:
stsTrunk_01, stsTrunk_02...

Image

Save and close
stsTrunkDef.cfg

4. Create as many Windows users as Skype "lines" you plan to use.
Important! The usernames
for these users must be
exactly same as usernames generated in Step 3. Also important that
all users will have passwords (
no blank passwords!), or stsTrunkBuilderscripts will produce
errors.

5. Run
C:\siptheeskype\trunkConfig_win.bat file. A group of files for each trunk (each Skype
account you listed in
skypeUserList in step 3) will be created in the C:\siptheeskype folder. For
example for first trunk these files are:

stsTrunk_01_start.bat - trunk start

stsTrunk_01_stop.bat - trunk stop

stsTrunk_01.cfg - trunk settings (based on siptheeskype.cfg, we created in Part 1)

stsTrunk_01_log.properties - trunk logging settings.

Mainly we will use the
start and stop files.

6. Create required number of 3CX VoIP Providers as explained in
Part 1 Important! When
you are creating providers, use for
SIP Server port, Authentication ID and
Authentication Password corresponding values from corresponding SipTheeSkype trunk
settings.
For example, to take these values for
third 3CX trunk (VoIP provider), open in Notepad
stsTrunk_03.cfg
file and search for strings host_port, username and passwd. Copy and paste
these values into the 3CX Add VoIP Provider Wizard.

Image

7. Using generated
start command files (stsTrunk_01_start.bat, stsTrunk_02_start.bat...) start SipTheeSkype trunks in turn.
The startup process will ask for user password for respective user and start SipTheeSkype and Skype
under that user's profile. The script will save user password in the user profile so you will not need
to enter it next time.
For each Skype instance allow access for
java.exe ans set Speed Dial Numbers as described in Part 1.



8. To start all the trunks simultaneously use stsTrunkStartAll_win.bat. To stop the trunks use
corresponding files with
stop string.

Using multichannel trunk

The multichannel trunk we created working as "hunt group". The inbound calls from Skype network
goes to the first (
main) Skype account.
If this account is "busy", the SipTheeSkype software will switchover this call to next Skype account
until it found the "free" account. If there are no more free accounts, the Skype network caller will
receive "busy" tone.



From 3CX (SIP) side the system works also as "hunt group" but the switchover made by 3CX Outbound
rules. The Outbound rule tries to take the first Skype trunk (
Route 1). If it is "busy", it will try to take
the second trunk (
Route 2) and so on.

Therefore if you have
no more than three trunks, you have to configure only the first Outbound
rule (for first 3CX - Skype trunk). Thats all.

Image

If your have
more than three trunks, I would recommend to configure routes in Outbound rules
as follows:

    First rule - Routes 1,2,3 Second fule - Routes 2,3,4 Third rule - Routes 3,4,5
...and so on.

Image

Conclusion

To start all your trunks automatically after the server startup, simply create New task in Windows
Scheduler that run
stsTrunkStartAll_win.bat file at computer startup. Screenshot for Russian
Windows, but you understood me.

Image

Also you can add the Call Me! button with you first (main) Skype account to your Website.
http://www.skype.com/intl/en/share/buttons/

Now you can install Skype at your client's PCs, at your smartphones, at any other Skype enabled
gadgets and receive and place calls to them!







 

Related Articles

How to connect Skype to 3CX [Part 1]

Configuring Sip to Skype gateway - 3CX Gateway for Skype [Part 1]

Configuring Sip to Skype gateway - 3CX Gateway for Skype [Part 2]

 

 


0 comments

Related Posts Plugin for WordPress, Blogger...