FreeSWITCH is hosted by SignalWire https://signalwire.com Please see our github page at: https://github.com/signalwire/freeswitch
freeswitch / mod_janus Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
FreeSWITCH is hosted by SignalWire https://signalwire.com Please see our github page at: https://github.com/signalwire/freeswitch
It would be nice if mod_janus could support a websocket transport to Janus as well as the existing HTTP transport.
This will require a major re-factor so I will not get around to it in the immediate future.
Currently mod_janus ignores trickle messages from Janus, hence trickle-ICE connections will not succeed. Janus must be configured so that trickle-ICE is not used.
We should really handle the trickle messages.
Interim solution is to set the full-trickle
command line flag to Janus.
Hi there, just gave Freeswitch and this plugin a first try, and it both gives a great experience for a developer. Thank you!
Is your feature request related to a problem? Please describe.
We deploy janus horizontally, depending on the load our users generate. At the moment I start Freeswitch, I do not know yet, which servers will be relevant or even exist for using mod_janus. Use case is obvious: joining a video conference via PSTN.
Describe the solution you'd like
It would be awesome if I could just reload the janus.conf.xml by api or if it would load it periodically the file. Or if I could add and remove servers through the api. I'd just need some kind of hot reload so I can add and remove servers dynamically.
Describe alternatives you've considered
I tried "reload mod_janus" but since I simulated a running call, It was not possible to unload and load the module because it is locked (and I obviously don't want to stop any running calls). I also looked into the code but did not find any hints how a mechanism could look like if there is one.
Additional context
Did I miss something? Is there any given mechanism in Freeswitch or in the module how I could accomplish this task? Or is this a use case nonsense from your point-of-view?
Thank you!
Kinds regards,
Max
Hi,
I'm trying to install your module in my freeswitch project but I can't. I get this error on make mod_janus-install
:
WARNING mod_janus is not a valid FreeSWITCH module dir, skipping it...
Installations steps :
1- Clone your project into freeswitch in /usr/src/freeswitch
, I named 'mod_janus' (git clone https://github.com/freeswitch/mod_janus.git -b master
)
2- Update the modules.conf, I add this row :
....
say/mod_say_en
....
/usr/src/freeswitch/mod_janus
3- Run this command make mod_janus
, I get this result :
make: 'mod_janus' is up to date.
4- By Running this command make mod_janus-install
, I get this warning :
make[1]: Entering directory '/usr/src/freeswitch'
/bin/mkdir -p '/usr/local/freeswitch/lib'
/bin/bash /usr/src/freeswitch/libtool --mode=install /usr/bin/install -c libfreeswitch.la '/usr/local/freeswitch/lib'
libtool: install: /usr/bin/install -c .libs/libfreeswitch.so.1.0.0 /usr/local/freeswitch/lib/libfreeswitch.so.1.0.0
libtool: install: (cd /usr/local/freeswitch/lib && { ln -s -f libfreeswitch.so.1.0.0 libfreeswitch.so.1 || { rm -f libfreeswitch.so.1 && ln -s libfreeswitch.so.1.0.0 libfreeswitch.so.1; }; })
libtool: install: (cd /usr/local/freeswitch/lib && { ln -s -f libfreeswitch.so.1.0.0 libfreeswitch.so || { rm -f libfreeswitch.so && ln -s libfreeswitch.so.1.0.0 libfreeswitch.so; }; })
libtool: install: /usr/bin/install -c .libs/libfreeswitch.lai /usr/local/freeswitch/lib/libfreeswitch.la
libtool: install: /usr/bin/install -c .libs/libfreeswitch.a /usr/local/freeswitch/lib/libfreeswitch.a
libtool: install: chmod 644 /usr/local/freeswitch/lib/libfreeswitch.a
libtool: install: ranlib /usr/local/freeswitch/lib/libfreeswitch.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/sbin" ldconfig -n /usr/local/freeswitch/lib
----------------------------------------------------------------------
Libraries have been installed in:
/usr/local/freeswitch/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to '/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[1]: Leaving directory '/usr/src/freeswitch'
make[1]: Entering directory '/usr/src/freeswitch/src/mod'
Makefile:704: target 'mod_janus-all' given more than once in the same rule
Makefile:704: target 'mod_janus-clean' given more than once in the same rule
Makefile:704: target 'mod_janus-install' given more than once in the same rule
Makefile:704: target 'mod_janus-uninstall' given more than once in the same rule
WARNING mod_janus is not a valid FreeSWITCH module dir, skipping it...
make[1]: Leaving directory '/usr/src/freeswitch/src/mod'
Any help :( ?
PS :
1- I can't even run make mod_janus
successfully If I add the row mod_janus|https://github.com/freeswitch/mod_janus.git -b master
=> It's not recognized
2- I'm using Freeswitch - version 1.10.3
I would recommend using libks for json code, and if you switch to use websockets it has an implementation for that as well.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.