update and patch appkonference to work with asterisk 1.8.
spotted by and diff ok with naddy@
This commit is contained in:
parent
058b0021ca
commit
249f7be968
@ -1,11 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.5 2010/11/20 19:56:47 espie Exp $
|
||||
# $OpenBSD: Makefile,v 1.6 2011/01/24 08:23:27 sthen Exp $
|
||||
|
||||
SHARED_ONLY= Yes
|
||||
COMMENT= conferencing application for asterisk
|
||||
|
||||
V= 1.2
|
||||
V= 1.5
|
||||
DISTNAME= appkonference-$V
|
||||
REVISION= 0
|
||||
|
||||
CATEGORIES= telephony
|
||||
|
||||
@ -23,7 +22,7 @@ NO_REGRESS= Yes
|
||||
USE_GMAKE= Yes
|
||||
|
||||
BUILD_DEPENDS= ${RUN_DEPENDS}
|
||||
RUN_DEPENDS= telephony/asterisk>=1.6
|
||||
RUN_DEPENDS= telephony/asterisk>=1.8,<1.9
|
||||
|
||||
MAKE_ENV+= LOCALBASE=${LOCALBASE} \
|
||||
ASTERISK_INCLUDE_DIR=${LOCALBASE}/include
|
||||
|
@ -1,5 +1,5 @@
|
||||
MD5 (appkonference-1.2.tar.gz) = C8Nxp8X0W8mgyzJE/e/t7w==
|
||||
RMD160 (appkonference-1.2.tar.gz) = owDW6KAbOGHh0tJKI86pQtNzP/0=
|
||||
SHA1 (appkonference-1.2.tar.gz) = mE5vcMlNmrUM4QMXEKj+Ynb+ltI=
|
||||
SHA256 (appkonference-1.2.tar.gz) = lyjOcwDKqvNluS0LY4pEV7JviNZ0AE49X4VsF793gKg=
|
||||
SIZE (appkonference-1.2.tar.gz) = 170127
|
||||
MD5 (appkonference-1.5.tar.gz) = OhFqcaCPI871EPoLR9cFyw==
|
||||
RMD160 (appkonference-1.5.tar.gz) = N2x81Zq3CZHmdD3AMDET8EHxPcE=
|
||||
SHA1 (appkonference-1.5.tar.gz) = Qwf7j2tkErGB7JifSzhltpBGRIo=
|
||||
SHA256 (appkonference-1.5.tar.gz) = ZHDMOLB6FLJ5k7wealxjaUOuNufiOFo+E2s7xVqHryc=
|
||||
SIZE (appkonference-1.5.tar.gz) = 186882
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-Makefile,v 1.1.1.1 2009/12/13 12:24:49 sthen Exp $
|
||||
--- konference/Makefile.orig Wed Jul 22 16:27:32 2009
|
||||
+++ konference/Makefile Mon Sep 21 22:35:02 2009
|
||||
@@ -60,7 +60,7 @@ INSTALL = install
|
||||
$OpenBSD: patch-Makefile,v 1.2 2011/01/24 08:23:27 sthen Exp $
|
||||
--- konference/Makefile.orig Wed Aug 18 17:02:38 2010
|
||||
+++ konference/Makefile Sat Jan 22 20:19:21 2011
|
||||
@@ -66,7 +66,7 @@ INSTALL = install
|
||||
INCLUDE = -I$(ASTERISK_INCLUDE_DIR)
|
||||
DEBUG := -g
|
||||
|
||||
@ -10,7 +10,7 @@ $OpenBSD: patch-Makefile,v 1.1.1.1 2009/12/13 12:24:49 sthen Exp $
|
||||
CPPFLAGS = $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE -DRELEASE=\"$(RELEASE)\"
|
||||
#CFLAGS += -O2
|
||||
#CFLAGS += -O3 -march=pentium3 -msse -mfpmath=sse,387 -ffast-math
|
||||
@@ -72,7 +72,7 @@ CPPFLAGS = $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE -DREL
|
||||
@@ -78,7 +78,7 @@ CPPFLAGS = $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE -DREL
|
||||
# adding -msse -mfpmath=sse has little effect.
|
||||
#CFLAGS += -O3 -msse -mfpmath=sse
|
||||
#CFLAGS += $(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
|
||||
@ -19,7 +19,7 @@ $OpenBSD: patch-Makefile,v 1.1.1.1 2009/12/13 12:24:49 sthen Exp $
|
||||
CFLAGS += -fPIC
|
||||
CPPFLAGS += -DCRYPTO
|
||||
CPPFLAGS += -DCHANNEL_TABLE_SIZE=$(CHANNEL_TABLE_SIZE)
|
||||
@@ -116,7 +116,7 @@ OSARCH=$(shell uname -s)
|
||||
@@ -137,7 +137,7 @@ OSARCH=$(shell uname -s)
|
||||
ifeq (${OSARCH},Darwin)
|
||||
SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace
|
||||
else
|
||||
@ -28,7 +28,7 @@ $OpenBSD: patch-Makefile,v 1.1.1.1 2009/12/13 12:24:49 sthen Exp $
|
||||
endif
|
||||
|
||||
DEPS += $(subst .o,.d,$(OBJS))
|
||||
@@ -136,7 +136,7 @@ distclean: clean
|
||||
@@ -157,7 +157,7 @@ distclean: clean
|
||||
$(RM) $(TARGET)
|
||||
|
||||
$(TARGET): $(OBJS)
|
||||
|
@ -0,0 +1,58 @@
|
||||
$OpenBSD: patch-konference_conference_c,v 1.1 2011/01/24 08:23:27 sthen Exp $
|
||||
|
||||
asterisk 1.8 support; https://gist.github.com/661206
|
||||
|
||||
--- konference/conference.c.orig Wed Aug 18 15:56:23 2010
|
||||
+++ konference/conference.c Sat Jan 22 20:19:21 2011
|
||||
@@ -1213,7 +1213,7 @@ void remove_member( struct ast_conf_member* member, st
|
||||
#endif
|
||||
ast_rwlock_unlock( &conf->lock );
|
||||
|
||||
- DEBUG("removed member from conference, name => %s, remaining => %d\n", member->conf_name, membercount) ;
|
||||
+ DEBUG("removed member from conference, name => %s, remaining => %d\n", conf->name, membercount) ;
|
||||
|
||||
// remove member from channel table
|
||||
if ( member->bucket != NULL )
|
||||
@@ -1221,7 +1221,7 @@ void remove_member( struct ast_conf_member* member, st
|
||||
AST_LIST_LOCK (member->bucket ) ;
|
||||
AST_LIST_REMOVE (member->bucket, member, hash_entry) ;
|
||||
AST_LIST_UNLOCK (member->bucket ) ;
|
||||
- DEBUG("Removed %s from the channel table, bucket => %ld\n", member->chan->name, member->bucket - channel_table) ;
|
||||
+ DEBUG("Removed %s from the channel table, bucket => %d\n", member->chan->name, member->bucket - channel_table) ;
|
||||
}
|
||||
|
||||
// output to manager...
|
||||
@@ -1245,8 +1245,8 @@ void remove_member( struct ast_conf_member* member, st
|
||||
member->id,
|
||||
member->flags,
|
||||
member->chan->name,
|
||||
- member->chan->cid.cid_num ? member->chan->cid.cid_num : "unknown",
|
||||
- member->chan->cid.cid_name ? member->chan->cid.cid_name: "unknown",
|
||||
+ member->chan->caller.id.number.str ? member->chan->caller.id.number.str : "unknown",
|
||||
+ member->chan->caller.id.name.str ? member->chan->caller.id.name.str: "unknown",
|
||||
tt,
|
||||
moderators,
|
||||
membercount
|
||||
@@ -1469,8 +1469,8 @@ int manager_conference_list( struct mansession *s, con
|
||||
conf->name,
|
||||
member->id,
|
||||
member->chan->name,
|
||||
- member->chan->cid.cid_num ? member->chan->cid.cid_num : "unknown",
|
||||
- member->chan->cid.cid_name ? member->chan->cid.cid_name : "unknown",
|
||||
+ member->chan->caller.id.number.str ? member->chan->caller.id.number.str : "unknown",
|
||||
+ member->chan->caller.id.name.str ? member->chan->caller.id.name.str : "unknown",
|
||||
member->mute_audio ? "YES" : "NO",
|
||||
#ifdef VIDEO
|
||||
member->mute_video ? "YES" : "NO",
|
||||
@@ -2081,9 +2081,11 @@ static void do_VAD_switching(struct ast_conference *co
|
||||
member != NULL ;
|
||||
member = member->next )
|
||||
{
|
||||
+#if ( SILDET == 2 )
|
||||
// If a member connects via telephone, they don't have video
|
||||
if ( member->via_telephone )
|
||||
continue;
|
||||
+#endif
|
||||
|
||||
// We check for no VAD switching, video-muted or camera disabled
|
||||
// If yes, this member will not be considered as a candidate for switching
|
42
telephony/appkonference/patches/patch-konference_frame_c
Normal file
42
telephony/appkonference/patches/patch-konference_frame_c
Normal file
@ -0,0 +1,42 @@
|
||||
$OpenBSD: patch-konference_frame_c,v 1.1 2011/01/24 08:23:27 sthen Exp $
|
||||
|
||||
asterisk 1.8 support; https://gist.github.com/661206
|
||||
|
||||
--- konference/frame.c.orig Tue Aug 17 15:58:07 2010
|
||||
+++ konference/frame.c Sat Jan 22 20:19:21 2011
|
||||
@@ -398,9 +398,9 @@ struct ast_frame* convert_frame_to_slinear( struct ast
|
||||
// the normal translation would free it anyway, so
|
||||
// we'll just pretend we free'd and malloc'd a new one.
|
||||
#ifndef AC_USE_G722
|
||||
- if ( fr->subclass == AST_FORMAT_SLINEAR )
|
||||
+ if ( fr->subclass.integer == AST_FORMAT_SLINEAR )
|
||||
#else
|
||||
- if ( fr->subclass == AST_FORMAT_SLINEAR16 )
|
||||
+ if ( fr->subclass.integer == AST_FORMAT_SLINEAR16 )
|
||||
#endif
|
||||
return fr ;
|
||||
|
||||
@@ -433,9 +433,9 @@ struct ast_frame* convert_frame_from_slinear( struct a
|
||||
|
||||
// if the frame is not slinear, return an error
|
||||
#ifndef AC_USE_G722
|
||||
- if ( fr->subclass != AST_FORMAT_SLINEAR )
|
||||
+ if ( fr->subclass.integer != AST_FORMAT_SLINEAR )
|
||||
#else
|
||||
- if ( fr->subclass != AST_FORMAT_SLINEAR16 )
|
||||
+ if ( fr->subclass.integer != AST_FORMAT_SLINEAR16 )
|
||||
#endif
|
||||
{
|
||||
ast_log( LOG_ERROR, "unable to translate non-slinear frame\n" ) ;
|
||||
@@ -647,9 +647,9 @@ struct ast_frame* create_slinear_frame( char* data )
|
||||
|
||||
f->frametype = AST_FRAME_VOICE ;
|
||||
#ifndef AC_USE_G722
|
||||
- f->subclass = AST_FORMAT_SLINEAR ;
|
||||
+ f->subclass.integer = AST_FORMAT_SLINEAR ;
|
||||
#else
|
||||
- f->subclass = AST_FORMAT_SLINEAR16 ;
|
||||
+ f->subclass.integer = AST_FORMAT_SLINEAR16 ;
|
||||
#endif
|
||||
f->samples = AST_CONF_BLOCK_SAMPLES ;
|
||||
f->offset = AST_FRIENDLY_OFFSET ;
|
147
telephony/appkonference/patches/patch-konference_member_c
Normal file
147
telephony/appkonference/patches/patch-konference_member_c
Normal file
@ -0,0 +1,147 @@
|
||||
$OpenBSD: patch-konference_member_c,v 1.1 2011/01/24 08:23:27 sthen Exp $
|
||||
|
||||
asterisk 1.8 support; https://gist.github.com/661206
|
||||
|
||||
--- konference/member.c.orig Tue Aug 17 19:16:35 2010
|
||||
+++ konference/member.c Sat Jan 22 20:19:21 2011
|
||||
@@ -49,7 +49,7 @@ static int process_incoming(struct ast_conf_member *me
|
||||
if (member->dtmf_switch)
|
||||
{
|
||||
ast_mutex_lock( &member->lock ) ;
|
||||
- switch (f->subclass) {
|
||||
+ switch (f->subclass.integer) {
|
||||
case '0' :member->req_id=0;
|
||||
break;
|
||||
case '1' :member->req_id=1;
|
||||
@@ -107,9 +107,9 @@ static int process_incoming(struct ast_conf_member *me
|
||||
member->type,
|
||||
member->chan->uniqueid,
|
||||
member->chan->name,
|
||||
- member->chan->cid.cid_num ? member->chan->cid.cid_num : "unknown",
|
||||
- member->chan->cid.cid_name ? member->chan->cid.cid_name : "unknown",
|
||||
- f->subclass,
|
||||
+ member->chan->caller.id.number.str ? member->chan->caller.id.number.str : "unknown",
|
||||
+ member->chan->caller.id.name.str ? member->chan->caller.id.name.str : "unknown",
|
||||
+ f->subclass.integer,
|
||||
conf->membercount,
|
||||
member->flags,
|
||||
member->mute_audio
|
||||
@@ -207,9 +207,9 @@ static int process_incoming(struct ast_conf_member *me
|
||||
if (
|
||||
member->dsp != NULL
|
||||
#ifndef AC_USE_G722
|
||||
- && f->subclass == AST_FORMAT_SLINEAR
|
||||
+ && f->subclass.integer == AST_FORMAT_SLINEAR
|
||||
#else
|
||||
- && f->subclass == AST_FORMAT_SLINEAR16
|
||||
+ && f->subclass.integer == AST_FORMAT_SLINEAR16
|
||||
#endif
|
||||
&& f->datalen == AST_CONF_FRAME_DATA_SIZE
|
||||
)
|
||||
@@ -233,9 +233,11 @@ static int process_incoming(struct ast_conf_member *me
|
||||
manager_event(
|
||||
EVENT_FLAG_CALL,
|
||||
"ConferenceState",
|
||||
+ "ConferenceName: %s\r\n"
|
||||
"Channel: %s\r\n"
|
||||
"Flags: %s\r\n"
|
||||
"State: %s\r\n",
|
||||
+ conf->name,
|
||||
member->chan->name,
|
||||
member->flags,
|
||||
"silent"
|
||||
@@ -254,9 +256,11 @@ static int process_incoming(struct ast_conf_member *me
|
||||
manager_event(
|
||||
EVENT_FLAG_CALL,
|
||||
"ConferenceState",
|
||||
+ "ConferenceName: %s\r\n"
|
||||
"Channel: %s\r\n"
|
||||
"Flags: %s\r\n"
|
||||
"State: %s\r\n",
|
||||
+ conf->name,
|
||||
member->chan->name,
|
||||
member->flags,
|
||||
"speaking"
|
||||
@@ -288,7 +292,7 @@ static int process_incoming(struct ast_conf_member *me
|
||||
#endif
|
||||
else if (
|
||||
f->frametype == AST_FRAME_CONTROL
|
||||
- && f->subclass == AST_CONTROL_HANGUP
|
||||
+ && f->subclass.integer == AST_CONTROL_HANGUP
|
||||
)
|
||||
{
|
||||
// hangup received
|
||||
@@ -303,7 +307,7 @@ static int process_incoming(struct ast_conf_member *me
|
||||
#ifdef VIDEO
|
||||
else if (
|
||||
f->frametype == AST_FRAME_CONTROL
|
||||
- && f->subclass == AST_CONTROL_VIDUPDATE
|
||||
+ && f->subclass.integer == AST_CONTROL_VIDUPDATE
|
||||
)
|
||||
{
|
||||
// say we have switched to cause a FIR to
|
||||
@@ -761,8 +765,8 @@ int member_exec( struct ast_channel* chan, void* data
|
||||
member->id,
|
||||
member->flags,
|
||||
member->chan->name,
|
||||
- member->chan->cid.cid_num ? member->chan->cid.cid_num : "unknown",
|
||||
- member->chan->cid.cid_name ? member->chan->cid.cid_name: "unknown",
|
||||
+ member->chan->caller.id.number.str ? member->chan->caller.id.number.str : "unknown",
|
||||
+ member->chan->caller.id.name.str ? member->chan->caller.id.name.str: "unknown",
|
||||
conf->stats.moderators,
|
||||
conf->membercount
|
||||
) ;
|
||||
@@ -2129,7 +2133,7 @@ DEBUG("SMOOTH:Feeding frame into inSmoother, timestamp
|
||||
while( ( sfr = ast_smoother_read( member->inSmoother ) ) ){
|
||||
|
||||
++i;
|
||||
-DEBUG("\treading new frame [%d] from smoother, inFramesCount[%d], \n\tsfr->frametype -> %d , sfr->subclass -> %d , sfr->datalen => %d sfr->samples => %d\n", i , member->inFramesCount , sfr->frametype, sfr->subclass, sfr->datalen, sfr->samples) ;
|
||||
+DEBUG("\treading new frame [%d] from smoother, inFramesCount[%d], \n\tsfr->frametype -> %d , sfr->subclass.integer -> %d , sfr->datalen => %d sfr->samples => %d\n", i , member->inFramesCount , sfr->frametype, sfr->subclass.integer, sfr->datalen, sfr->samples) ;
|
||||
DEBUG("SMOOTH:Reading frame from inSmoother, i=>%d, timestamp => %ld.%ld\n",i, sfr->delivery.tv_sec, sfr->delivery.tv_usec);
|
||||
conf_frame* cfr = create_conf_frame( member, member->inFrames, sfr ) ;
|
||||
if ( cfr == NULL )
|
||||
@@ -2763,10 +2767,10 @@ int ast_packer_feed(struct ast_packer *s, const struct
|
||||
return -1;
|
||||
}
|
||||
if (!s->format) {
|
||||
- s->format = f->subclass;
|
||||
+ s->format = f->subclass.integer;
|
||||
s->samples=0;
|
||||
- } else if (s->format != f->subclass) {
|
||||
- ast_log(LOG_WARNING, "Packer was working on %d format frames, now trying to feed %d?\n", s->format, f->subclass);
|
||||
+ } else if (s->format != f->subclass.integer) {
|
||||
+ ast_log(LOG_WARNING, "Packer was working on %d format frames, now trying to feed %d?\n", s->format, f->subclass.integer);
|
||||
return -1;
|
||||
}
|
||||
if (s->len + f->datalen > PACKER_SIZE) {
|
||||
@@ -2815,7 +2819,7 @@ struct ast_frame *ast_packer_read(struct ast_packer *s
|
||||
len = s->len;
|
||||
/* Make frame */
|
||||
s->f.frametype = AST_FRAME_VOICE;
|
||||
- s->f.subclass = s->format;
|
||||
+ s->f.subclass.integer = s->format;
|
||||
SETDATA2PTR(s->f.data, s->framedata + AST_FRIENDLY_OFFSET);
|
||||
s->f.offset = AST_FRIENDLY_OFFSET;
|
||||
s->f.datalen = len;
|
||||
@@ -3029,7 +3033,7 @@ int queue_frame_for_speaker(
|
||||
// short-cut pointer to the ast_frame
|
||||
qf = frame->fr ;
|
||||
|
||||
- if ( (qf->subclass == member->write_format) && (member->listen_volume == 0) )
|
||||
+ if ( (qf->subclass.integer == member->write_format) && (member->listen_volume == 0) )
|
||||
{
|
||||
// frame is already in correct format, so just queue it
|
||||
|
||||
@@ -3377,8 +3381,11 @@ int is_video_eligible(struct ast_conf_member *member)
|
||||
{
|
||||
if ( member == NULL )
|
||||
return 0;
|
||||
-
|
||||
+#if ( SILDET == 2 )
|
||||
return !member->no_camera && !member->mute_video && !member->via_telephone;
|
||||
+#else
|
||||
+ return !member->no_camera && !member->mute_video;
|
||||
+#endif
|
||||
}
|
||||
|
||||
// Member start and stop video methods
|
Loading…
Reference in New Issue
Block a user