<!-- Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment). -->
### Description
``` apt install kamailio kamailio-*
find /usr/lib/x86_64-linux-gnu/kamailio/modules -name jwt.so
and nothing.
``` <!--
-->
### Troubleshooting
#### Reproduction
<!-- If the issue can be reproduced, describe how it can be done. -->
#### Debugging Data
<!-- If you got a core dump, use gdb to extract troubleshooting data - full backtrace, local variables and the list of the code at the issue location.
gdb /path/to/kamailio /path/to/corefile bt full info locals list
If you are familiar with gdb, feel free to attach more of what you consider to be relevant. -->
``` (paste your debugging data here) ```
#### Log Messages
<!-- Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site). -->
``` (paste your log messages here) ```
#### SIP Traffic
<!-- If the issue is exposed by processing specific SIP messages, grab them with ngrep or save in a pcap file, then add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site). -->
``` (paste your sip traffic here) ```
### Possible Solutions
<!-- If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix. -->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
``` kamailio5.5.2 ```
* **Operating System**:
<!-- Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...; Kernel details (output of `lsb_release -a` and `uname -a`) -->
``` debian10 ```
Maybe @linuxmaniac can comment on it -- not sure if the required library is available or simply not added to packaging.
from the README at src/modules/jwt ``` 2.2. External Libraries or Applications
The following libraries or applications must be installed before running Kamailio with this module loaded: * libjwt - minimum version 1.12.0. ``` https://packages.debian.org/search?keywords=libjwt
1.10.2-1 is the last version packaged
Closed #2883.
@hance2010 How did you fix this? I am having the same issue:
``` $ kamailio -v version: kamailio 5.5.3 (x86_64/linux) 315b22 .... ```
``` $ apt list libjwt* libjwt-dev/testing,now 1.12.0-1~bullseye-bullseye amd64 [installed] libjwt-gnutls-dev/stable 1.10.2-1 amd64 libjwt-gnutls0/stable 1.10.2-1 amd64 libjwt0-dbgsym/testing 1.12.0-1~bullseye-bullseye amd64 libjwt0/testing,now 1.12.0-1~bullseye-bullseye amd64 [installed,automatic] ```
OS: Debian 11
jwt is not on debian packages unfortunately:

so, it won't magically appear when you just install libjwt as they state above. you can compile kamailio on deb11 and then move the jwt.so to your production until they notice this and add it to deb packaging finally.
here is a builder for buster:
``` # build JWT FROM debian:buster-slim AS jwt
RUN sed -i 's/httpredir/deb/g' /etc/apt/sources.list # build tools RUN rm -rf /var/lib/apt/lists/* && \ apt-get update && \ apt-get install --assume-yes gnupg wget git gcc g++ make flex bison autoconf pkg-config libssl-dev unzip libtool check
# libjansson & libjwt RUN apt-get install --assume-yes libjansson-dev && \ cd /usr/local/src && \ wget https://github.com/benmcollins/libjwt/archive/refs/tags/v1.12.1.zip && \ unzip v1.12.1.zip && \ cd libjwt-1.12.1 && \ autoreconf -i && \ ./configure && \ make all && \ make check && \ make install
# kam compile RUN mkdir -p /usr/local/src/kamailio-5.5 && \ cd /usr/local/src/kamailio-5.5 && \ git clone --depth 1 --no-single-branch https://github.com/kamailio/kamailio kamailio && \ cd kamailio && \ git checkout -b 5.5 origin/5.5 && \ make PREFIX="/usr/local/kamailio-5.5" include_modules="jwt" cfg && \ make Q=0 all && \ make install
# copy files from: # /usr/local/lib/libjwt.so* # /usr/local/src/kamailio-5.5/kamailio/src/modules/jwt/jwt.so => /usr/lib/x86_64-linux-gnu/kamailio/modules/ ```
notice no need to copy libjansson, assuming kamailio installed it for other json modules.
e.g. if you do a multi-stage: ``` COPY --from=jwt /usr/local/lib/libjwt.so* /usr/lib/x86_64-linux-gnu/ COPY --from=jwt /usr/local/src/kamailio-5.5/kamailio/src/modules/jwt/jwt.so /usr/lib/x86_64-linux-gnu/kamailio/modules/ ```
Sweet. Thanks. I ended up compiling Kamailio with the jwt module as you mentioned.
Thanks for the script @bmlkc !