Hi,

I just managed to compile and install it, but I had to struggle during compilation, I got these:


gcc -g -Wall -fPIC -g -Wall -D_GNU_SOURCE  -std=c99 `pkg-config --cflags glib-2.0` `pkg-config --cflags gthread-2.0` `pkg-config --cflags openssl`   -c -o re_redis_mod.o re_redis_mod.c
re_redis_mod.c:666:13: warning: ‘__print_flags’ defined but not used [-Wunused-function]
re_redis_mod.c:593:13: warning: ‘__streams_free’ defined but not used [-Wunused-function]
gcc -g -Wall -fPIC -g -Wall -D_GNU_SOURCE  -std=c99 `pkg-config --cflags glib-2.0` `pkg-config --cflags gthread-2.0` `pkg-config --cflags openssl`   -c -o redis_storage.o redis_storage.c
redis_storage.c: In function ‘__redis_connect_async’:
redis_storage.c:211:2: warning: passing argument 2 of ‘redisAsyncSetConnectCallback’ from incompatible pointer type [enabled by default]
In file included from re_redis_mod.h:10:0,
                 from redis_storage.h:15,
                 from redis_storage.c:12:
/usr/include/hiredis/async.h:106:5: note: expected ‘void (*)(const struct redisAsyncContext *)’ but argument is of type ‘void (*)(const struct redisAsyncContext *, int)’
redis_storage.c: In function ‘redis_restore_pkey’:
redis_storage.c:567:3: warning: implicit declaration of function ‘ERR_error_string’ [-Wimplicit-function-declaration]
redis_storage.c:567:3: warning: implicit declaration of function ‘ERR_get_error’ [-Wimplicit-function-declaration]
redis_storage.c: At top level:
redis_storage.c:220:14: warning: ‘__event_dispatcher’ defined but not used [-Wunused-function]
gcc -shared -lhiredis -levent `pkg-config --libs glib-2.0` `pkg-config --libs gthread-2.0` `pkg-config --libs openssl` re_redis_mod.o redis_storage.o  -o rtpengine-redis.so
redis_storage.o: In function `redisLibeventReadEvent':
/usr/include/hiredis/adapters/libevent.h:10: multiple definition of `redisLibeventReadEvent'
re_redis_mod.o:/usr/include/hiredis/adapters/libevent.h:10: first defined here
redis_storage.o: In function `redisLibeventWriteEvent':
/usr/include/hiredis/adapters/libevent.h:16: multiple definition of `redisLibeventWriteEvent'
re_redis_mod.o:/usr/include/hiredis/adapters/libevent.h:16: first defined here
redis_storage.o: In function `redisLibeventAddRead':
/usr/include/hiredis/adapters/libevent.h:22: multiple definition of `redisLibeventAddRead'
re_redis_mod.o:/usr/include/hiredis/adapters/libevent.h:22: first defined here
redis_storage.o: In function `redisLibeventDelRead':
/usr/include/hiredis/adapters/libevent.h:27: multiple definition of `redisLibeventDelRead'
re_redis_mod.o:/usr/include/hiredis/adapters/libevent.h:27: first defined here
redis_storage.o: In function `redisLibeventAddWrite':
/usr/include/hiredis/adapters/libevent.h:32: multiple definition of `redisLibeventAddWrite'
re_redis_mod.o:/usr/include/hiredis/adapters/libevent.h:32: first defined here
redis_storage.o: In function `redisLibeventDelWrite':
/usr/include/hiredis/adapters/libevent.h:37: multiple definition of `redisLibeventDelWrite'
re_redis_mod.o:/usr/include/hiredis/adapters/libevent.h:37: first defined here
redis_storage.o: In function `redisLibeventCleanup':
/usr/include/hiredis/adapters/libevent.h:42: multiple definition of `redisLibeventCleanup'
re_redis_mod.o:/usr/include/hiredis/adapters/libevent.h:42: first defined here
redis_storage.o: In function `redisLibeventAttach':
/usr/include/hiredis/adapters/libevent.h:49: multiple definition of `redisLibeventAttach'
re_redis_mod.o:/usr/include/hiredis/adapters/libevent.h:49: first defined here
collect2: error: ld returned 1 exit status
make: *** [rtpengine-redis.so] Fehler 1


