Hi I am using kamailio server to forward the request to a new
kamailio-server which listens only on TLS.
*problem: Not able to specify the dispatcher with tls protocol*
I am using the below configuration in dispatcher.list
kamailio version:4.4.2
*# setid(integer) destination(sip uri) flags (integer, optional),
priority(int,opt), attrs (str,optional)1 sip:mynetwork.com
<http://mynetwork.com/>;transport=tls 8 1 socket=tls:mynetwork.com:5328
<http://mynetwork.com:5328/>*
and if I specify the destination as just sip:mynetwork.com:5328 with out
attrs and transport=tls if is falling back to UDP.
Thank you
vinod.M.N
(adding sr-dev list to CC)
Hi Michael,
small general addition - you are probably already aware of this
documentation:
https://www.asipto.com/pub/kamailio-devel-guide/
There is work going on right now to update it, it needs also some
extensions, e.g. for the PV core functions.
Cheers,
Henning
Am 13.12.19 um 19:10 schrieb Michael Iedema:
> Hi all,
>
> I’m trying to write a basic Kamailio module from scratch and have run into an area where I’m in need of a couple pointers (pun not intended). :-) I have the module loading correctly and can call a function in my routing script like this:
>
> mymod_getinfo(“5551234”);
>
> This, for now, just triggers a print of the submitted parameter.
>
> What I’d like to do next is have it accept and print the From URI in configuration script like so:
>
> mymod_getinfo(“$fU”);
>
> For now, this prints the string literal of “$fU” and I’m trying to extract the value of the referenced variable and print that. The example module “print” does not involve this concept of pseudo-variables. The skeleton module example in the wiki also does not mention variables.
>
> I’ve looked into other modules to see how it works but they all seem to have a slightly different handling of this task. Can someone point me to an example in the modules which accomplishes this?
>
> What I’ve been searching for is a replace_all function which accepts a string containing pseudo-variables and returns a new string with them all replaced with their corresponding values.
>
> Thanks in advance and apologies if I’ve overlooked a relevant piece of developer documentation or if I’m looking at this incorrectly.
>
> Regards,
> -Michael
>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users(a)lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Kamailio Merchandising - https://skalatan.de/merchandising/
Kamailio services - https://skalatan.de/services
Henning Westerholt - https://skalatan.de/blog/
Module: kamailio
Branch: master
Commit: 36d941442496a51e265bdb96362624b667a40132
URL: https://github.com/kamailio/kamailio/commit/36d941442496a51e265bdb96362624b…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2019-12-13T18:46:09+01:00
modules: readme files regenerated - dispatcher ... [skip ci]
---
Modified: src/modules/dispatcher/README
---
Diff: https://github.com/kamailio/kamailio/commit/36d941442496a51e265bdb96362624b…
Patch: https://github.com/kamailio/kamailio/commit/36d941442496a51e265bdb96362624b…
---
diff --git a/src/modules/dispatcher/README b/src/modules/dispatcher/README
index 6929bfaf84..7408b51713 100644
--- a/src/modules/dispatcher/README
+++ b/src/modules/dispatcher/README
@@ -1295,24 +1295,24 @@ if(ds_list_exists("10")) {
Description of parameters:
* groupid (optional) - if not given or its value is -1, the matching
- will be done over all addresses in all dispacher groups. Otherwise
+ will be done over all addresses in all dispatcher groups. Otherwise
the matching will be done only against the addresses in the
specific group id. The parameter can be an integer or a variable
holding an integer value.
* mode - (optional) - a bitmask to specify how the matching should be
- done. If is 0, all ip, port and proto are matched and active status
- is ignored. If bit one is set, then port is ignored. If bit two is
- set, then protocol is ignored. If bit three is set, then state must
- be active. The parameter can be an integer or a variable holding an
- integer value. It must be provided if the uri parameter is
- provided.
- * uri (optional) - if is empty or missing, the matching is done
- against source IP, port and protocol. Otherwise the value has to be
- a valid SIP URI, used to match against addresses in the dispatcher
- list. Only IP, port and protocol are matches, any additional
- parameters are ignored. The parameter can be a static or dynamic
- (with variables) string. The domain part of the URI can be an IP
- address or a hostname.
+ done. If parameter is 0, all ip, port and proto are matched and
+ active status is ignored. If bit one is set, then port is ignored.
+ If bit two is set, then protocol is ignored. If bit three is set,
+ then state must be active. The parameter can be an integer or a
+ variable holding an integer value. It must be provided if the uri
+ parameter is provided.
+ * uri (optional) - if parameter is empty or missing, the matching is
+ done against source IP, port and protocol. Otherwise the value has
+ to be a valid SIP URI, used to match against addresses in the
+ dispatcher list. Only IP, port and protocol are matches, any
+ additional parameters are ignored. The parameter can be a static or
+ dynamic (with variables) string. The domain part of the URI can be
+ an IP address or a hostname.
Upon a match, the variable specified by 'setid_pvname' parameter will
be set to groupid of matching address and the attributes will be set in
Module: kamailio
Branch: master
Commit: da115fae61f5e1aa5e29edd4a7a9e5a9bcd291f0
URL: https://github.com/kamailio/kamailio/commit/da115fae61f5e1aa5e29edd4a7a9e5a…
Author: Mikko Lehto <mslehto(a)iki.fi>
Committer: Mikko Lehto <mslehto(a)iki.fi>
Date: 2019-12-13T19:37:21+02:00
dispatcher: Minor documentation improvement for ds_is_from_list()
---
Modified: src/modules/dispatcher/doc/dispatcher_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/da115fae61f5e1aa5e29edd4a7a9e5a…
Patch: https://github.com/kamailio/kamailio/commit/da115fae61f5e1aa5e29edd4a7a9e5a…
---
diff --git a/src/modules/dispatcher/doc/dispatcher_admin.xml b/src/modules/dispatcher/doc/dispatcher_admin.xml
index 87a7735b1d..4c9430a630 100644
--- a/src/modules/dispatcher/doc/dispatcher_admin.xml
+++ b/src/modules/dispatcher/doc/dispatcher_admin.xml
@@ -1568,14 +1568,14 @@ if(ds_list_exists("10")) {
<listitem>
<para><emphasis>groupid</emphasis> (optional) - if not given or its
value is -1, the matching will be done over all addresses in
- all dispacher groups. Otherwise the matching will be done only
+ all dispatcher groups. Otherwise the matching will be done only
against the addresses in the specific group id. The parameter
can be an integer or a variable holding an integer value.
</para>
</listitem>
<listitem>
<para><emphasis>mode</emphasis> - (optional) - a bitmask to specify
- how the matching should be done. If is 0, all ip, port and
+ how the matching should be done. If parameter is 0, all ip, port and
proto are matched and active status is ignored.
If bit one is set, then port is ignored.
If bit two is set, then protocol is ignored.
@@ -1585,7 +1585,7 @@ if(ds_list_exists("10")) {
</para>
</listitem>
<listitem>
- <para><emphasis>uri</emphasis> (optional) - if is empty or missing,
+ <para><emphasis>uri</emphasis> (optional) - if parameter is empty or missing,
the matching is done against source IP, port and protocol.
Otherwise the value has to be a valid SIP URI, used to match
against addresses in the dispatcher list. Only IP, port and
Module: kamailio
Branch: master
Commit: 9ddef1571c5508f2b12614d3cebac4368609a498
URL: https://github.com/kamailio/kamailio/commit/9ddef1571c5508f2b12614d3cebac43…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-12-13T16:14:04+01:00
rr: docs for rr_next_hop_route() function
---
Modified: src/modules/rr/doc/rr_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/9ddef1571c5508f2b12614d3cebac43…
Patch: https://github.com/kamailio/kamailio/commit/9ddef1571c5508f2b12614d3cebac43…
---
diff --git a/src/modules/rr/doc/rr_admin.xml b/src/modules/rr/doc/rr_admin.xml
index 362edd4f1f..01bee1b451 100644
--- a/src/modules/rr/doc/rr_admin.xml
+++ b/src/modules/rr/doc/rr_admin.xml
@@ -649,6 +649,35 @@ if (is_direction("downstream")) {
</programlisting>
</example>
</section>
+
+ <section id="rr.f.rr_next_hop_route">
+ <title><function moreinfo="none">rr_next_hop_route()</function></title>
+
+ <para>The function returns 1 (true) if there is a Route header for the
+ next hop address. It has to be used after loose_route(), when the
+ local Route headers are processed.
+ </para>
+
+ <para>
+ This function can be used from ANY_ROUTE.
+ </para>
+
+ <example>
+ <title><function>rr_next_hop_route</function> usage</title>
+
+ <programlisting format="linespecific">
+...
+if(loose_route) {
+ if(rr_next_hop_route()) {
+ # next hop address is from Route header
+ }
+
+}
+...
+</programlisting>
+ </example>
+ </section>
+
</section>
<section>