|
@@ -9,54 +9,51 @@ If you have a question suitable for FAQ and you don't know the answer,
|
|
|
add it and set the answer to 'TBA', others can read it and give the
|
|
|
right answer.
|
|
|
|
|
|
-\~\~QNA\~\~
|
|
|
|
|
|
-###### ?
|
|
|
+## General
|
|
|
|
|
|
-General =====
|
|
|
+### What is Kamailio?
|
|
|
|
|
|
-??? What is Kamailio?
|
|
|
-
|
|
|
-!!! Kamailio is a SIP server, implementing the specifications from
|
|
|
+:page_with_curl: Kamailio is a SIP server, implementing the specifications from
|
|
|
RFC3261. Its root functionality is routing any kind of SIP packets. On
|
|
|
top of that, many conceptual features are implemented, see more at:
|
|
|
|
|
|
- [Kamailio Features](http://www.kamailio.org/w/features/)
|
|
|
|
|
|
-??? Is Kamailio a B2BUA?
|
|
|
+### Is Kamailio a B2BUA?
|
|
|
|
|
|
-!!! No, Kamailio is a flexible SIP proxy. Many people integrate
|
|
|
+:page_with_curl: No, Kamailio is a flexible SIP proxy. Many people integrate
|
|
|
Asterisk, FreeSWITCH, SEMS, or other products with Kamailio for a B2BUA.
|
|
|
|
|
|
* [[http://ftp.iptel.org/pub/sems/doc/current/ModuleDoc_sbc.html|SEMS B2BUA]]
|
|
|
|
|
|
-??? Can Kamailio be used as SIP redirect server?
|
|
|
+### Can Kamailio be used as SIP redirect server?
|
|
|
|
|
|
-!!! Yes.
|
|
|
+:page_with_curl: Yes.
|
|
|
|
|
|
-??? Can Kamailio be used as SIP registrar and location server?
|
|
|
+### Can Kamailio be used as SIP registrar and location server?
|
|
|
|
|
|
-!!! Yes.
|
|
|
+:page_with_curl: Yes.
|
|
|
|
|
|
-??? Can Kamailio be used as SIP proxy server?
|
|
|
+### Can Kamailio be used as SIP proxy server?
|
|
|
|
|
|
-!!! Yes.
|
|
|
+:page_with_curl: Yes.
|
|
|
|
|
|
-??? Can Kamailio be used as SIP load balancer server?
|
|
|
+### Can Kamailio be used as SIP load balancer server?
|
|
|
|
|
|
-!!! Yes.
|
|
|
+:page_with_curl: Yes.
|
|
|
|
|
|
-??? Can I load balance Asterisk or FreeSwitch with Kamailio?
|
|
|
+### Can I load balance Asterisk or FreeSwitch with Kamailio?
|
|
|
|
|
|
-!!! Yes.
|
|
|
+:page_with_curl: Yes.
|
|
|
|
|
|
-??? Can Kamailio be used as SIP least cost routing server?
|
|
|
+### Can Kamailio be used as SIP least cost routing server?
|
|
|
|
|
|
-!!! Yes.
|
|
|
+:page_with_curl: Yes.
|
|
|
|
|
|
-??? Is it possible to reload Kamailio configuration file?
|
|
|
+### Is it possible to reload Kamailio configuration file?
|
|
|
|
|
|
-!!! If you use native scripting language, you must restart after you
|
|
|
+:page_with_curl: If you use native scripting language, you must restart after you
|
|
|
update the configuration file.
|
|
|
|
|
|
But note that many global parameters can be changed via RPC/MI commands
|
|
@@ -70,9 +67,9 @@ restarting Kamailio by issuing an RPC command (see KEMI interpreter
|
|
|
modules documentation for more details: app_lua, app_python,
|
|
|
app_python3, app_jsdt, app_ruby, app_sqlang).
|
|
|
|
|
|
-??? What is the license of Kamailio?
|
|
|
+### What is the license of Kamailio?
|
|
|
|
|
|
-!!! Kamailio is an open source application licensed under GNU Public
|
|
|
+:page_with_curl: Kamailio is an open source application licensed under GNU Public
|
|
|
License version 2 (aka GPLv2). It can be used for free "as in beer" on
|
|
|
your infrastructure. Keep in mind that you need also distribute the
|
|
|
source code of your changes, if you distribute it as a binary to your
|
|
@@ -84,20 +81,18 @@ done under BSD license. That means parts of it can be extracted and used
|
|
|
under BSD license terms. But over all, when used as one application, the
|
|
|
use must follow the terms of GPLv2, because GPLv2 is viral.
|
|
|
|
|
|
-??? Can it be installed on Windows?
|
|
|
+### Can it be installed on Windows?
|
|
|
|
|
|
-!!! No. There is no official development pushed in this direction,
|
|
|
+:page_with_curl: No. There is no official development pushed in this direction,
|
|
|
Linux/Unix being the de facto for running servers. But it might not be
|
|
|
big effort to make it compile using the Linux-like environments for
|
|
|
Windows (such as cygwin).
|
|
|
|
|
|
-###### ?
|
|
|
-
|
|
|
-Transport Layers =====
|
|
|
+## Transport Layers
|
|
|
|
|
|
-??? What transport layer protocols are implemented in Kamailio?
|
|
|
+### What transport layer protocols are implemented in Kamailio?
|
|
|
|
|
|
-!!! At network layer, Kamailio supports both IPv4 and IPv6.
|
|
|
+:page_with_curl: At network layer, Kamailio supports both IPv4 and IPv6.
|
|
|
|
|
|
At transport layer, Kamailio support UDP, TCP, TLS and SCTP.
|
|
|
Transmission can be done in asynchronous mode (configuration option),
|
|
@@ -111,21 +106,21 @@ Starting with version 4.0.0, Kamailio supports WebSocket transport
|
|
|
protocol, allowing modern web browsers to call between them directly
|
|
|
through Kamailio.
|
|
|
|
|
|
-??? Does Kamailio have support for WebSockets?
|
|
|
+### Does Kamailio have support for WebSockets?
|
|
|
|
|
|
-!!! Yes, starting with version 4.0.0. It supports WebSockets over TCP
|
|
|
+:page_with_curl: Yes, starting with version 4.0.0. It supports WebSockets over TCP
|
|
|
(WS) and over TLS (WSS), on both IPv4 and IPv6.
|
|
|
|
|
|
-??? Can Kamailio do gatewaying between transport layers?
|
|
|
+### Can Kamailio do gatewaying between transport layers?
|
|
|
|
|
|
-!!! Yes. You can use Kamailio to receive SIP message on one transport
|
|
|
+:page_with_curl: Yes. You can use Kamailio to receive SIP message on one transport
|
|
|
and send out on a different transport. For example, receive TLS on IPv6
|
|
|
and send out UDP on IPv4.
|
|
|
|
|
|
-??? Can Kamailio be used to call from web browsers (webrtc) to classic
|
|
|
+### Can Kamailio be used to call from web browsers (webrtc) to classic
|
|
|
SIP phones?
|
|
|
|
|
|
-!!! Yes, from signaling point of view. Remember that Kamailio is SIP
|
|
|
+:page_with_curl: Yes, from signaling point of view. Remember that Kamailio is SIP
|
|
|
packet router, not handling media plane at all. Simply, Kamailio can do
|
|
|
gatewaying from WebSocket to UDP, TCP, TLS or SCTP for all SIP messages.
|
|
|
|
|
@@ -133,19 +128,17 @@ However, note that media plane (RTP streams) requires special secure
|
|
|
encoding of the RTP packets, which may not be supported by the old SIP
|
|
|
phones.
|
|
|
|
|
|
-###### ?
|
|
|
+###### Modules
|
|
|
|
|
|
-Modules =====
|
|
|
+### What is a Kamailio module?
|
|
|
|
|
|
-??? What is a Kamailio module?
|
|
|
-
|
|
|
-!!! A module is an extension that compiles in a separate object file and
|
|
|
+:page_with_curl: A module is an extension that compiles in a separate object file and
|
|
|
can be loaded at Kamailio startup. Usually a module exports new
|
|
|
functions that can be used in configuration file routing blocks.
|
|
|
|
|
|
-??? Where are Kamailio modules located?
|
|
|
+### Where are Kamailio modules located?
|
|
|
|
|
|
-!!! Inside the source tree, there are three directories:
|
|
|
+:page_with_curl: Inside the source tree, there are three directories:
|
|
|
|
|
|
- modules/
|
|
|
- modules_k/ - no longer used since version 4.0.0
|
|
@@ -156,36 +149,35 @@ modules that are bundled in Kamailio packages is available at:
|
|
|
|
|
|
- <http://kamailio.org/docs/modules/stable/>
|
|
|
|
|
|
-??? Which modules are compiled by default?
|
|
|
+### Which modules are compiled by default?
|
|
|
|
|
|
-!!! The modules that have the same dependencies as the core of Kamailio.
|
|
|
+:page_with_curl: The modules that have the same dependencies as the core of Kamailio.
|
|
|
Those that are not compiled by default are kept in the variable
|
|
|
'exclude_modules' of Makefile. To print the list of excluded modules:
|
|
|
|
|
|
make printvar v=exclude_modules
|
|
|
|
|
|
-??? How can I compile and install a module that is excluded by default?
|
|
|
+### How can I compile and install a module that is excluded by default?
|
|
|
|
|
|
-!!! Add it to the variable 'include_modules' to the command 'make cfg'.
|
|
|
+:page_with_curl: Add it to the variable 'include_modules' to the command 'make cfg'.
|
|
|
For example, compiling and installing the modules app_lua and db_mysql:
|
|
|
|
|
|
make FLAVOUR=kamailio include_modules="app_lua db_mysql" cfg
|
|
|
make all
|
|
|
make install
|
|
|
|
|
|
-??? I use 'make all', but I can't get the db_mysql.so. How can I get
|
|
|
-this?
|
|
|
+### I use 'make all', but I can't get the db_mysql.so. How can I get this?
|
|
|
|
|
|
-!!! The module is not compiled by default, because depends on
|
|
|
+:page_with_curl: The module is not compiled by default, because depends on
|
|
|
libmysqlclient. Use following commands to get in compiled and installed:
|
|
|
|
|
|
make modules include_modules="db_mysql"
|
|
|
|
|
|
make install include_modules="db_mysql"
|
|
|
|
|
|
-??? How to compile only one module?
|
|
|
+### How to compile only one module?
|
|
|
|
|
|
-!!! First be sure that the core compiles fine with the command:
|
|
|
+:page_with_curl: First be sure that the core compiles fine with the command:
|
|
|
|
|
|
make
|
|
|
|
|
@@ -198,13 +190,11 @@ for example, compiling only tls module:
|
|
|
|
|
|
make modules modules=modules/tls
|
|
|
|
|
|
-###### ?
|
|
|
-
|
|
|
-SIP Message Processing =====
|
|
|
+## SIP Message Processing
|
|
|
|
|
|
-??? Why changes made to headers or body are not visible immediately?
|
|
|
+### Why changes made to headers or body are not visible immediately?
|
|
|
|
|
|
-!!! Kamailio is working always with the received SIP message (request or
|
|
|
+:page_with_curl: Kamailio is working always with the received SIP message (request or
|
|
|
reply). Changes done to headers or body are kept as a list of operations
|
|
|
to be applied before writing to the network. If you want changes to be
|
|
|
applied immediately, use **msg_apply_changes()** from textopsx module:
|
|
@@ -245,9 +235,9 @@ if(is_present_hf("X-Hdr")) {
|
|
|
}
|
|
|
```
|
|
|
|
|
|
-??? Why parts of From/To header appear many times?
|
|
|
+### Why parts of From/To header appear many times?
|
|
|
|
|
|
-!!! After doing header management operations, it can result that parts
|
|
|
+:page_with_curl: After doing header management operations, it can result that parts
|
|
|
of From/To header are duplicated or the result is the concatenation of
|
|
|
many values. That is related to previous question, because the changes
|
|
|
are not applied immediately and updates to parts of headers are not a
|
|
@@ -291,9 +281,9 @@ The examples above were with assignments to $fU (can be other vars as
|
|
|
well, such as $fu, $tU, $tu, ..), but it is the same behaviour when
|
|
|
using functions such as uac_replace_from() or uac_replace_to().
|
|
|
|
|
|
-??? Why body or other parts of the SIP message appear multiple times?
|
|
|
+### Why body or other parts of the SIP message appear multiple times?
|
|
|
|
|
|
-!!! It is practically the same reason as for multiple From/To parts.
|
|
|
+:page_with_curl: It is practically the same reason as for multiple From/To parts.
|
|
|
|
|
|
The configuration file does an operation that changes parts in the
|
|
|
headers or body many times. For example, if the body has two
|
|
@@ -306,10 +296,9 @@ between, otherwise refactor the config to perform the operation only
|
|
|
once (e.g., the RTP relaying functions should be used in a branch_route
|
|
|
block).
|
|
|
|
|
|
-??? How to set different header values for each destination of a SIP
|
|
|
-request?
|
|
|
+### How to set different header values for each destination of a SIP request?
|
|
|
|
|
|
-!!! Set the value of the header inside a **branch_route**.
|
|
|
+:page_with_curl: Set the value of the header inside a **branch_route**.
|
|
|
|
|
|
All the operations done over a SIP message inside the **request_route**
|
|
|
(including from the sub-routes executed from request_route) will be
|
|
@@ -372,10 +361,9 @@ Results in From header having the URI:
|
|
|
branch_route to do the operations if you need different From header for
|
|
|
outgoing branches.
|
|
|
|
|
|
-??? How to remove a single header field when a header appears multiple
|
|
|
-times?
|
|
|
+### How to remove a single header field when a header appears multiple times?
|
|
|
|
|
|
-!!! SIP allows that certain header fields may appear multiple times in a
|
|
|
+:page_with_curl: SIP allows that certain header fields may appear multiple times in a
|
|
|
SIP message. This header fields (e.g. Via, Route, Record-Route, Contact)
|
|
|
may be written either on a single line (with comma separated) or on
|
|
|
multiple lines (see [RFC 3261 section
|
|
@@ -415,10 +403,9 @@ Remove the last header (\<<sip:3.3.3.3:22506;lr;transport=udp>\>):
|
|
|
#or in above case:
|
|
|
remove_hf_value("Record-Route[3]");
|
|
|
|
|
|
-??? Why the SIP requests are replied with "483 Too Many Hops" or "513
|
|
|
-Message Too Large"?
|
|
|
+### Why the SIP requests are replied with "483 Too Many Hops" or "513 Message Too Large"?
|
|
|
|
|
|
-!!! In both cases, the reason is probably an error in request routing
|
|
|
+:page_with_curl: In both cases, the reason is probably an error in request routing
|
|
|
script which caused an infinite loop.
|
|
|
|
|
|
You can easily verify whether this happens by watching SIP traffic on
|
|
@@ -445,9 +432,9 @@ kamailio.cfg:
|
|
|
where domainname has to be replaced with name of domain, which you wish
|
|
|
to serve by Kamailio and which appears in request-URIs.
|
|
|
|
|
|
-??? I send SIP requests to Kamailio, but nothing happens, why?
|
|
|
+### I send SIP requests to Kamailio, but nothing happens, why?
|
|
|
|
|
|
-!!! Check if you have a firewall rule dropping traffic on SIP port
|
|
|
+:page_with_curl: Check if you have a firewall rule dropping traffic on SIP port
|
|
|
(5060). Note that network sniffing tools have hooks in kernel before the
|
|
|
firewall, so even if you see the SIP packets with ngrep or wireshark,
|
|
|
they may be dropped by the firewall.
|
|
@@ -460,61 +447,53 @@ file, restart kamailio and watch syslog messages to see if there is any
|
|
|
text printed by kamailio. For each SIP packet received on the networks,
|
|
|
Kamailio is printing at least few debug messages.
|
|
|
|
|
|
-###### ?
|
|
|
+## Media Streams
|
|
|
|
|
|
-Media Streams =====
|
|
|
+### Does Kamailio relay media streams?
|
|
|
|
|
|
-??? Does Kamailio relay media streams?
|
|
|
-
|
|
|
-!!! No, *however* Kamailio can be configured to proxy media if needed.
|
|
|
+:page_with_curl: No, *however* Kamailio can be configured to proxy media if needed.
|
|
|
|
|
|
- [See rtpengine, rtpproxy, lrkproxy, or
|
|
|
mediaproxy](http://www.kamailio.org/docs/modules/stable/)
|
|
|
|
|
|
-??? What codecs are supported by Kamailio?
|
|
|
+### What codecs are supported by Kamailio?
|
|
|
|
|
|
-!!! **Kamailio supports all codecs** (*even codecs that haven't been
|
|
|
+:page_with_curl: **Kamailio supports all codecs** (*even codecs that haven't been
|
|
|
created yet*).
|
|
|
|
|
|
Since Kamailio is a SIP proxy, it does not handle the media streams.
|
|
|
Codecs are negotiated between the two endpoints.
|
|
|
|
|
|
-??? Can Kamailio be used for video calls?
|
|
|
+### Can Kamailio be used for video calls?
|
|
|
|
|
|
-!!! Yes, Kamailio can be used for video calls. The two SIP phones must
|
|
|
+:page_with_curl: Yes, Kamailio can be used for video calls. The two SIP phones must
|
|
|
support video codecs/calling.
|
|
|
|
|
|
-###### ?
|
|
|
-
|
|
|
-Getting Started =====
|
|
|
+## Getting Started
|
|
|
|
|
|
-??? What are the minimum knowledge requirements before starting with
|
|
|
-Kamailio?
|
|
|
+### What are the minimum knowledge requirements before starting with Kamailio?
|
|
|
|
|
|
-!!! To be familiar with Linux or UNIX (FreeBSD, OpenBSD, OS/X) and
|
|
|
+:page_with_curl: To be familiar with Linux or UNIX (FreeBSD, OpenBSD, OS/X) and
|
|
|
understand Session Initiation Protocol (SIP - RFC3261).
|
|
|
|
|
|
-??? Any step-by-step guide to install Kamailio?
|
|
|
+### Any step-by-step guide to install Kamailio?
|
|
|
|
|
|
-!!! Yes, see:
|
|
|
+:page_with_curl: Yes, see:
|
|
|
|
|
|
- <http://www.kamailio.org/wiki/#installation>
|
|
|
|
|
|
-###### ?
|
|
|
+## Support
|
|
|
|
|
|
-Support =====
|
|
|
+### Are there public mailing list where one can ask questions about Kamailio?
|
|
|
|
|
|
-??? Are there public mailing list where one can ask questions about
|
|
|
-Kamailio?
|
|
|
-
|
|
|
-!!! Yes, there are few of them, each addressing a particular category of
|
|
|
+:page_with_curl: Yes, there are few of them, each addressing a particular category of
|
|
|
topics, see the list at:
|
|
|
|
|
|
- <http://www.kamailio.org/w/mailing-lists/>
|
|
|
|
|
|
-??? What are the rules for posting questions about Kamailio?
|
|
|
+### What are the rules for posting questions about Kamailio?
|
|
|
|
|
|
-!!! You must subscribe to be able to post questions. Subscription is
|
|
|
+:page_with_curl: You must subscribe to be able to post questions. Subscription is
|
|
|
free, instructions are presented at the link related to each mailing
|
|
|
list.
|
|
|
|
|
@@ -542,39 +521,37 @@ to:
|
|
|
- mailing list web page:
|
|
|
- <http://lists.kamailio.org/cgi-bin/mailman/listinfo/business>
|
|
|
|
|
|
-??? Where I can report an issue?
|
|
|
+### Where I can report an issue?
|
|
|
|
|
|
-!!! Use the bug tracker available at:
|
|
|
+:page_with_curl: Use the bug tracker available at:
|
|
|
|
|
|
- <https://github.com/kamailio/kamailio/issues>
|
|
|
|
|
|
-??? Where can I buy commercial support?
|
|
|
+### Where can I buy commercial support?
|
|
|
|
|
|
-!!! See details posted at:
|
|
|
+:page_with_curl: See details posted at:
|
|
|
|
|
|
- <http://www.kamailio.org/w/business-directory/>
|
|
|
- <http://www.kamailio.org/w/business/>
|
|
|
|
|
|
-###### ?
|
|
|
-
|
|
|
-DNS =====
|
|
|
+## DNS
|
|
|
|
|
|
-??? Does it have support for ENUM?
|
|
|
+### Does it have support for ENUM?
|
|
|
|
|
|
-!!! Yes. See enum module.
|
|
|
+:page_with_curl: Yes. See enum module.
|
|
|
|
|
|
-??? What kind of DNS queries can it do?
|
|
|
+### What kind of DNS queries can it do?
|
|
|
|
|
|
-!!! Kamailio can do next DNS query types: A-Name, C-Name, AAAA (IPv6),
|
|
|
+:page_with_curl: Kamailio can do next DNS query types: A-Name, C-Name, AAAA (IPv6),
|
|
|
SRV, NAPTR and TXT.
|
|
|
|
|
|
-??? Can it do DNS-based (SRV) load balancing?
|
|
|
+### Can it do DNS-based (SRV) load balancing?
|
|
|
|
|
|
-!!! Yes.
|
|
|
+:page_with_curl: Yes.
|
|
|
|
|
|
-??? How to avoid reverse DNS for **src_ip** comparison?
|
|
|
+### How to avoid reverse DNS for **src_ip** comparison?
|
|
|
|
|
|
-!!! Do not enclose the IP address between quotes. Use like:
|
|
|
+:page_with_curl: Do not enclose the IP address between quotes. Use like:
|
|
|
|
|
|
if(src_ip==1.2.3.4) { ...
|
|
|
|
|
@@ -583,68 +560,64 @@ compared with a string:
|
|
|
|
|
|
if(src_ip=="1.2.3.4") { ...
|
|
|
|
|
|
-###### ?
|
|
|
+## Instant Messaging and Presence
|
|
|
|
|
|
-Instant Messaging and Presence =====
|
|
|
+### Can it route SIP instant messaging requests (page mode, RFC3428)?
|
|
|
|
|
|
-??? Can it route SIP instant messaging requests (page mode, RFC3428)?
|
|
|
-
|
|
|
-!!! Yes. There is nothing special to do for that in configuration file,
|
|
|
+:page_with_curl: Yes. There is nothing special to do for that in configuration file,
|
|
|
MESSAGE requests are simply routed as any other SIP request.
|
|
|
|
|
|
-??? Can it store instant messages for offline users and deliver them
|
|
|
+### Can it store instant messages for offline users and deliver them
|
|
|
when the users become online?
|
|
|
|
|
|
-!!! Yes. See msilo module.
|
|
|
+:page_with_curl: Yes. See msilo module.
|
|
|
|
|
|
-??? Can it route instant messages using MSRP (RFC4975)?
|
|
|
+### Can it route instant messages using MSRP (RFC4975)?
|
|
|
|
|
|
-!!! Yes. Kamailio offers an embedded MSRP relay function via msrp
|
|
|
+:page_with_curl: Yes. Kamailio offers an embedded MSRP relay function via msrp
|
|
|
module. You don't need any external application for relaying MSRP
|
|
|
packets.
|
|
|
|
|
|
-??? Can it handle end-to-end presence requests?
|
|
|
+### Can it handle end-to-end presence requests?
|
|
|
|
|
|
-!!! Yes. There is nothing special to do for that in configuration file,
|
|
|
+:page_with_curl: Yes. There is nothing special to do for that in configuration file,
|
|
|
SUBSCRIBE and NOTIFY requests are simply routed as any other SIP
|
|
|
request.
|
|
|
|
|
|
-??? Does it have support for SIP SIMPLE Presence (presence agent model)?
|
|
|
+### Does it have support for SIP SIMPLE Presence (presence agent model)?
|
|
|
|
|
|
-!!! Yes. You have to use presence and presence_xml modules to handle
|
|
|
+:page_with_curl: Yes. You have to use presence and presence_xml modules to handle
|
|
|
PUBLISH and SUBSCRIBE requests.
|
|
|
|
|
|
-??? Does it have support for Resource Lists Service?
|
|
|
+### Does it have support for Resource Lists Service?
|
|
|
|
|
|
-!!! Yes. You have to use rls module.
|
|
|
+:page_with_curl: Yes. You have to use rls module.
|
|
|
|
|
|
-??? Can it act as a presence user agent?
|
|
|
+### Can it act as a presence user agent?
|
|
|
|
|
|
-!!! Yes. See pua module and its extensions named with 'pua\_' prefix
|
|
|
+:page_with_curl: Yes. See pua module and its extensions named with 'pua\_' prefix
|
|
|
(such as pua_usrloc, pua_dialoginfo, etc.).
|
|
|
|
|
|
-??? Can it handle subscription requests for dialog states (aka, blinking
|
|
|
+### Can it handle subscription requests for dialog states (aka, blinking
|
|
|
lamps)?
|
|
|
|
|
|
-!!! Yes. You have to use dialog module together with presence_dialoginfo
|
|
|
+:page_with_curl: Yes. You have to use dialog module together with presence_dialoginfo
|
|
|
and pua_dialoginfo modules.
|
|
|
|
|
|
-??? Does it have support for handling XCAP?
|
|
|
+### Does it have support for handling XCAP?
|
|
|
|
|
|
-!!! Yes. Kamailio offers an embedded XCAP server via xcap_server module.
|
|
|
+:page_with_curl: Yes. Kamailio offers an embedded XCAP server via xcap_server module.
|
|
|
It can receive and handle directly the XCAP requests without using any
|
|
|
external application.
|
|
|
|
|
|
The xcap_client module can be used when you want to interact with an
|
|
|
external XCAP server (that could be another instance of Kamailio).
|
|
|
|
|
|
-###### ?
|
|
|
-
|
|
|
-NAT Traversal =====
|
|
|
+## NAT Traversal
|
|
|
|
|
|
-??? Can Kamailio be used with phones connecting from behind NAT?
|
|
|
+### Can Kamailio be used with phones connecting from behind NAT?
|
|
|
|
|
|
-!!! Yes, Kamailio supports the so called "far-end NAT traversal". One
|
|
|
+:page_with_curl: Yes, Kamailio supports the so called "far-end NAT traversal". One
|
|
|
solution is to use nathelper for NAT traversal of SIP signaling, and
|
|
|
rtpproxy modules with the rtpproxy (<http://rtpproxy.org>) application
|
|
|
for relaying RTP packets.
|
|
@@ -655,9 +628,9 @@ define WITH_NAT:
|
|
|
|
|
|
#!define WITH_NAT
|
|
|
|
|
|
-??? Can Kamailio be installed behind NAT (e.g., like on Amazon EC2)?
|
|
|
+### Can Kamailio be installed behind NAT (e.g., like on Amazon EC2)?
|
|
|
|
|
|
-!!! Yes. You have to set the public IP address as advertised attribute
|
|
|
+:page_with_curl: Yes. You have to set the public IP address as advertised attribute
|
|
|
to listen parameter:
|
|
|
|
|
|
listen=_localsocket_ advertise _publicaddr_
|
|
@@ -666,13 +639,11 @@ Example:
|
|
|
|
|
|
listen=udp:10.10.10.10:5060 advertise 11.11.11.11:5060
|
|
|
|
|
|
-###### ?
|
|
|
+## Configuration File Processing
|
|
|
|
|
|
-Configuration File Processing =====
|
|
|
+### Can I check the configuration files for syntax errors?
|
|
|
|
|
|
-??? Can I check the configuration files for syntax errors?
|
|
|
-
|
|
|
-!!! Yes. Use '-c' command line parameter, like:
|
|
|
+:page_with_curl: Yes. Use '-c' command line parameter, like:
|
|
|
|
|
|
/usr/local/sbin/kamailio -c -f /usr/local/etc/kamailio/kamailio.cfg
|
|
|
|
|
@@ -682,10 +653,9 @@ file. For example, the database URL can be syntactically correct, but
|
|
|
the access itself is not working due to wrong username or password,
|
|
|
causing kamailio to fail starting.
|
|
|
|
|
|
-??? Do I have to delete the AVPs added in the configuration file for a
|
|
|
-SIP message?
|
|
|
+### Do I have to delete the AVPs added in the configuration file for a SIP message?
|
|
|
|
|
|
-!!! No. The AVPs are automatically deleted when associated SIP
|
|
|
+:page_with_curl: No. The AVPs are automatically deleted when associated SIP
|
|
|
transaction is destroyed.
|
|
|
|
|
|
If you want to do it on purpose, you can delete the AVP using assignment
|
|
@@ -693,9 +663,9 @@ to $null, like:
|
|
|
|
|
|
$avp(name) = $null;
|
|
|
|
|
|
-??? What is a pseudo-variable?
|
|
|
+### What is a pseudo-variable?
|
|
|
|
|
|
-!!! A pseudo-variable is a special token that is expanded at runtume
|
|
|
+:page_with_curl: A pseudo-variable is a special token that is expanded at runtume
|
|
|
with a specific value. It can be used inside the parameters of some
|
|
|
functions or in configuration file expressions.
|
|
|
|
|
@@ -706,9 +676,9 @@ For more see:
|
|
|
|
|
|
- <http://www.kamailio.org/wiki/cookbooks/devel/pseudovariables>
|
|
|
|
|
|
-??? How to iterate through the items in a comma separated string?
|
|
|
+### How to iterate through the items in a comma separated string?
|
|
|
|
|
|
-!!! If you have a variable holding a string like "a,b,c,d" and want to
|
|
|
+:page_with_curl: If you have a variable holding a string like "a,b,c,d" and want to
|
|
|
get each character separately, you have to use a WHILE loop with
|
|
|
{s.count,separator} and {s.select,index,separator} transformations.
|
|
|
|
|
@@ -725,9 +695,9 @@ while( $var(i) <= $var(n) ) {
|
|
|
}
|
|
|
```
|
|
|
|
|
|
-??? How is the function return code evaluated?
|
|
|
+### How is the function return code evaluated?
|
|
|
|
|
|
-!!! Configuration file interpreter evaluates the return code of a
|
|
|
+:page_with_curl: Configuration file interpreter evaluates the return code of a
|
|
|
function as follow:
|
|
|
|
|
|
- \<0 (negative value) - it is evaluated to false
|
|
@@ -823,9 +793,9 @@ if($var(x)) {
|
|
|
}
|
|
|
```
|
|
|
|
|
|
-??? How is the SIP request retransmission handled?
|
|
|
+### How is the SIP request retransmission handled?
|
|
|
|
|
|
-!!! The next snippet is detecting retransmissions:
|
|
|
+:page_with_curl: The next snippet is detecting retransmissions:
|
|
|
|
|
|
``` c
|
|
|
# handle retransmissions
|
|
@@ -858,13 +828,11 @@ transaction is found in shared memory corresponding to the same request.
|
|
|
If such transaction is found in shared memory, then **t_check_trans()**
|
|
|
triggers internally the **exit** for configuration file execution.
|
|
|
|
|
|
-###### ?
|
|
|
-
|
|
|
-Troubleshooting =====
|
|
|
+## Troubleshooting
|
|
|
|
|
|
-??? I get 'out of memory' errors, what can be done?
|
|
|
+### I get 'out of memory' errors, what can be done?
|
|
|
|
|
|
-!!! Most probably you run out of memory allocated for Kamailio. The
|
|
|
+:page_with_curl: Most probably you run out of memory allocated for Kamailio. The
|
|
|
application does not use the entire system memory, but up to a
|
|
|
configured size.
|
|
|
|
|
@@ -887,25 +855,23 @@ private memory:
|
|
|
|
|
|
/usr/local/bin/kamailio -m 512 -M 8 ...
|
|
|
|
|
|
-###### ?
|
|
|
+## Tools
|
|
|
|
|
|
-Tools =====
|
|
|
+### How to generate HA1 value in command line?
|
|
|
|
|
|
-??? How to generate HA1 value in command line?
|
|
|
-
|
|
|
-!!! Use following command:
|
|
|
+:page_with_curl: Use following command:
|
|
|
|
|
|
echo -n 'user:realm:password' | md5sum | awk '{ print $1 }'
|
|
|
|
|
|
-??? How to generate HA1B value in command line?
|
|
|
+### How to generate HA1B value in command line?
|
|
|
|
|
|
-!!! Use following command:
|
|
|
+:page_with_curl: Use following command:
|
|
|
|
|
|
echo -n 'user@realm:realm:password' | md5sum | awk '{ print $1 }'
|
|
|
|
|
|
-??? Kamctl gives an error regarding opening FIFO file, why?
|
|
|
+### Kamctl gives an error regarding opening FIFO file, why?
|
|
|
|
|
|
-!!! Kamctl couldn't connect to FIFO file for sending MI commands -
|
|
|
+:page_with_curl: Kamctl couldn't connect to FIFO file for sending MI commands -
|
|
|
default FIFO file is **/tmp/kamailio_fifo**.
|
|
|
|
|
|
Check if your configuration loads the mi_fifo module and configures a
|
|
@@ -913,17 +879,18 @@ fifo name.
|
|
|
|
|
|
Example for the configuration syntax:
|
|
|
|
|
|
+```
|
|
|
loadmodule "mi_fifo.so"
|
|
|
|
|
|
modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
|
|
|
+```
|
|
|
|
|
|
Check also the access privileges of the FIFO file in order to be sure
|
|
|
that the user running kamctl can read and write to the file.
|
|
|
|
|
|
-??? Kamcmd sometime fails to execute RPC commands with number
|
|
|
-parameters, why?
|
|
|
+### Kamcmd sometime fails to execute RPC commands with number parameters, why?
|
|
|
|
|
|
-!!! There are situations when a **kamcmd** RPC command fails because the
|
|
|
+:page_with_curl: There are situations when a **kamcmd** RPC command fails because the
|
|
|
parameters that are provided are auto-converted to integer numbers. This
|
|
|
happens when the implementation of the RPC commands expects a string
|
|
|
parameter (e.g., username).
|
|
@@ -933,8 +900,10 @@ parameter with **s:**.
|
|
|
|
|
|
Example:
|
|
|
|
|
|
+```shell
|
|
|
# - next command fails
|
|
|
kamcmd uac.reg_refresh 1001
|
|
|
|
|
|
# use instead
|
|
|
kamcmd uac.reg_refresh s:1001
|
|
|
+```
|