I solved it by applying the linker switch:

-Wl,--allow-multiple-definition

Regards,
Paul



On 08.05.2015 10:17, Frederic-Philippe Metz wrote:
Hi Carsten,
glad to hear that you've already spent work on it. I just tried to
compile and to install an I got an error. Do you know this error to safe
us a bit of time ?

//

undefined
symbol: event_base_new

//

fmetz@fluffy:~/1und1/rtpengine-redis-plugin/rtpengine$ sudo dpkg -i
../ngcp-rtpengine-daemon_3.3.0.0+0~mr3.3.2.3_amd64.deb
(Reading database ... 448773 files and directories currently installed.)
Preparing to unpack
.../ngcp-rtpengine-daemon_3.3.0.0+0~mr3.3.2.3_amd64.deb ...
Unpacking ngcp-rtpengine-daemon (3.3.0.0+0~mr3.3.2.3) over
(3.3.0.0+0~mr3.3.2.3) ...
Setting up ngcp-rtpengine-daemon (3.3.0.0+0~mr3.3.2.3) ...
Restarting RTP/media proxy: ngcp-rtpengine-daemonFailed to open redis
plugin, aborting (/usr/lib/rtpengine/rtpengine-redis.so: undefined
symbol: event_base_new)
invoke-rc.d: initscript ngcp-rtpengine-daemon, action "restart" failed.
dpkg: error processing package ngcp-rtpengine-daemon (--install):
 subprocess installed post-installation script returned error exit
status 255
Processing triggers for ureadahead (0.100.0-16) ...
Errors were encountered while processing:
 ngcp-rtpengine-daemon
fmetz@fluffy:~/1und1/rtpengine-redis-plugin/rtpengine


Cheers << Frédéric


On 04.05.2015 16:11, Carsten Bock wrote:
Hi,

Issues/Limitations:
- probably, we should also do some more/heavy Loadtesting, even though
it was thoroughly tested
- fix some compiler warnings ;-)
- as Carlos mentioned: The DTLS stuff....

Those are the issues/limitations, i am aware of.

Thanks,
Carsten

2015-05-04 16:06 GMT+02:00 Carlos Ruiz Díaz <carlos.ruizdiaz@gmail.com>:
On Mon, May 4, 2015 at 8:00 AM, Pawel Kuzak <pawel.kuzak@1und1.de> wrote:
Hi Carsten,

we are interested in this plug-in. Do you have any experience with
RTPengine using this feature? I mean, did this plug-in work fine with
RTPengine 3.3? Is this plug-in fully functional despite the fact that it
does not work with recent RTPengine versions or are there any known
limitations/bugs/missing features?
I don't know if any part of the code was modified to add/remove features,
but if it is exactly as it was originally implemented, it works fine with
rtpengine 3.3 and the only (and important) limitation it has is that it is
unable to restore DTLS connections.

This, somewhat important, limitation is due to my lack of knowledge on the
matter, but it shouldn't be difficult to implement for someone that is
knowledgeable on the subject.

Regards,
Carlos

We recently added some features to the RTPengine project and thus are
working with the master branch. Because we also need this redundancy
feature, we thought about implementing it all by ourselves. We didn't know
about your project, but we eventually would bring the time to bring this
plug-in up-to-date. So your mail came just in time :)

Greetings,
Paul


You mail came just in time :) .

On 04.05.2015 14:35, Carsten Bock wrote:
Hi everyone,

several months ago, we've implemented a plugin for RTPEngine to
synchronize it with a REDIS-Database. This allows RTPEngine to operate
in a HA, as you can restart RTPEngine and/or make a failover to
another machine with the same IP (e.g. using Heartbeat or similar),
WITHOUT LOOSING ACTIVE SESSIONS.

This enhancement was originally implemented by Carlos Ruiz Diaz.

Due to lack of time, it still requires RTPEngine 3.3 and needs an
update, to work with later versions.

It can be found here:
https://github.com/ngvoice/rtpengine-redis-plugin

If anyone is interested in contributing to this extension, please ping
me and i will happily add you as a contributor.

Thanks,
Carsten

_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


--
Carlos
http://caruizdiaz.com

_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev



_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev