#### Pre-Submission Checklist
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
- [ ] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
added
1. $siptrace(src_addr)
2. $siptrace(src_host)
3. $siptrace(src_port)
4. $siptrace(src_proto)
5. $siptrace(dst_addr)
6. $siptrace(dst_host)
7. $siptrace(dst_port)
8. $siptrace(dst_proto)
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2777
-- Commit Summary --
* siptrace: added extra params to $siptrace() pseudo-variable
-- File Changes --
M src/modules/siptrace/siptrace.c (74)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2777.patchhttps://github.com/kamailio/kamailio/pull/2777.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2777
Module: kamailio
Branch: master
Commit: a5997c29468efabb5a7745bc5b1c99c0f9eb8999
URL: https://github.com/kamailio/kamailio/commit/a5997c29468efabb5a7745bc5b1c99c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-06-21T08:12:15+02:00
secsipid: docs for secsipid_sign()
---
Modified: src/modules/secsipid/doc/secsipid_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/a5997c29468efabb5a7745bc5b1c99c…
Patch: https://github.com/kamailio/kamailio/commit/a5997c29468efabb5a7745bc5b1c99c…
---
diff --git a/src/modules/secsipid/doc/secsipid_admin.xml b/src/modules/secsipid/doc/secsipid_admin.xml
index 28f3dce68a..cc9c6c9fdf 100644
--- a/src/modules/secsipid/doc/secsipid_admin.xml
+++ b/src/modules/secsipid/doc/secsipid_admin.xml
@@ -397,6 +397,39 @@ request_route {
...
}
...
+</programlisting>
+ </example>
+ </section>
+ <section id="secsipid.f.secsipid_sign">
+ <title>
+ <function moreinfo="none">secsipid_sign(sheaders, spaypload, keyPath)</function>
+ </title>
+ <para>
+ Build Identity value using the key specified by "keyPath" to sign the JWT body.
+ The sheaders and spayload have to be string representation of JSON
+ headers and payload to be signed. On success, the Indentity value is
+ stored in variable $secsipid(val). It also sets $secsipid(ret) to
+ the return value of the libsecsipid functions.
+ </para>
+ <para>
+ The parameters can contain pseudo-variables.
+ </para>
+ <para>
+ This function can be used from ANY_ROUTE.
+ </para>
+ <example>
+ <title><function>secsipid_sign</function> usage</title>
+ <programlisting format="linespecific">
+...
+request_route {
+ ...
+ if(secsipid_sign("_JSON_HEADERS_", "_JSON_PAYLOAD_",
+ "/secsipid/$rd/key.pem")) {
+ xinfo("Identity value: $secsipid(val)\n");
+ }
+ ...
+}
+...
</programlisting>
</example>
</section>
greetings all:
I have long believed that VOIP and SIP will not reach their full
potential until SIP servers can route calls to other SIP servers without
having to go through the ancient telephone system, and pay their tolls.
There is nothing of substance preventing any SIP server from calling
numbers at any other SIP server. They just need to know which numbers
are hosted on which servers. There have been several attempts to resolve
this issue: freenum.org, e164,org, Dundi (for asterisk). All appear to
be dead at this time.
I think that one of the reasons for these failures was that all of these
systems relied on the public DNS system to exchange server location
info. Putting your SIP server address on a public system and advertising
that this is the IP of a SIP server is simply begging for hackers to
attempt to breach your SIP server. Its like painting a big target on
your back.
We at Xantek have been working on an alternate approach, using AGI calls
and responses to identify routing info. This approach allows us to limit
server identification to registered users of the system, and registered
users will have to provide identification (something that hackers
probably won't do).
We also are incorporating a PIN number into the dial string, so that
recipients are aware that the call is coming from a valid user. The PIN
can be easily changed if fraudulent activity is suspected.
We have a working model for Asterisk set up (see voipconnect.tel for
details), but we would like to expand into the Kamailio-verse. What we
need is a few Kamailio experts to help with the development of the
system on Kamailio. If you have any interest in helping, please reply to
this post.
TIA, Bill
Module: kamailio
Branch: master
Commit: 6822bde4dc4715043d3d416b710664e5b14637b8
URL: https://github.com/kamailio/kamailio/commit/6822bde4dc4715043d3d416b710664e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-06-18T14:06:42+02:00
secsipid: docs for secsipid_check(...) function
---
Modified: src/modules/secsipid/doc/secsipid_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/6822bde4dc4715043d3d416b710664e…
Patch: https://github.com/kamailio/kamailio/commit/6822bde4dc4715043d3d416b710664e…
---
diff --git a/src/modules/secsipid/doc/secsipid_admin.xml b/src/modules/secsipid/doc/secsipid_admin.xml
index bc1a8ac332..28f3dce68a 100644
--- a/src/modules/secsipid/doc/secsipid_admin.xml
+++ b/src/modules/secsipid/doc/secsipid_admin.xml
@@ -266,6 +266,45 @@ request_route {
</programlisting>
</example>
</section>
+ <section id="secsipid.f.secsipid_check">
+ <title>
+ <function moreinfo="none">secsipid_check(sIdentity, keyPath)</function>
+ </title>
+ <para>
+ Check the validity of the "sIdentity" parameter using the keys stored
+ in the file specified by "keyPath". If the keyPath parameter is empty,
+ the function is downloading the key using the URL from "info"
+ parameter of the sIdentity, using the value of "timeout"
+ parameter to limit the download time. The validity of the JWT
+ in the sIdentity value is also checked against the "expire"
+ parameter.
+ </para>
+ <para>
+ The parameters can contain pseudo-variables.
+ </para>
+ <para>
+ This function can be used from ANY_ROUTE.
+ </para>
+ <example>
+ <title><function>secsipid_check</function> usage</title>
+ <programlisting format="linespecific">
+...
+request_route {
+ ...
+ if(secsipid_check_identity("...", "/secsipid/$si/cert.pem")) { ... }
+ ...
+ if(secsipid_check_identity("...", "")) { ... }
+ ...
+}
+...
+</programlisting>
+ </example>
+ <para>
+ Further checks can be done with config operations, decoding the JWT header
+ and payload using {s.select} and {s.decode.base64t} transformations
+ together with jansson module.
+ </para>
+ </section>
<section id="secsipid.f.secsipid_get_url">
<title>
<function moreinfo="none">secsipid_get_url(url, ovar)</function>
### Description
Thank you for implementing #2413, I'm looking forward to use it.
I was trying it on a dev system. It works fine when the same TLS client needs to be selected for ALL connections.
Having issue with it when connection expected to alternate between multiple configured TLS clients.
When configured as bellow and event_route alternates between connections (like in logs bellow) connection is always using TLSc with one of the server-ids, e.g. "domain-02".
It looks like it's a race between setting server id in event_route and a "thread" that starts TLS client. In my observations only one TLS client is used.
Expecting: each outbound connection use TLSc as it was set by tls_set_connect_server_id().
```
event_route[tm:local-request] {
if (is_method("OPTIONS")) {
$var(contact) = "Contact: <sip:" + $fd + ":5061;transport=tls>\r\n";
append_hf("$var(contact)");
if ($fd == "domain-01") {
tls_set_connect_server_id("domain-01");
xlog("L_INFO", "ID=$ci|tls_set_connect_server_id(domain-01)\n");
} else if ($fd == "domain-02") {
tls_set_connect_server_id("domain-02");
xlog("L_INFO", "ID=$ci|tls_set_connect_server_id(domain-02)\n");
}
}
}
```
Dispatcher configured as:
```
loadmodule "dispatcher.so"
modparam("dispatcher", "list_file", "/etc/kamailio/dispatcher.list")
modparam("dispatcher", "ds_probing_mode", 1)
modparam("dispatcher", "ds_ping_interval", 60)
```
With records like:
```
1 sip:sip1.host.com;transport=tls 0 1 socket=tls:111.222.233.11:5061;ping_from=sip:my-domain-01.com
1 sip:sip2.host.com;transport=tls 0 2 socket=tls:111.222.233.12:5061;ping_from=sip:my-domain-01.com
1 sip:sip3.host.com;transport=tls 0 3 socket=tls:111.222.233.13:5061;ping_from=sip:my-domain-01.com
2 sip:sip1.host.com;transport=tls 0 1 socket=tls:111.222.233.21:5061;ping_from=sip:my-domain-02.com
2 sip:sip2.host.com;transport=tls 0 2 socket=tls:111.222.233.22:5061;ping_from=sip:my-domain-02.com
2 sip:sip3.host.com;transport=tls 0 3 socket=tls:111.222.233.23:5061;ping_from=sip:my-domain-02.com
```
#### Log Messages
```
Jun 3 11:57:44 INFO: <script>: ID=4eadda397f10fcb1-948(a)1.2.3.4|tls_set_connect_server_id(domain-02)
Jun 3 11:57:44 INFO: <script>: ID=4eadda397f10fcb2-948(a)1.2.3.4|tls_set_connect_server_id(domain-01)
Jun 3 11:57:44 INFO: <script>: ID=4eadda397f10fcb3-948(a)1.2.3.4|tls_set_connect_server_id(domain-02)
Jun 3 11:57:44 INFO: <script>: ID=4eadda397f10fcb4-948(a)1.2.3.4|tls_set_connect_server_id(domain-01)
Jun 3 11:57:44 INFO: <script>: ID=4eadda397f10fcb5-948(a)1.2.3.4|tls_set_connect_server_id(domain-02)
Jun 3 11:57:44 INFO: <script>: ID=4eadda397f10fcb6-948(a)1.2.3.4|tls_set_connect_server_id(domain-01)
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.5.0 (x86_64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 7.5.0
```
* **Operating System**:
```
Linux dev03 4.15.0-143-generic #147-Ubuntu SMP Wed Apr 14 16:10:11 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Ubuntu 18.04.5 LTS
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2760
Module: kamailio
Branch: master
Commit: e87fd9ce381c73d3733c38812c86e467cf966089
URL: https://github.com/kamailio/kamailio/commit/e87fd9ce381c73d3733c38812c86e46…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2021-06-17T16:46:24+02:00
modules: readme files regenerated - secsipid ... [skip ci]
---
Modified: src/modules/secsipid/README
---
Diff: https://github.com/kamailio/kamailio/commit/e87fd9ce381c73d3733c38812c86e46…
Patch: https://github.com/kamailio/kamailio/commit/e87fd9ce381c73d3733c38812c86e46…
---
diff --git a/src/modules/secsipid/README b/src/modules/secsipid/README
index 004d376fb4..5e07580ddf 100644
--- a/src/modules/secsipid/README
+++ b/src/modules/secsipid/README
@@ -41,6 +41,9 @@ Daniel-Constantin Mierla
4.4. secsipid_add_identity(origTN, destTN, attest, origID,
x5u, keyPath)
+ 4.5. secsipid_build_identity(origTN, destTN, attest, origID,
+ x5u, keyPath)
+
5. Installation
List of Examples
@@ -55,7 +58,8 @@ Daniel-Constantin Mierla
1.8. secsipid_check_identity_pubkey usage
1.9. secsipid_get_url usage
1.10. secsipid_add_identity usage
- 1.11. Libsecsipid Usage
+ 1.11. secsipid_build_identity usage
+ 1.12. Libsecsipid Usage
Chapter 1. Admin Guide
@@ -84,6 +88,9 @@ Chapter 1. Admin Guide
4.4. secsipid_add_identity(origTN, destTN, attest, origID, x5u,
keyPath)
+ 4.5. secsipid_build_identity(origTN, destTN, attest, origID, x5u,
+ keyPath)
+
5. Installation
1. Overview
@@ -213,6 +220,9 @@ modparam("secsipid", "libopt", "CacheExpires=0")
4.4. secsipid_add_identity(origTN, destTN, attest, origID, x5u,
keyPath)
+ 4.5. secsipid_build_identity(origTN, destTN, attest, origID, x5u,
+ keyPath)
+
4.1. secsipid_check_identity(keyPath)
Check the validity of the Identity header using the keys stored in the
@@ -305,6 +315,35 @@ request_route {
}
...
+4.5. secsipid_build_identity(origTN, destTN, attest, origID, x5u, keyPath)
+
+ Build Identity value using the key specified by "keyPath" to sign the
+ JWT body. If origID is empty, a UUID string is generated to fill the
+ field. The origTN represents the origination telephone number; destTN
+ represents the destination telephone number; x5u is the HTTP URL
+ referencing to the public key that should be used to verify the
+ signature; attest represents the attestation level (should be "A", "B"
+ or "C"). On success, the Indentity value is stored in variable
+ $secsipid(val). It also sets $secsipid(ret) to the return value of the
+ libsecsipid functions.
+
+ The parameters can contain pseudo-variables.
+
+ This function can be used from ANY_ROUTE.
+
+ Example 1.11. secsipid_build_identity usage
+...
+request_route {
+ ...
+ if(secsipid_build_identity("$fU", "$rU", "A", "",
+ "https://kamailio.org/stir/$rd/cert.pem", "/secsipid/$rd/key.pem"))
+{
+ xinfo("Identity value: $secsipid(val)\n");
+ }
+ ...
+}
+...
+
5. Installation
The module needs "secsipdi_proc.so" module that depends on
@@ -319,7 +358,7 @@ request_route {
installed and its environment configured, then run the following
commands:
- Example 1.11. Libsecsipid Usage
+ Example 1.12. Libsecsipid Usage
...
export GO111MODULE=off
go get https://github.com/asipto/secsipidx
Module: kamailio
Branch: master
Commit: cf82852199f1fee7ee01e4a25d5e79a2ab1bbf8d
URL: https://github.com/kamailio/kamailio/commit/cf82852199f1fee7ee01e4a25d5e79a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-06-17T16:35:55+02:00
secsipid: docs for secsipid_build_identity(...) function
---
Modified: src/modules/secsipid/doc/secsipid_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/cf82852199f1fee7ee01e4a25d5e79a…
Patch: https://github.com/kamailio/kamailio/commit/cf82852199f1fee7ee01e4a25d5e79a…
---
diff --git a/src/modules/secsipid/doc/secsipid_admin.xml b/src/modules/secsipid/doc/secsipid_admin.xml
index 527db1aecf..bc1a8ac332 100644
--- a/src/modules/secsipid/doc/secsipid_admin.xml
+++ b/src/modules/secsipid/doc/secsipid_admin.xml
@@ -322,6 +322,42 @@ request_route {
...
}
...
+</programlisting>
+ </example>
+ </section>
+ <section id="secsipid.f.secsipid_build_identity">
+ <title>
+ <function moreinfo="none">secsipid_build_identity(origTN, destTN, attest, origID, x5u, keyPath)</function>
+ </title>
+ <para>
+ Build Identity value using the key specified by "keyPath" to sign the JWT body.
+ If origID is empty, a UUID string is generated to fill the field. The origTN
+ represents the origination telephone number; destTN represents the destination
+ telephone number; x5u is the HTTP URL referencing to the public key that
+ should be used to verify the signature; attest represents the attestation
+ level (should be "A", "B" or "C"). On success, the Indentity value is
+ stored in variable $secsipid(val). It also sets $secsipid(ret) to
+ the return value of the libsecsipid functions.
+ </para>
+ <para>
+ The parameters can contain pseudo-variables.
+ </para>
+ <para>
+ This function can be used from ANY_ROUTE.
+ </para>
+ <example>
+ <title><function>secsipid_build_identity</function> usage</title>
+ <programlisting format="linespecific">
+...
+request_route {
+ ...
+ if(secsipid_build_identity("$fU", "$rU", "A", "",
+ "https://kamailio.org/stir/$rd/cert.pem", "/secsipid/$rd/key.pem")) {
+ xinfo("Identity value: $secsipid(val)\n");
+ }
+ ...
+}
+...
</programlisting>
</example>
</section>
Hello,
Kamailio SIP Server v5.5.1 stable release is out.
This is a maintenance release of the latest stable branch, 5.5, that
includes fixes since the release of v5.5.0. There is no change to
database schema or configuration language structure that you have to do
on previous installations of v5.5.x. Deployments running previous v5.5.x
versions are strongly recommended to be upgraded to v5.5.1.
For more details about version 5.5.1 (including links and guidelines to
download the tarball or from GIT repository), visit:
 * https://www.kamailio.org/w/2021/06/kamailio-v5-5-1-released/
RPM, Debian/Ubuntu packages will be available soon as well.
Many thanks to all contributing and using Kamailio!
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda