Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,20 @@ Release/
/libs/libcodec2/unittest/Makefile.in
/libs/mpg123-1.13.2/
/libs/spandsp/src/cielab_luts.h
/dll
/test
/libs/libbfcp/bfcpmsg/*.o
/libs/libbfcp/bfcpmsg/*.obj
/libs/libbfcp/bfcpmsg/libbfcp*
/libs/libbfcp/bfcpmsg/testcode*
/libs/libbfcp/bfcpsrvclt/bfcpclt/*.o
/libs/libbfcp/bfcpsrvclt/bfcpclt/*.obj
/libs/libbfcp/bfcpsrvclt/bfcpclt/libbfcp*
/libs/libbfcp/bfcpsrvclt/bfcpclt/bfcp_participant
/libs/libbfcp/bfcpsrvclt/bfcpsrv/*.o
/libs/libbfcp/bfcpsrvclt/bfcpsrv/*.obj
/libs/libbfcp/bfcpsrvclt/bfcpsrv/libbfcp*
/libs/libbfcp/bfcpsrvclt/bfcpsrv/bfcp_server
/scripts/fsxs
/scripts/gentls_cert

Expand Down
1 change: 1 addition & 0 deletions build/modules.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
applications/mod_av
#applications/mod_avmd
#applications/mod_bert
applications/mod_bfcp
#applications/mod_blacklist
#applications/mod_callcenter
#applications/mod_cidlookup
Expand Down
24 changes: 24 additions & 0 deletions conf/vanilla/autoload_configs/bfcp.conf.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

<configuration name="bfcp.conf" description="bfcp applications">
<settings>
<!-- Port for bfcp-server (TCP) -->
<param name="bfcp-port" value="20000"/>

<!-- Maximum number of allowed concurrent conferences in a server -->
<param name="max-conference-per-server" value="1000"/>

<!-- Maximum number of floor in a conference -->
<param name="max-floor-per-conference" value="10"/>

<!-- Maximum number of requests a user can make for the same floor -->
<param name="max-floor-request-per-floor" value="5"/>

<!-- Time in seconds the system will wait for a ChairAction: (0 for default number) -->
<param name="wait-time-chair-action" value="120"/>

<!-- transport will be used to start the bfcp-server (0 for TCP/BFCP, 1 for TCP/TLS/BFCP) -->
<param name="bfcp-transport-tcp" value="0"/>
<!-- To open UDP connection for BFCP Server (0 -> No, 1 -> Yes) -->
<param name="bfcp-transport-udp" value="1"/>
</settings>
</configuration>
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1853,6 +1853,7 @@ AC_CONFIG_FILES([Makefile
src/mod/applications/mod_abstraction/Makefile
src/mod/applications/mod_avmd/Makefile
src/mod/applications/mod_bert/Makefile
src/mod/applications/mod_bfcp/Makefile
src/mod/applications/mod_blacklist/Makefile
src/mod/applications/mod_callcenter/Makefile
src/mod/applications/mod_cidlookup/Makefile
Expand Down
2 changes: 1 addition & 1 deletion freeswitch.spec
Original file line number Diff line number Diff line change
Expand Up @@ -1498,7 +1498,7 @@ export QA_RPATHS=$[ 0x0001|0x0002 ]
######################################################################################################################
APPLICATION_MODULES_AC="applications/mod_abstraction applications/mod_avmd applications/mod_blacklist \
applications/mod_callcenter applications/mod_cidlookup \
applications/mod_commands applications/mod_conference applications/mod_curl"
applications/mod_commands applications/mod_conference applications/mod_curl applications/mod_bfcp"
APPLICATION_MODULES_DE="applications/mod_db applications/mod_directory applications/mod_distributor \
applications/mod_dptools applications/mod_easyroute applications/mod_enum applications/mod_esf \
applications/mod_expr "
Expand Down
15 changes: 15 additions & 0 deletions libs/libbfcp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/dll
/test
/bfcpmsg/*.o
/bfcpmsg/*.obj
/bfcpmsg/libbfcp*
/bfcpmsg/testcode*
/bfcpsrvclt/bfcpclt/*.o
/bfcpsrvclt/bfcpclt/*.obj
/bfcpsrvclt/bfcpclt/libbfcp*
/bfcpsrvclt/bfcpclt/bfcp_participant
/bfcpsrvclt/bfcpsrv/*.o
/bfcpsrvclt/bfcpsrv/*.obj
/bfcpsrvclt/bfcpsrv/libbfcp*
/bfcpsrvclt/bfcpsrv/bfcp_server
*~
502 changes: 502 additions & 0 deletions libs/libbfcp/COPYING

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions libs/libbfcp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
BFCP message/client/server libraries
====================================

This repository contains a set of libraries implementing different aspects of the BFCP ([Binary Floor Control Protocol](https://tools.ietf.org/html/rfc4582)), specifically:

* `bfcpmsg`: a library to implement parsing/building capabilities for the protocol;
* `bfcpclt`: a library to implement the client side of the protocol;
* `bfcpsrv`: a library to implement the server side of the protocol.

The libraries were originally implemented by Lorenzo Miniero (University of Napoli Federico II) and Oscar Novo (Ericsson), and are now hosted in a [Meetecho](http://www.meetecho.com) repository to make them more easily accessible.

The license for all libraries is LGPL 2.1 ([GNU Lesser General Public License v2.1](COPYING)).

**NOTE WELL**: This code is _unmantained_. We're not going to address issues or pull requests.
49 changes: 49 additions & 0 deletions libs/libbfcp/bfcpmsg/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
PREFIX = /usr
CC = gcc
CC_W32 = i686-pc-mingw32-gcc
OBJS = bfcp_messages.o bfcp_messages_build.o bfcp_messages_parse.o bfcp_strings.o
OBJS_W32 = bfcp_messages.obj bfcp_messages_build.obj bfcp_messages_parse.obj bfcp_strings.obj
OPTS = -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -O2 -Werror -Wunused
LIBS = -lpthread
LIBS_W32 = -lws2_32 #-s
DEPS_W32 = -L./
WIN32 = -DWIN32
BASE = ../../..
INC = -I$(BASE)/src/include -I$(BASE)/libs/libteletone/src

so : $(OBJS)
$(CC) -ggdb -shared -Wl,-soname,libbfcpmsg.so.0 -o libbfcpmsg.so.0.0.7 $(OBJS) $(OPTS) $(LIBS)

%.o: %.c
$(CC) -fPIC -ggdb -c $(INC) $< -o $@ $(OPTS)

dll : $(OBJS_W32)
$(CC_W32) $(WIN32) -ggdb -shared -o libbfcpmsg.dll $(OBJS_W32) $(OPTS) $(DEPS_W32) $(LIBS_W32)

%.obj: %.c
$(CC_W32) $(WIN32) -ggdb -c $< -o $@ $(OPTS)

linux : testcode.o $(OBJS)
$(CC) -ggdb -o testcode testcode.o $(OBJS) $(OPTS) $(LIBS) -lbfcpmsg

win32 : testcode.obj $(OBJS_W32)
$(CC_W32) $(WIN32) -ggdb -o testcode.exe testcode.obj $(OBJS_W32) $(OPTS) $(DEPS_W32) $(LIBS_W32)

clean :
rm -f *.o *.obj libbfcp* testcode testcode.exe

install:
@echo Installing BFCP messages library to $(PREFIX)/lib/:
install -m 755 libbfcpmsg.so.0.0.7 $(PREFIX)/lib/
ln -sf $(PREFIX)/lib/libbfcpmsg.so.0.0.7 $(PREFIX)/lib/libbfcpmsg.so.0
ln -sf $(PREFIX)/lib/libbfcpmsg.so.0 $(PREFIX)/lib/libbfcpmsg.so
@echo Installing BFCP messages headers to $(PREFIX)/include/:
install -m 755 bfcp_messages.h $(PREFIX)/include/
install -m 755 bfcp_strings.h $(PREFIX)/include/

uninstall:
@echo Uninstalling BFCP messages library from $(PREFIX)/lib/:
rm -f $(PREFIX)/lib/libbfcpmsg*
@echo Uninstalling BFCP messages headers from $(PREFIX)/include/:
rm -f $(PREFIX)/include/bfcp_messages.h
rm -f $(PREFIX)/include/bfcp_strings.h
31 changes: 31 additions & 0 deletions libs/libbfcp/bfcpmsg/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
BFCP messages library
=====================

This is a brief guide to the compilation of the BFCP (Binary Floor Control Protocol) building and parsing libraries, according to the RFC specifications (attached), and of the test application that has been made available to show its use. Notice that this library only implements the message build and parsing functionality: for a BFCP client and/or server, you'll the `bfcpclt`/`bfcpsrv` libraries as well, or you'll need to implement the client/server behaviour yourself.

## Compiling the library

Edit the Makefile according to your settings and compiler. By default gcc will be used, and each library installed to /usr as destination prefix (/usr/include, /usr/lib).

There are several available targets to compile the code:

- `make linux` will compile the testcode and the library, creating an executable file for Linux;
- `make win32` will compile the testcode and the library, creating an executable file for Windows;
- `make so` will only compile the library, creating a shared object for Linux;
- `make dll` will only compile the library, creating a DLL for Windows.

If you want to compile all the available targets, just use:

make all

To install the compiled library (on Linux only), type, as root:

make install

To install the libraries in a Windows environment you'll need to manually copy the headers file to your include folder, and copy the resulting DLL(s) where needed.

## Testing the library

A command line sample application is available to test the library. Just play with it according to your needs to learn how the library works and to make tests on your own.

The test code that is available is testcode.c, a small application that builds a BFCP message, saves it to a file (mesg.hex), opens the file again, reads its contents and finally parses the built message, showing all the attributes. By default the test code will build a ChairAction message: just change the primitive name and the required arguments to try to build a message of your choice.
Loading