Reading the repo
Opening the box…
Reading the repo
Opening the box…
How to install on macOS
Kamailio - The Open Source SIP Server for large VoIP and real-time communication platforms, focusing on flexibility, security and scalability
Saved setup from 6 h ago
Will it work on macOS?
Also: In the browser ↗
INSTALL ==================================================
Kamailio SIP Server Installation Notes
https://www.kamailio.org
==================================================
Welcome! This is an amazingly flexible, robust and secure SIP server built on years of experience in several Open Source projects. It's a merge of the SIP Express Router (SER) and the Kamailio (OpenSER) products produced by a joint development team.
This memo gives you hints on how to set up the Kamailio quickly.
You can find a similar tutorial and many more on project's web site: - https://www.kamailio.org/w/documentation/ - https://www.kamailio.org/wikidocs/
Supported Architectures And Requirements
How-To Build Kamailio From The Source Code Distribution 2.1 Kamailio Fast Track Installation 2.2 Details Installing From Source Code A) Build Commands
Quick-Start Installation Guide A) Getting Help B) Disclaimers C) Quick Start D) Kamailio With Persistent Data Storage
Troubleshooting
Supported Architectures And Requirements
Supported operating systems:
Note that some modules have dependencies on the Linux operating system. This is clearly noted in the README files.
Partially supported
Supported architectures
Experimental architectures:
(for other architectures the Makefiles might need to be edited)
There are various configuration options defined in the Makefile.
Requirements:
Some modules have other requirements on third-party libraries. This is documented in the README for the specific module.
OS Notes:
FreeBSD/OpenBSD/NetBSD: make sure gmake, bison or yacc & flex are installed.
If you want to compile all the modules, you will need the following packages:
Compile example (all the modules and SIP server core in a tar.gz): gmake bin radiusclient_ng=4 include_modules="mysql jabber cpl-c auth_radius group_radius uri_radius postgres pa"
Compile example (all the modules and SIP server core in a tar.gz): gmake bin include_modules="mysql jabber cpl-c auth_radius group_radius uri_radius pa"
Compile example (all the modules and SIP server in a tar.gz): gmake bin include_modules="mysql jabber cpl-c auth_radius group_radius uri_radius pa"
As above; you can use Solaris' yacc instead of bison. You might also need gtar and ginstall. If you don't have ginstall you can use Solaris install, just make sure it's in the PATH (it's usually in /usr/sbin) and add INSTALL=install either to the environment or to the make command line (e.g.: gmake INSTALL=install all).
Compile example (all the modules and SIP server in a tar.gz): gmake bin INSTALL=install include_modules="mysql jabber cpl-c auth_radius group_radius uri_radius postgres pa"
Kamailio is part of the official Debian distribution. You can download binary modules directly using normal packet management.
Needed packages for compiling all the modules:
make sure make, bison, flex, minires and minires-devel (needed for the resolver functions) are installed.
Only building Kamailio's core and some static modules is supported for now. Stuff known not to work: - IPv6 (cygwin doesn't support it yet) - TCP (the tcp code heavily depends on file descriptor passing between processes, which is not yet supported by cygwin) - dynamic modules (non statically linked -- not supported because backlinking doesn't work in windows by design)
Compile example (all the modules and Kamailio in a tar.gz): make bin include_modules="mysql jabber cpl-c auth_radius group_radius uri_radius postgres pa"
(NOTE: if make doesn't work try gmake instead)
2.1 Kamailio Fast Track Installation ....................................
If you are familiar with Unix/Linux build tools aready and you installed the required dependencies, then you can just follow this section, otherwise skip over it.
To get Kamailio installed, in the folder with source code run:
make cfg make all make install
If you want to install with additional modules, for example with mysql and tls, run:
make include_modules="db_mysql tls" cfg make all make install
2.2 Details - Installing From Source Code .........................................
Build Commands
Kamailio is split in four main parts: The core, the modules, the utilities, and the various scripts/examples. When you build, you can decide to build only the core, the modules, both, or all.
Compile modules except some explicitly excepted (see below) make modules - all modules in the modules/ directory make modules-all or make every-module - all the modules
Compile all: make all
Explicitly excepted modules: By default make all will not build modules that require external libraries or that are considered to be "experimental". For example, modules that have external dependencies are: db_mysql, jabber, cpl-c, auth_radius, group_radius, uri_radius, avp_radius, db_postgres, carrierroute, ...
Including groups of modules: Instead of compiling the default modules only, you can specify groups of modules to include, according to their status:
standard - Modules in this group are considered a standard part of Kamailio (due to widespread usage) but they have no dependencies (note that some of these interplay with external systems. However, they don't have compile or link dependencies).
db - Modules in this group use databases and need a database driver to run. Included are drivers for the text mode db (dbtext) and for dumping large amount of data to files (db_flatstore). See also the mysql, postgres, or sqlite groups.
standard_dep - Modules in this group are considered a standard part of Kamailio (due to widespread usage) but they have dependencies that must be satisfied for compilation. NOTE! All presence modules (dialog, pa, presence_b2b, rls, xcap) have been included in this group due to interdependencies
stable - Modules in this group satisfy specific or niche applications, and are considered stable for production use. They may or may not have dependencies
experimental - Modules in this group are either not complete, untested, or without enough reports of usage to allow the module into the stable group. They may or may not have dependencies.
There is another set of groups mainly used by Kamailio, where modules are grouped based on Debian packaging rules. For example:
kstandard - Kamailio standard modules
kpresence - Kamailio SIMPLE presence server modules
To compile core with standard modules: make group_include="standard" all
To compile all modules (provided you have all the required libraries installed) use: make group_include="standard standard-dep stable experimental" all
There are also in addition some "convenience" groups:
mysql - Include all the db modules dependent and the MySQL db driver postgres - Include all the db modules and the PostgreSQL db driver sqlite - Include all the db modules and the SQLite db driver radius - Include all modules on radiusclient presence - Include all the presence modules
Ex. to make a standard installation with MySQL, use: make group_include="standard mysql" all
In addition to group_include (or instead), you can use include_modules="modA modB" to specify exactly the modules you want to include, ex. make include_modules="mymodule" modules
You can also explicitly skip modules using skip_modules. Let's say you want all the standard and standard-dep modules except domain: make group_include="standard standard-dep" skip_modules="domain" all
NOTE!!! As this mechanism is very powerful, you may be uncertain which modules that will be included. Just replace all (or modules) with print-modules and you will see which modules will be included and excluded, ex: make print-modules will show which modules are excluded by default.
If you want to install or to build a binary package (a tar.gz with Kamailio core and the modules), substitute "all" in the above command with "install" or "bin".
More compile examples:
Example: make cfg include_modules=mysql mode=debug
All future make invocations will include the mysql module and will build in debug mode
Note: If config.mak doesn't exist (e.g. initial checkout or after a make proper) or if Makefile.defs was changed, the config will be re-generated automatically by the first make command. For example: make cfg include_modules=db_mysql; make all is equivalent to rm config.mak modules.lst; make include_modules=db_mysql.
Example: make cfg-defs CPU=ultrasparc CC_EXTRA_OPTS=-Os PROFILE=-pg
make modules-cfg
or make modules-list saves the module list, without regenerating the build config Example: make modules-list include_modules="tls" skip_modules="print"
Config clean:
Reduced clean:
Make tags: make TAGS
Create a tar.gz with the sources (in ../): make tar
Create a tar.gz with the binary distribution (in ../): make bin
Create a gzipped solaris package (in ../): make sunpkg
Create debian packages (in ../): make deb
or dpkg-buildpackage
Regenerate the README for all the "default" modules (include_modules, skip_modules a.s.o can be used to alter the module list). make README
Generates a manpage for all the modules that support it (.xml file in the module directory). make man
Generates README file for modules/foo. make modules=modules/foo modules-readme
make prefix=/usr/local install
Note: If you use prefix parameter in make install then you also need to use this parameter in previous make commands, i.e. make, make modules, or make all. If you fail to do this then Kamailio will look for the default configuration file in a wrong directory, because the directory of the default configuration file is hardcoded into Kamailio during compile time. When you use a different prefix parameter when installing then the directory hard coded in Kamailio and the directory in which the file will be installed by make install will not match. (You can specify exact location of the configuration file using -f parameter of Kamailio).
For example, if you do the following: make all make prefix=/ install
Then the installation will put the default configuration file into /etc/kamailio/kamailio.cfg (because prefix is /), but Kamailio will look for the file in /usr/local/etc/kamailio/kamailio.cfg (because there was no prefix parameter make all and /usr/local is the default value of prefix).
The workaround is trivial, use the same parameters in all make commands: make prefix=/ all make prefix=/ install or save the desired prefix in the make config (e.g.: make cfg prefix=/).
That applies to other make parameters as well (for example parameters "modules" or "excluded_modules").
A) Getting Help
This guide gives you instructions on how to set up the Kamailio on your box quickly. In case the default configuration does not fly, please check the documentation at the Kamailio web site https://www.kamailio.org to learn how to configure Kamailio for your site.
If the documentation does not resolve your problem you may try contacting our user forum by E-mail at sr-users@lists.kamailio.org -- that is the mailing list of the Kamailio community. To participate in the mailing list, please subscribe at the following web address:
https://lists.kamailio.org/
B) Disclaimers
Note well the default "quick-start" configuration is very simple in order to be easily installable. It provides minimum features.
Then run bash setup.sh. It stops at the first error and is safe to run again. Servers and tests aren't started; it lists them at the end. Read it first.
Needs Git: xcode-select --install. The repo uses git submodules, so the clone fetches them too.
git clone --recurse-submodules https://github.com/kamailio/kamailio.git cd kamailio
C/C++ compiler, CMake 3.13
xcode-select --install brew install cmake
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release cmake --build build
Step by step tutorials to install Kamailio from source code are available at:
Please read the INSTALL file from the source code for more information.
Repositories for Linux packages:
No reports for macOS yet.
GitManual AI Agent reads the 13 key files and writes a step-by-step guide for macOS. Once written, it's saved for everyone.