Compiling and Installing Yate on Windows

From Yate Documentation
(Difference between revisions)
Jump to: navigation, search
(Installing Yate using the setup)
 
(27 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
There are two ways to install Yate under Windows:
 
There are two ways to install Yate under Windows:
 
 
 
 
* Download and install Yate from [http://yate.null.ro/pmwiki/index.php?n=Main.Download download] page.
+
* Download and install Yate from [http://yate.null.ro/pmwiki/index.php?n=Main.Download download] page following the setup.
* The other option is to download Yate from SVN and to compile by yourself
+
* The other option is to download Yate from SVN and to compile it.
  
=== Installing Yate using executable file===
+
=== Installing Yate using the setup===
  
* Download and install Yate from [http://yate.null.ro/pmwiki/index.php?n=Main.Download download] page.  
+
* Download and install Yate from http://voip.null.ro/tarballs/yate5/yate-5.0.0-1-setup.exe
 
* Install Yate by following the setup.
 
* Install Yate by following the setup.
 +
 +
If you let Yate install in full mode, meaning all packages included, you will have in start menu the following shortcuts:
 +
 +
* Developer docs - API documentation
 +
* Register service - adds a new service to Windows Services
 +
* Uninstall - uninstall Yate
 +
* Unregister Service - remove the service from Windows Services
 +
* Yate client(Qt) - launch the [http://yateclient.yate.ro/ Yate client]
 +
* Yate Cosole - launch the Yate server
 +
* Yate Web Site
  
 
===Installing Yate from SVN===
 
===Installing Yate from SVN===
Line 15: Line 25:
  
 
* [http://tortoisesvn.tigris.org TortoiseSVN]
 
* [http://tortoisesvn.tigris.org TortoiseSVN]
* Visual Studio 2005
+
* at least Visual Studio 2005
  
 
====Compiling Yate on Windows====
 
====Compiling Yate on Windows====
  
 
To compile please build the "YATE" project - it will build the library and all modules without external dependencies.
 
To compile please build the "YATE" project - it will build the library and all modules without external dependencies.
After taking Yate from SVN ( the URL to use is: http://voip.null.ro/svn/yate/trunk), go to windows\ folder from your "Yate" project where you will find YATE.sln that you have to build in your Visual Studio environment.
+
After taking Yate from SVN ( the URL to use is: http://voip.null.ro/svn/yate/trunk), go to windows\ folder from your "Yate" project where you will find YATE.sln that you have to build in your Visual Studio environment. Select the build type as "Release" or "Debug" in the Build toolbar and build Yate.
  
 
The "Extra" project holds modules that have external dependencies. You will not be able to build them without installing extra headers and libraries in your Visual Studio environment:
 
The "Extra" project holds modules that have external dependencies. You will not be able to build them without installing extra headers and libraries in your Visual Studio environment:
Line 41: Line 51:
 
===Run Yate as service on Windows===
 
===Run Yate as service on Windows===
  
If you are using Windows 2000,2003,XP then Yate will install a service.
 
 
'''NOTE:''' Yate can run as service on Windows as you can see in the screenshot below.
 
'''NOTE:''' Yate can run as service on Windows as you can see in the screenshot below.
  
Line 48: Line 57:
 
===Sangoma card===
 
===Sangoma card===
  
* If you are using a Sangoma card don't forget to first install the motherboard drivers, then Sangoma drivers, and then Yate with Sangoma drivers support.  You can find a guide [http://yate.null.ro/sangoma/install_sangoma.html about how to install Sangoma on Windows] for Yate. Sangoma drivers can be downloaded from http://www.sangoma.com/windows/drivers/A101_A102_API_WANPIPE/.
+
If you are using a Sangoma card don't forget to first install the motherboard drivers, then Sangoma drivers, and then Yate with Sangoma drivers support.  You can find a guide [http://yate.null.ro/sangoma/install_sangoma.html about how to install Sangoma on Windows] for Yate. Sangoma drivers can be downloaded from http://www.sangoma.com/windows/drivers/A101_A102_API_WANPIPE/.
  
 
===Configure Yate===
 
===Configure Yate===
  
Yate can be configured by edit files from directory conf.d. More documentation about what those files should contain can be found [[modules]] page.  
+
Yate can be configured by edit files from directory conf.d. Each file has a .sample termination. You have to create a a new file with the same name but with .conf.<br>
To reload the configuration use YateGUI or remote connection to address 127.0.0.1 port 5038.
+
Each parameter in the files have a section that is in brackets. Comment in this files are done by using ''';'''.<br>
 +
More documentation about what those files should contain can be found [[modules]] page. <br>
 +
See more information about [[Starting_on_windows|how to start Yate on windows]].
 +
 
 +
====Adding Users====
 +
 
 +
You'll have to edit '''[[Regfile|regfile.conf]]''' to add users.<br>
 +
We are going to add 2 users:
 +
 
 +
[101]
 +
password=abcdef
 +
[102]
 +
password=ghijkl
 +
 
 +
This absolutely minimal configuration will allow SIP accounts 101 and 102 to register while authenticating with their respective passwords and allows anyone (including those two accounts) to reach the registered clients by number.
 +
 +
To add authentication requirement for all inbound calls add in the [[Regular expressions|regexroute.conf]] file:
 +
 +
[default]
 +
${username}^$=-;error=noauth
 +
 
 +
There is another way of adding users if you wish to use a database, the file to use is [[Register|register.conf]].
 +
 
 +
====SIP Configuration====
 +
 
 +
The file that is used is [[SIP Configuration File|ysipchan.conf]]. No configuration is needed in this file because by default Yate will bind with all the network interfaces on your server on port 5060. If other programs use this port then you have to to use another free port and put it in [general] section.
 +
 
 +
====Routing====
 +
 
 +
There is no need to define any routing for registered SIP users on the machine. Yate will know to route calls between the users defined in regfile.conf.
 +
 
 +
To define routing to other registered users, PSTN, gateways you need to edit [[Regular expressions|regexroute.conf]]. <br>
 +
To register users in a database you can use [[Register|register.conf]]. And then make your route rules in [[Regular expressions|regexroute.conf]].<br>
 +
Here you can read more about [[routing]].
 +
 
 +
====Configure phones and test the setup====
 +
 
 +
You have to configure the users from regfile on two SIP phone (you could use a SIP softphone as well) to call Yate Server.
 +
 
 +
If Yate was running when you written in configuration file [[Stopping and restarting Yate|reload Yate]] so that the changes will take place.
 +
 
 +
Make a call from one phone to the other and check the audio, if you can here the other end then you may have a NAT problem.
 +
 
 +
More scenarios on how to configure Yate see in [[How To's]] section.
 +
 
  
 
'''See also'''
 
'''See also'''
  
*[[Telephony]]
+
* [[Telephony]]
 +
* [[How To's]]
 +
 
 +
[[Category:Install]] [[Category:Windows]]

Latest revision as of 16:56, 8 January 2014

There are two ways to install Yate under Windows:

  • Download and install Yate from download page following the setup.
  • The other option is to download Yate from SVN and to compile it.

Contents

[edit] Installing Yate using the setup

If you let Yate install in full mode, meaning all packages included, you will have in start menu the following shortcuts:

  • Developer docs - API documentation
  • Register service - adds a new service to Windows Services
  • Uninstall - uninstall Yate
  • Unregister Service - remove the service from Windows Services
  • Yate client(Qt) - launch the Yate client
  • Yate Cosole - launch the Yate server
  • Yate Web Site

[edit] Installing Yate from SVN

[edit] Requirements

[edit] Compiling Yate on Windows

To compile please build the "YATE" project - it will build the library and all modules without external dependencies. After taking Yate from SVN ( the URL to use is: http://voip.null.ro/svn/yate/trunk), go to windows\ folder from your "Yate" project where you will find YATE.sln that you have to build in your Visual Studio environment. Select the build type as "Release" or "Debug" in the Build toolbar and build Yate.

The "Extra" project holds modules that have external dependencies. You will not be able to build them without installing extra headers and libraries in your Visual Studio environment:

  • h323chan needs PWLib and OpenH323, you can find more about it in page Installing OpenH323 under Windows;
  • gsmcodec needs a GSM 06.10 static library;
  • Qt4Client needs Qt® and its tools (MOC);
  • mysqldb needs MySQL client headers and libraries;
  • pgsqldb needs PostgreSQL client headers and libraries.

[edit] Problems

If you build Yate from sources and Visual Studio crashes or hangs beyond cancellation please clean the build and repeat from scratch. Already compiled object files may be good or may be damaged - just stay on the safe side.

NOTE: Compilation may fail because of WinDNS.h included from engine/Resolver.cpp - in this case you have two options:

  • Install a newer WinDNS.h - for example one from Platform SDK 2008 - NAPTR records will be resolved on any Windows version that provides windns.dll
  • Remove the define HAVE_DNS_NAPTR_DATA from the Libyate project - in this case NAPTR can be resolved only on older versions of Windows and only if they provide windns.dll

Please see the notes at the top of engine/Resolver.cpp for more details.

[edit] Run Yate as service on Windows

NOTE: Yate can run as service on Windows as you can see in the screenshot below.

Yate windows service.png

[edit] Sangoma card

If you are using a Sangoma card don't forget to first install the motherboard drivers, then Sangoma drivers, and then Yate with Sangoma drivers support. You can find a guide about how to install Sangoma on Windows for Yate. Sangoma drivers can be downloaded from http://www.sangoma.com/windows/drivers/A101_A102_API_WANPIPE/.

[edit] Configure Yate

Yate can be configured by edit files from directory conf.d. Each file has a .sample termination. You have to create a a new file with the same name but with .conf.
Each parameter in the files have a section that is in brackets. Comment in this files are done by using ;.
More documentation about what those files should contain can be found modules page.
See more information about how to start Yate on windows.

[edit] Adding Users

You'll have to edit regfile.conf to add users.
We are going to add 2 users:

[101]
password=abcdef
[102]
password=ghijkl

This absolutely minimal configuration will allow SIP accounts 101 and 102 to register while authenticating with their respective passwords and allows anyone (including those two accounts) to reach the registered clients by number.

To add authentication requirement for all inbound calls add in the regexroute.conf file:

[default]
${username}^$=-;error=noauth

There is another way of adding users if you wish to use a database, the file to use is register.conf.

[edit] SIP Configuration

The file that is used is ysipchan.conf. No configuration is needed in this file because by default Yate will bind with all the network interfaces on your server on port 5060. If other programs use this port then you have to to use another free port and put it in [general] section.

[edit] Routing

There is no need to define any routing for registered SIP users on the machine. Yate will know to route calls between the users defined in regfile.conf.

To define routing to other registered users, PSTN, gateways you need to edit regexroute.conf.
To register users in a database you can use register.conf. And then make your route rules in regexroute.conf.
Here you can read more about routing.

[edit] Configure phones and test the setup

You have to configure the users from regfile on two SIP phone (you could use a SIP softphone as well) to call Yate Server.

If Yate was running when you written in configuration file reload Yate so that the changes will take place.

Make a call from one phone to the other and check the audio, if you can here the other end then you may have a NAT problem.

More scenarios on how to configure Yate see in How To's section.


See also

Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers