|
@@ -20,7 +20,7 @@ Edited by
|
|
|
|
|
|
Bogdan-Andre Iancu
|
|
|
|
|
|
- Copyright © 2003 FhG FOKUS
|
|
|
+ Copyright © 2003 FhG FOKUS
|
|
|
__________________________________________________________________
|
|
|
|
|
|
Table of Contents
|
|
@@ -59,13 +59,14 @@ Bogdan-Andre Iancu
|
|
|
3.18. use_path (integer)
|
|
|
3.19. path_mode (integer)
|
|
|
3.20. path_use_received (integer)
|
|
|
- 3.21. reg_callid_avp (string)
|
|
|
- 3.22. xavp_cfg (string)
|
|
|
- 3.23. xavp_rcd (string)
|
|
|
- 3.24. gruu_enabled (integer)
|
|
|
- 3.25. outbound_mode (integer)
|
|
|
- 3.26. regid_mode (integer)
|
|
|
- 3.27. flow_timer (integer)
|
|
|
+ 3.21. path_check_local (integer)
|
|
|
+ 3.22. reg_callid_avp (string)
|
|
|
+ 3.23. xavp_cfg (string)
|
|
|
+ 3.24. xavp_rcd (string)
|
|
|
+ 3.25. gruu_enabled (integer)
|
|
|
+ 3.26. outbound_mode (integer)
|
|
|
+ 3.27. regid_mode (integer)
|
|
|
+ 3.28. flow_timer (integer)
|
|
|
|
|
|
4. Functions
|
|
|
|
|
@@ -117,23 +118,24 @@ Bogdan-Andre Iancu
|
|
|
1.17. Set use_path parameter
|
|
|
1.18. Set path_mode parameter
|
|
|
1.19. Set path_use_received parameter
|
|
|
- 1.20. Set reg_callid_avp parameter
|
|
|
- 1.21. Set xavp_cfg parameter
|
|
|
- 1.22. Set xavp_rcd parameter
|
|
|
- 1.23. Set gruu_enabled parameter
|
|
|
- 1.24. Set outbound_mode parameter
|
|
|
- 1.25. Set regid_mode parameter
|
|
|
- 1.26. Set flow_timer parameter
|
|
|
- 1.27. save usage
|
|
|
- 1.28. lookup usage
|
|
|
- 1.29. lookup_branches usage
|
|
|
- 1.30. registered usage
|
|
|
- 1.31. add_sock_hdr usage
|
|
|
- 1.32. unregister usage
|
|
|
- 1.33. reg_fetch_contacts usage
|
|
|
- 1.34. reg_free_contacts usage
|
|
|
- 1.35. event_route[usrloc:contact-expired] usage
|
|
|
- 1.36. $ulc(name) usage
|
|
|
+ 1.20. Set path_check_local parameter
|
|
|
+ 1.21. Set reg_callid_avp parameter
|
|
|
+ 1.22. Set xavp_cfg parameter
|
|
|
+ 1.23. Set xavp_rcd parameter
|
|
|
+ 1.24. Set gruu_enabled parameter
|
|
|
+ 1.25. Set outbound_mode parameter
|
|
|
+ 1.26. Set regid_mode parameter
|
|
|
+ 1.27. Set flow_timer parameter
|
|
|
+ 1.28. save usage
|
|
|
+ 1.29. lookup usage
|
|
|
+ 1.30. lookup_branches usage
|
|
|
+ 1.31. registered usage
|
|
|
+ 1.32. add_sock_hdr usage
|
|
|
+ 1.33. unregister usage
|
|
|
+ 1.34. reg_fetch_contacts usage
|
|
|
+ 1.35. reg_free_contacts usage
|
|
|
+ 1.36. event_route[usrloc:contact-expired] usage
|
|
|
+ 1.37. $ulc(name) usage
|
|
|
|
|
|
Chapter 1. Admin Guide
|
|
|
|
|
@@ -171,13 +173,14 @@ Chapter 1. Admin Guide
|
|
|
3.18. use_path (integer)
|
|
|
3.19. path_mode (integer)
|
|
|
3.20. path_use_received (integer)
|
|
|
- 3.21. reg_callid_avp (string)
|
|
|
- 3.22. xavp_cfg (string)
|
|
|
- 3.23. xavp_rcd (string)
|
|
|
- 3.24. gruu_enabled (integer)
|
|
|
- 3.25. outbound_mode (integer)
|
|
|
- 3.26. regid_mode (integer)
|
|
|
- 3.27. flow_timer (integer)
|
|
|
+ 3.21. path_check_local (integer)
|
|
|
+ 3.22. reg_callid_avp (string)
|
|
|
+ 3.23. xavp_cfg (string)
|
|
|
+ 3.24. xavp_rcd (string)
|
|
|
+ 3.25. gruu_enabled (integer)
|
|
|
+ 3.26. outbound_mode (integer)
|
|
|
+ 3.27. regid_mode (integer)
|
|
|
+ 3.28. flow_timer (integer)
|
|
|
|
|
|
4. Functions
|
|
|
|
|
@@ -226,8 +229,8 @@ Chapter 1. Admin Guide
|
|
|
* off - stores the value of the Path headers into usrloc without
|
|
|
passing it back to the UAC in the reply.
|
|
|
* lazy - stores the Path header and passes it back to the UAC if
|
|
|
- Path-support is indicated by the "path" param in the Supported HF.
|
|
|
- * strict - rejects the registration with "420 Bad Extension" if
|
|
|
+ Path-support is indicated by the “path� param in the Supported HF.
|
|
|
+ * strict - rejects the registration with “420 Bad Extension� if
|
|
|
there's a Path header but no support for it is indicated by the
|
|
|
UAC. Otherwise it's stored and passed back to the UAC.
|
|
|
|
|
@@ -239,8 +242,8 @@ Chapter 1. Admin Guide
|
|
|
client's NAT).
|
|
|
|
|
|
The whole process is transparent to the user, so no config changes are
|
|
|
- required beside setting the registrar-parameters "use_path" and
|
|
|
- "path_mode".
|
|
|
+ required beside setting the registrar-parameters “use_path� and
|
|
|
+ “path_mode�.
|
|
|
|
|
|
1.2. GRUU Support
|
|
|
|
|
@@ -292,13 +295,14 @@ Chapter 1. Admin Guide
|
|
|
3.18. use_path (integer)
|
|
|
3.19. path_mode (integer)
|
|
|
3.20. path_use_received (integer)
|
|
|
- 3.21. reg_callid_avp (string)
|
|
|
- 3.22. xavp_cfg (string)
|
|
|
- 3.23. xavp_rcd (string)
|
|
|
- 3.24. gruu_enabled (integer)
|
|
|
- 3.25. outbound_mode (integer)
|
|
|
- 3.26. regid_mode (integer)
|
|
|
- 3.27. flow_timer (integer)
|
|
|
+ 3.21. path_check_local (integer)
|
|
|
+ 3.22. reg_callid_avp (string)
|
|
|
+ 3.23. xavp_cfg (string)
|
|
|
+ 3.24. xavp_rcd (string)
|
|
|
+ 3.25. gruu_enabled (integer)
|
|
|
+ 3.26. outbound_mode (integer)
|
|
|
+ 3.27. regid_mode (integer)
|
|
|
+ 3.28. flow_timer (integer)
|
|
|
|
|
|
3.1. default_expires (integer)
|
|
|
|
|
@@ -306,7 +310,7 @@ Chapter 1. Admin Guide
|
|
|
contact parameters, this value will be used for newly created usrloc
|
|
|
records. The parameter contains number of second to expire (for example
|
|
|
use 3600 for one hour). If it is set to a lower value than the
|
|
|
- "min_expires" parameter then it will be ignored. This parameter can be
|
|
|
+ “min_expires� parameter then it will be ignored. This parameter can be
|
|
|
modified via ser config framework. A random value in a specific
|
|
|
interval can be selected by using the default_expires_range parameter
|
|
|
|
|
@@ -321,7 +325,7 @@ modparam("registrar", "default_expires", 1800)
|
|
|
|
|
|
This parameter specifies that the expiry used for newly created usrloc
|
|
|
records are not fixed, but a random value in the interval
|
|
|
- "[default_expires-default_expires_range%, default_expires]". The value
|
|
|
+ “[default_expires-default_expires_range%, default_expires]�. The value
|
|
|
is between 0 and 100 and represent the maximim percentage from expires
|
|
|
that will be substracted when computing the value. Default is 0,
|
|
|
meaning default_expires is left unmodified. This parameter can be
|
|
@@ -350,7 +354,7 @@ res]
|
|
|
|
|
|
3.4. min_expires (integer)
|
|
|
|
|
|
- The minimum expires value of a "Contact". Values lower than this
|
|
|
+ The minimum expires value of a “Contact�. Values lower than this
|
|
|
minimum will be automatically set to the minimum. Value 0 disables the
|
|
|
checking. This parameter can be modified via the Kamailio config
|
|
|
framework.
|
|
@@ -364,7 +368,7 @@ modparam("registrar", "min_expires", 60)
|
|
|
|
|
|
3.5. max_expires (integer)
|
|
|
|
|
|
- The maximum accepted expires value of a "Contact", values higher than
|
|
|
+ The maximum accepted expires value of a “Contact�, values higher than
|
|
|
this maximum will be automatically set to the maximum. Value 0 disables
|
|
|
the checking. This parameter can be modified via the Kamailio config
|
|
|
framework.
|
|
@@ -378,7 +382,7 @@ modparam("registrar", "max_expires", 120)
|
|
|
|
|
|
3.6. default_q (integer)
|
|
|
|
|
|
- The parameter represents default "q" value for new contacts. Because
|
|
|
+ The parameter represents default “q� value for new contacts. Because
|
|
|
Kamailio doesn't support float parameter types, the value in the
|
|
|
parameter is divided by 1000 and stored as float. For example, if you
|
|
|
want default_q to be 0.38, use value 380 here. This parameter can be
|
|
@@ -468,7 +472,7 @@ modparam("registrar", "received_avp", "$avp(s:rcv)")
|
|
|
3.12. received_param (string)
|
|
|
|
|
|
The name of the parameter that will be appended to Contact URI's of 200
|
|
|
- OK when the received URI was set by the "nathelper" module. If the
|
|
|
+ OK when the received URI was set by the “nathelper� module. If the
|
|
|
value is an empty string, then the parameter is not appended anymore.
|
|
|
|
|
|
Default value is "received".
|
|
@@ -551,7 +555,7 @@ modparam("registrar", "sock_hdr_name", "Sock-Info")
|
|
|
|
|
|
Tells if the contact filtering based on supported methods should be
|
|
|
performed during lookup. It's enabled only if it has a non zero value.
|
|
|
- Supported methods are listed in the "Allow:" header in the REGISTER
|
|
|
+ Supported methods are listed in the “Allow:� header in the REGISTER
|
|
|
message and stored in the location database.
|
|
|
|
|
|
Default value is 0 (disabled).
|
|
@@ -563,9 +567,9 @@ modparam("registrar", "method_filtering", 1)
|
|
|
|
|
|
3.18. use_path (integer)
|
|
|
|
|
|
- If set to 1, the "Path:" header is handled according to the parameter
|
|
|
+ If set to 1, the “Path:� header is handled according to the parameter
|
|
|
This parameter can be modified via Kamailio config framework.
|
|
|
- "path_mode".
|
|
|
+ “path_mode�.
|
|
|
|
|
|
Default value is 0 (disabled).
|
|
|
|
|
@@ -582,12 +586,12 @@ modparam("registrar", "use_path", 1)
|
|
|
the reply.
|
|
|
* 1 - The Path header is saved into usrloc, but is only included in
|
|
|
the reply if path support is indicated in the registration request
|
|
|
- by the "path" option in the "Supported:" header.
|
|
|
+ by the “path� option in the “Supported:� header.
|
|
|
* 2 - The path header is only saved into usrloc, if path support is
|
|
|
- indicated in the registration request by the "path" option of the
|
|
|
- "Supported" header. If no path support is indicated, the request is
|
|
|
- rejected with "420 - Bad Extension" and the header "Unsupported:
|
|
|
- path" is included in the reply along with the received "Path"
|
|
|
+ indicated in the registration request by the “path� option of the
|
|
|
+ “Supported� header. If no path support is indicated, the request is
|
|
|
+ rejected with “420 - Bad Extension� and the header “Unsupported:
|
|
|
+ path� is included in the reply along with the received “Path�
|
|
|
header. This mode is the one recommended by RFC-3327.
|
|
|
|
|
|
Default value is 2.
|
|
@@ -599,10 +603,10 @@ modparam("registrar", "path_mode", 0)
|
|
|
|
|
|
3.20. path_use_received (integer)
|
|
|
|
|
|
- If set to 1, the "received" parameter of the first Path URI of a
|
|
|
+ If set to 1, the “received� parameter of the first Path URI of a
|
|
|
registration is set as received-uri and the NAT branch flag is set for
|
|
|
this contact. This is useful if the registrar is placed behind a SIP
|
|
|
- loadbalancer, which passes the nat'ed UAC address as "received"
|
|
|
+ loadbalancer, which passes the nat'ed UAC address as “received�
|
|
|
parameter in it's Path uri.
|
|
|
|
|
|
Default value is 0 (disabled).
|
|
@@ -612,7 +616,23 @@ modparam("registrar", "path_mode", 0)
|
|
|
modparam("registrar", "path_use_received", 1)
|
|
|
...
|
|
|
|
|
|
-3.21. reg_callid_avp (string)
|
|
|
+3.21. path_check_local (integer)
|
|
|
+
|
|
|
+ If set to 1, when performing a lookup the Path (if present) is
|
|
|
+ evaluated and if the first hop is local (according to “myself� test),
|
|
|
+ we skip it to avoid unnecessary looping.
|
|
|
+
|
|
|
+ This is useful if multiple servers are sharing a common location
|
|
|
+ database, each saving contacts with their local address as the Path.
|
|
|
+
|
|
|
+ Default value is 0 (disabled).
|
|
|
+
|
|
|
+ Example 1.20. Set path_check_local parameter
|
|
|
+...
|
|
|
+modparam("registrar", "path_check_local", 1)
|
|
|
+...
|
|
|
+
|
|
|
+3.22. reg_callid_avp (string)
|
|
|
|
|
|
If reg_callid_avp is defined and populated when the registered() is
|
|
|
invoked, the result is TRUE only if an active registration with the
|
|
@@ -620,12 +640,12 @@ modparam("registrar", "path_use_received", 1)
|
|
|
|
|
|
Default value is NULL (disabled).
|
|
|
|
|
|
- Example 1.20. Set reg_callid_avp parameter
|
|
|
+ Example 1.21. Set reg_callid_avp parameter
|
|
|
...
|
|
|
modparam("registrar", "reg_callid_avp", "$avp(s:avp)")
|
|
|
...
|
|
|
|
|
|
-3.22. xavp_cfg (string)
|
|
|
+3.23. xavp_cfg (string)
|
|
|
|
|
|
Defines the name of XAVP class to store runtime module config values.
|
|
|
The values are stored as inner XAVPs, like $xavp(class=>attribute).
|
|
@@ -643,12 +663,12 @@ modparam("registrar", "reg_callid_avp", "$avp(s:avp)")
|
|
|
|
|
|
Default value is NULL (disabled).
|
|
|
|
|
|
- Example 1.21. Set xavp_cfg parameter
|
|
|
+ Example 1.22. Set xavp_cfg parameter
|
|
|
...
|
|
|
modparam("registrar", "xavp_cfg", "reg")
|
|
|
...
|
|
|
|
|
|
-3.23. xavp_rcd (string)
|
|
|
+3.24. xavp_rcd (string)
|
|
|
|
|
|
Defines the name of XAVP class to store details from the location
|
|
|
records. The values are stored as inner XAVPs, like
|
|
@@ -660,14 +680,14 @@ modparam("registrar", "xavp_cfg", "reg")
|
|
|
|
|
|
Default value is NULL (disabled).
|
|
|
|
|
|
- Example 1.22. Set xavp_rcd parameter
|
|
|
+ Example 1.23. Set xavp_rcd parameter
|
|
|
...
|
|
|
modparam("registrar", "xavp_rcd", "ulrcd")
|
|
|
...
|
|
|
|
|
|
-3.24. gruu_enabled (integer)
|
|
|
+3.25. gruu_enabled (integer)
|
|
|
|
|
|
- If set to 1 and the "+sip.instance" parameter to Contact header of
|
|
|
+ If set to 1 and the “+sip.instance� parameter to Contact header of
|
|
|
REGISTER is present, then the value of the parameter is saved to
|
|
|
location and pub-gruu and temp-gruu addresses are generated.
|
|
|
|
|
@@ -675,62 +695,62 @@ modparam("registrar", "xavp_rcd", "ulrcd")
|
|
|
|
|
|
Default value is 1 (enabled).
|
|
|
|
|
|
- Example 1.23. Set gruu_enabled parameter
|
|
|
+ Example 1.24. Set gruu_enabled parameter
|
|
|
...
|
|
|
modparam("registrar", "gruu_enabled", 0)
|
|
|
...
|
|
|
|
|
|
-3.25. outbound_mode (integer)
|
|
|
+3.26. outbound_mode (integer)
|
|
|
|
|
|
If set to 0 this module will accept REGISTER requests that do not
|
|
|
- contain a "Supported:" header with the outbound options-tag. The 200 OK
|
|
|
+ contain a “Supported:� header with the outbound options-tag. The 200 OK
|
|
|
response to REGISTER requests that this module generates will not
|
|
|
- contain "Require:" or "Supported:" headers with the outbound
|
|
|
- options-tag. If the client has a "Require:" header with the outbound
|
|
|
- options tag the REGISTER will be rejected with a "420 Bad Extension"
|
|
|
+ contain “Require:� or “Supported:� headers with the outbound
|
|
|
+ options-tag. If the client has a “Require:� header with the outbound
|
|
|
+ options tag the REGISTER will be rejected with a “420 Bad Extension�
|
|
|
response.
|
|
|
|
|
|
If set to 1 this module will accept REGISTER requests that do not
|
|
|
- contain a "Supported:" header with the outbound options-tag and
|
|
|
+ contain a “Supported:� header with the outbound options-tag and
|
|
|
REGISTER requests that do contain a Supported: or Requires: header with
|
|
|
the outbound options-tag. When the client supports outbound the
|
|
|
appropriate RFC5626 procedures will be followed.
|
|
|
|
|
|
If set to 2 this module will reject REGISTER requests that do not
|
|
|
- contain a "Supported:" header with the outbound options-tag. When the
|
|
|
+ contain a “Supported:� header with the outbound options-tag. When the
|
|
|
client supports outbound the appropriate RFC5626 procedures will be
|
|
|
followed.
|
|
|
|
|
|
Default value is 0.
|
|
|
|
|
|
- Example 1.24. Set outbound_mode parameter
|
|
|
+ Example 1.25. Set outbound_mode parameter
|
|
|
...
|
|
|
modparam("registrar", "outbound_mode", 2)
|
|
|
...
|
|
|
|
|
|
-3.26. regid_mode (integer)
|
|
|
+3.27. regid_mode (integer)
|
|
|
|
|
|
- If set to 0 this module will ignore the "regid" contact param when
|
|
|
+ If set to 0 this module will ignore the “regid� contact param when
|
|
|
saving REGISTER request if the request does not indicate support for
|
|
|
outbound.
|
|
|
|
|
|
- If set to 1 this module will use "regid" contact param (if present)
|
|
|
+ If set to 1 this module will use “regid� contact param (if present)
|
|
|
when saving REGISTER request even if REGISTER request does not indicate
|
|
|
support for outbound.
|
|
|
|
|
|
Default value is 0.
|
|
|
|
|
|
- Example 1.25. Set regid_mode parameter
|
|
|
+ Example 1.26. Set regid_mode parameter
|
|
|
...
|
|
|
modparam("registrar", "regid_mode", 1)
|
|
|
...
|
|
|
|
|
|
-3.27. flow_timer (integer)
|
|
|
+3.28. flow_timer (integer)
|
|
|
|
|
|
- If set to 0 then this module will not add a "Flow-Timer:" header to 200
|
|
|
+ If set to 0 then this module will not add a “Flow-Timer:� header to 200
|
|
|
OK responses to REGISTER requests.
|
|
|
|
|
|
- If set to > 0 then this module will add a "Flow-Timer:" header
|
|
|
+ If set to > 0 then this module will add a “Flow-Timer:� header
|
|
|
containing this value to 200 OK responses to REGISTER requests. This
|
|
|
parameter may only be set to a value > 0 when outbound_mode is set to 1
|
|
|
or 2.
|
|
@@ -742,12 +762,12 @@ modparam("registrar", "regid_mode", 1)
|
|
|
useful when you have a single edge proxy/registrar or if you have an
|
|
|
edge proxy that cannot modify responses. If you are using a separate
|
|
|
edge proxy you should consider leaving this parameter set to 0 and
|
|
|
- adding the "Flow-Timer:" header on the edge proxy as this allows you to
|
|
|
+ adding the “Flow-Timer:� header on the edge proxy as this allows you to
|
|
|
keep all of the timer values for a specific flow in one configuration.
|
|
|
|
|
|
Default value is 0.
|
|
|
|
|
|
- Example 1.26. Set flow_timer parameter
|
|
|
+ Example 1.27. Set flow_timer parameter
|
|
|
...
|
|
|
modparam("registrar", "flow_timer", 25)
|
|
|
...
|
|
@@ -763,12 +783,12 @@ modparam("registrar", "flow_timer", 25)
|
|
|
4.7. reg_fetch_contacts(domain, uri, profile)
|
|
|
4.8. reg_free_contacts(profile)
|
|
|
|
|
|
-4.1. save(domain, [, flags [, uri]])
|
|
|
+4.1. save(domain, [, flags [, uri]])
|
|
|
|
|
|
The function processes a REGISTER message. It can add, remove or modify
|
|
|
location records (in usrloc) depending on Contact and Expires HFs in
|
|
|
the REGISTER message. On success and when called from the
|
|
|
- REQUEST_ROUTE, "200 OK" will be returned listing all contacts that are
|
|
|
+ REQUEST_ROUTE, “200 OK� will be returned listing all contacts that are
|
|
|
currently in the location database. On an error, an error message will
|
|
|
be sent with a short description in reason phrase.
|
|
|
|
|
@@ -801,14 +821,14 @@ modparam("registrar", "flow_timer", 25)
|
|
|
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE and
|
|
|
REPLY_ROUTE.
|
|
|
|
|
|
- Example 1.27. save usage
|
|
|
+ Example 1.28. save usage
|
|
|
...
|
|
|
save("location");
|
|
|
save("location", "0x01");
|
|
|
save("location", "0x00", "sip:[email protected]");
|
|
|
...
|
|
|
|
|
|
-4.2. lookup(domain [, uri])
|
|
|
+4.2. lookup(domain [, uri])
|
|
|
|
|
|
The lookup function extracts username and/or domain from Request-URI
|
|
|
and tries to find all contacts for the username in usrloc. If there are
|
|
@@ -834,7 +854,7 @@ save("location", "0x00", "sip:[email protected]");
|
|
|
|
|
|
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
|
|
|
|
|
|
- Example 1.28. lookup usage
|
|
|
+ Example 1.29. lookup usage
|
|
|
...
|
|
|
lookup("location");
|
|
|
switch ($retcode) {
|
|
@@ -848,7 +868,7 @@ switch ($retcode) {
|
|
|
};
|
|
|
...
|
|
|
|
|
|
-4.3. lookup_branches(domain)
|
|
|
+4.3. lookup_branches(domain)
|
|
|
|
|
|
The function performs lookup(domain) on r-uri and additional branches
|
|
|
(only branches that have no other attributes set than uri).
|
|
@@ -860,12 +880,12 @@ switch ($retcode) {
|
|
|
|
|
|
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
|
|
|
|
|
|
- Example 1.29. lookup_branches usage
|
|
|
+ Example 1.30. lookup_branches usage
|
|
|
...
|
|
|
lookup_branches("location");
|
|
|
...
|
|
|
|
|
|
-4.4. registered(domain [, uri])
|
|
|
+4.4. registered(domain [, uri])
|
|
|
|
|
|
The function returns true if the AOR in the Request-URI is registered,
|
|
|
false otherwise. The function does not modify the message being
|
|
@@ -879,7 +899,7 @@ lookup_branches("location");
|
|
|
|
|
|
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
|
|
|
|
|
|
- Example 1.30. registered usage
|
|
|
+ Example 1.31. registered usage
|
|
|
...
|
|
|
if (registered("location")) {
|
|
|
sl_send_reply("100", "Trying");
|
|
@@ -887,9 +907,9 @@ if (registered("location")) {
|
|
|
};
|
|
|
...
|
|
|
|
|
|
-4.5. add_sock_hdr(hdr_name)
|
|
|
+4.5. add_sock_hdr(hdr_name)
|
|
|
|
|
|
- Adds a new header to the current REGISTER request with "hdr_name" which
|
|
|
+ Adds a new header to the current REGISTER request with “hdr_name� which
|
|
|
contains the description of the received socket (proto:ip:port)
|
|
|
|
|
|
This makes sense only in multiple replicated servers scenarios.
|
|
@@ -899,17 +919,17 @@ if (registered("location")) {
|
|
|
|
|
|
This function can be used from REQUEST_ROUTE.
|
|
|
|
|
|
- Example 1.31. add_sock_hdr usage
|
|
|
+ Example 1.32. add_sock_hdr usage
|
|
|
...
|
|
|
add_sock_hdr("Sock-Info");
|
|
|
...
|
|
|
|
|
|
-4.6. unregister(domain, uri[, ruid])
|
|
|
+4.6. unregister(domain, uri[, ruid])
|
|
|
|
|
|
The function removes contacts associated with 'uri' from the location
|
|
|
database. If 'ruid' is provided a specific contact is removed, if
|
|
|
'ruid' is not provided all the current contacts are removed. If 'ruid'
|
|
|
- is provided and the "usrloc" module is using "db_mode=3", 'uri' does
|
|
|
+ is provided and the “usrloc� module is using “db_mode=3�, 'uri' does
|
|
|
not need to be given and can be empty string.
|
|
|
|
|
|
Meaning of the parameters is as follows:
|
|
@@ -923,7 +943,7 @@ add_sock_hdr("Sock-Info");
|
|
|
|
|
|
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
|
|
|
|
|
|
- Example 1.32. unregister usage
|
|
|
+ Example 1.33. unregister usage
|
|
|
...
|
|
|
unregister("location", "$ru");
|
|
|
unregister("location", "sip:[email protected]");
|
|
@@ -931,7 +951,7 @@ unregister("location", "$ru", "$ulc(caller=>ruid)");
|
|
|
unregister("location", "", "$ruid");
|
|
|
...
|
|
|
|
|
|
-4.7. reg_fetch_contacts(domain, uri, profile)
|
|
|
+4.7. reg_fetch_contacts(domain, uri, profile)
|
|
|
|
|
|
The function fetches the contacts for 'uri' from table 'domain' to
|
|
|
pseudo-variable $ulc(profile).
|
|
@@ -947,13 +967,13 @@ unregister("location", "", "$ruid");
|
|
|
|
|
|
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
|
|
|
|
|
|
- Example 1.33. reg_fetch_contacts usage
|
|
|
+ Example 1.34. reg_fetch_contacts usage
|
|
|
...
|
|
|
reg_fetch_contacts("location", "$ru", "callee");
|
|
|
reg_fetch_contacts("location", "sip:[email protected]", "caller");
|
|
|
...
|
|
|
|
|
|
-4.8. reg_free_contacts(profile)
|
|
|
+4.8. reg_free_contacts(profile)
|
|
|
|
|
|
The function frees the contacts from pseudo-variable $ulc(profile).
|
|
|
Should be called to release the content of a profile. Anyhow, fetching
|
|
@@ -966,7 +986,7 @@ reg_fetch_contacts("location", "sip:[email protected]", "caller");
|
|
|
|
|
|
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
|
|
|
|
|
|
- Example 1.34. reg_free_contacts usage
|
|
|
+ Example 1.35. reg_free_contacts usage
|
|
|
...
|
|
|
reg_free_contacts("callee");
|
|
|
...
|
|
@@ -980,7 +1000,7 @@ reg_free_contacts("callee");
|
|
|
Executed when a contact in location table has expired. The variable
|
|
|
$ulc(exp=>...) is filled with the attributes of the expired contact.
|
|
|
|
|
|
- Example 1.35. event_route[usrloc:contact-expired] usage
|
|
|
+ Example 1.36. event_route[usrloc:contact-expired] usage
|
|
|
...
|
|
|
event_route[usrloc:contact-expired] {
|
|
|
xlog("expired contact for $ulc(exp=>aor)\n");
|
|
@@ -1022,12 +1042,12 @@ event_route[usrloc:contact-expired] {
|
|
|
7.1. $ulc(profile=>attr)
|
|
|
|
|
|
Access the attributes of contact addresses stored in 'profile'. It must
|
|
|
- be used after a call of "reg_fetch_contacts()".
|
|
|
+ be used after a call of “reg_fetch_contacts()�.
|
|
|
|
|
|
- The "profile" has to be one of the values used with
|
|
|
- "reg_fetch_contacts()".
|
|
|
+ The “profile� has to be one of the values used with
|
|
|
+ “reg_fetch_contacts()�.
|
|
|
|
|
|
- The "attr" can be:
|
|
|
+ The “attr� can be:
|
|
|
* aor - address of record
|
|
|
* domain - use location domain name
|
|
|
* aorhash - hash id for the record
|
|
@@ -1052,7 +1072,7 @@ event_route[usrloc:contact-expired] {
|
|
|
The pseudo-variable accepts positive index value to access a specific
|
|
|
contact record.
|
|
|
|
|
|
- Example 1.36. $ulc(name) usage
|
|
|
+ Example 1.37. $ulc(name) usage
|
|
|
...
|
|
|
if(reg_fetch_contacts("location", "$fu", "caller"))
|
|
|
{
|
|
@@ -1084,9 +1104,9 @@ if(reg_fetch_contacts("location", "$fu", "caller"))
|
|
|
|
|
|
Chapter 2. Frequently Asked Questions
|
|
|
|
|
|
- 2.1. What happend with the old "nat_flag" module parameter?
|
|
|
- 2.2. What happend with the old "use_domain" module parameter?
|
|
|
- 2.3. What happened with the old "save_noreply" and "save_memory"
|
|
|
+ 2.1. What happend with the old “nat_flag� module parameter?
|
|
|
+ 2.2. What happend with the old “use_domain� module parameter?
|
|
|
+ 2.3. What happened with the old “save_noreply� and “save_memory�
|
|
|
functions?
|
|
|
|
|
|
2.4. Where can I find more about Kamailio?
|
|
@@ -1096,23 +1116,23 @@ Chapter 2. Frequently Asked Questions
|
|
|
|
|
|
2.1.
|
|
|
|
|
|
- What happend with the old "nat_flag" module parameter?
|
|
|
+ What happend with the old “nat_flag� module parameter?
|
|
|
|
|
|
In was removed, as the module internally loads this value from the
|
|
|
- "USRLOC" module (see the "nat_bflag" USRLOC parameter).
|
|
|
+ “USRLOC� module (see the “nat_bflag� USRLOC parameter).
|
|
|
|
|
|
2.2.
|
|
|
|
|
|
- What happend with the old "use_domain" module parameter?
|
|
|
+ What happend with the old “use_domain� module parameter?
|
|
|
|
|
|
In was removed, as the module internally loads this option from the
|
|
|
- "USRLOC" module. This was done in order to simplify the configuration.
|
|
|
+ “USRLOC� module. This was done in order to simplify the configuration.
|
|
|
|
|
|
2.3.
|
|
|
|
|
|
- What happened with the old "save_noreply" and "save_memory" functions?
|
|
|
+ What happened with the old “save_noreply� and “save_memory� functions?
|
|
|
|
|
|
- There functions were merged into the new "save(domain,flags)"
|
|
|
+ There functions were merged into the new “save(domain,flags)�
|
|
|
functions. If a reply should be sent or if the DB should be updated
|
|
|
also is controlled via the flags.
|
|
|
|