freeswitch/mod_janus

mod_janus installation problem when Freeswitch has been installed using the official Debian packages

batbrain9392 opened this issue · 0 comments

Describe the bug
I have installed Freeswitch From the Debian packages. Now, I'm not sure how or where mod_janus should be installed.

To Reproduce
Steps to reproduce the behavior:
Run the following Dockerfile. No need to worry about the COPY commands, since build will fail before at make mod_janus -

FROM debian:bullseye-slim

ENV FREESWITCH_CONF_PATH=/etc/freeswitch
ARG TOKEN_SIGNALWIRE

RUN apt-get update && apt-get install -y gnupg2 wget lsb-release liblua5.3-dev
RUN wget --http-user=signalwire --http-password=${TOKEN_SIGNALWIRE} -O /usr/share/keyrings/signalwire-freeswitch-repo.gpg https://freeswitch.signalwire.com/repo/deb/debian-release/signalwire-freeswitch-repo.gpg
RUN echo "machine freeswitch.signalwire.com login signalwire password ${TOKEN_SIGNALWIRE}" > /etc/apt/auth.conf
RUN echo "deb [signed-by=/usr/share/keyrings/signalwire-freeswitch-repo.gpg] https://freeswitch.signalwire.com/repo/deb/debian-release/ `lsb_release -sc` main" > /etc/apt/sources.list.d/freeswitch.list
RUN echo "deb-src [signed-by=/usr/share/keyrings/signalwire-freeswitch-repo.gpg] https://freeswitch.signalwire.com/repo/deb/debian-release/ `lsb_release -sc` main" >> /etc/apt/sources.list.d/freeswitch.list
RUN apt-get update && apt-get install -y freeswitch-meta-all


WORKDIR /freeswitch-external-modules

RUN apt-get install -y git make
RUN git clone https://github.com/freeswitch/mod_janus.git && \
  cd mod_janus && \
  make mod_janus && \
  make mod_janus-install

WORKDIR /

COPY ./config/event_socket.conf.xml  ${FREESWITCH_CONF_PATH}/autoload_configs/
COPY ./config/verto.conf.xml         ${FREESWITCH_CONF_PATH}/autoload_configs/
COPY ./config/modules.conf.xml       ${FREESWITCH_CONF_PATH}/autoload_configs/
COPY ./config/janus.conf.xml         ${FREESWITCH_CONF_PATH}/autoload_configs/
COPY ./config/00_inbound.xml         ${FREESWITCH_CONF_PATH}/dialplan/default/
COPY ./config/conference_test.lua    ${FREESWITCH_CONF_PATH}/scripts/

EXPOSE 5060/udp
EXPOSE 8021
CMD [ "freeswitch", "-nonat", "-nf" ]

# docker build -t my-demo/freeswitch . --build-arg TOKEN_SIGNALWIRE=<your_signalwire_token>
# docker run -d --rm --network my-network -p 5060:5060/udp -p 8021:8021 --name my-freeswitch my-demo/freeswitch

Error log

> git clone https://github.com/freeswitch/mod_janus.git && cd mod_janus && make mod_janus && make mod_janus-install

Cloning into 'mod_janus'...
cc     mod_janus.c   -o mod_janus
mod_janus.c:36:10: fatal error: switch.h: No such file or directory
   36 | #include "switch.h"
      |          ^~~~~~~~~~
compilation terminated.
make: *** [<builtin>: mod_janus] Error 1