aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/asterisk-audio-konf/0001-add-n-flag-to-prevent-dynamic-create-of-conference.patch151
-rw-r--r--testing/asterisk-audio-konf/0001-create-install-dir.patch24
-rw-r--r--testing/asterisk-audio-konf/APKBUILD11
3 files changed, 157 insertions, 29 deletions
diff --git a/testing/asterisk-audio-konf/0001-add-n-flag-to-prevent-dynamic-create-of-conference.patch b/testing/asterisk-audio-konf/0001-add-n-flag-to-prevent-dynamic-create-of-conference.patch
new file mode 100644
index 0000000000..115c42fa28
--- /dev/null
+++ b/testing/asterisk-audio-konf/0001-add-n-flag-to-prevent-dynamic-create-of-conference.patch
@@ -0,0 +1,151 @@
+From 2040c4ebe42ed6a222b87f0148c0c08701afc2fd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
+Date: Mon, 7 Jun 2010 14:20:42 +0300
+Subject: [PATCH] add 'n' flag to prevent dynamic create of conference
+
+---
+ konference/Dialplan.txt | 2 ++
+ konference/conference.c | 27 ++++++++++++++++++---------
+ konference/conference.h | 2 +-
+ konference/member.c | 12 +++++++-----
+ konference/member.h | 3 +++
+ 5 files changed, 31 insertions(+), 15 deletions(-)
+
+diff --git a/konference/Dialplan.txt b/konference/Dialplan.txt
+index 455703d..17287dd 100644
+--- a/konference/Dialplan.txt
++++ b/konference/Dialplan.txt
+@@ -45,6 +45,8 @@ exten => <ext>,<pri>,Konference(<confname>,<flags>,<optional args>,<more optiona
+ 'r' : record the conference. it will be recorded to KONFERENCE_RECORDINGFILE with the format KONFERENCE_RECORDINGFORMAT
+ default for KONFERENCE_RECORDINGFILE is: konference-{conference-name}-{member-uniqueid}
+ default for KONFERENCE_RECORDINGFORMAT is: wav
++ 'n' : do not create new conference, only join existing ones.
++ if conference does not exist KONFERENCE is set to NOTFOUND
+
+ Future development (these are not implemented yet):
+ ?
+diff --git a/konference/conference.c b/konference/conference.c
+index 9790d2e..98fed28 100644
+--- a/konference/conference.c
++++ b/konference/conference.c
+@@ -620,7 +620,7 @@ void init_conference( void )
+ argument_delimiter = ( !strcmp(PACKAGE_VERSION,"1.4") ? "|" : "," ) ;
+ }
+
+-struct ast_conference* join_conference( struct ast_conf_member* member, char* max_users_flag, const char* recfile, const char *recformat )
++struct ast_conference* join_conference( struct ast_conf_member* member, const char* recfile, const char *recformat )
+ {
+ struct ast_conference* conf = NULL ;
+
+@@ -634,15 +634,25 @@ struct ast_conference* join_conference( struct ast_conf_member* member, char* ma
+ // unable to find an existing conference, try to create one
+ if ( conf == NULL )
+ {
+- // create a new conference
+- DEBUG("attempting to create requested conference\n") ;
++ if ( member->no_create_flag )
++ {
++ DEBUG("conference not found, and create of new conference not allowed\n") ;
++ pbx_builtin_setvar_helper(member->chan, "KONFERENCE", "NOTFOUND");
++ }
++ else
++ {
++ // create a new conference
++ DEBUG("attempting to create requested conference\n") ;
+
+- // create the new conference with one member
+- conf = create_conf( member->conf_name, member ) ;
++ // create the new conference with one member
++ conf = create_conf( member->conf_name, member ) ;
+
+- // return an error if create_conf() failed
+- if ( conf == NULL )
+- ast_log( LOG_ERROR, "unable to find or create requested conference\n" ) ;
++ // return an error if create_conf() failed
++ if ( conf == NULL ) {
++ ast_log( LOG_ERROR, "unable to find or create requested conference\n" ) ;
++ pbx_builtin_setvar_helper(member->chan, "KONFERENCE", "NORESOURCES");
++ }
++ }
+ }
+ else
+ {
+@@ -656,7 +666,6 @@ struct ast_conference* join_conference( struct ast_conf_member* member, char* ma
+ add_member( member, conf ) ;
+ } else {
+ pbx_builtin_setvar_helper(member->chan, "KONFERENCE", "MAXUSERS");
+- *max_users_flag = 1;
+ conf = NULL;
+ }
+ }
+diff --git a/konference/conference.h b/konference/conference.h
+index 3322f3f..e8da836 100644
+--- a/konference/conference.h
++++ b/konference/conference.h
+@@ -157,7 +157,7 @@ int hash( const char *channel_name ) ;
+
+ int count_exec( struct ast_channel* chan, void* data ) ;
+
+-struct ast_conference* join_conference( struct ast_conf_member* member, char* max_users_flag, const char* recfile, const char* recformat ) ;
++struct ast_conference* join_conference( struct ast_conf_member* member, const char* recfile, const char* recformat ) ;
+
+ int end_conference( const char *name, int hangup ) ;
+
+diff --git a/konference/member.c b/konference/member.c
+index c18fcdc..ff93b36 100644
+--- a/konference/member.c
++++ b/konference/member.c
+@@ -758,14 +758,13 @@ int member_exec( struct ast_channel* chan, void* data )
+ // setup a conference for the new member
+ //
+
+- char max_users_flag = 0 ;
+- conf = join_conference( member, &max_users_flag, recfile, recformat ) ;
++ conf = join_conference( member, recfile, recformat ) ;
+
+ if ( conf == NULL )
+ {
+- ast_log( LOG_NOTICE, "unable to setup member conference %s: max_users_flag is %d\n", member->conf_name, max_users_flag ) ;
++ ast_log( LOG_NOTICE, "unable to setup member conference %s\n", member->conf_name) ;
+ delete_member( member) ;
+- return (max_users_flag ? 0 : -1 ) ;
++ return -1;
+ }
+
+ //
+@@ -1349,7 +1348,7 @@ struct ast_conf_member* create_member( struct ast_channel *chan, const char* dat
+ else
+ #endif
+ {
+- // allowed flags are C, c, L, l, V, D, A, C, X, r, R, T, t, M, S, z, o, F, H
++ // allowed flags are C, c, L, l, V, D, A, C, X, r, R, T, t, M, S, z, o, F, H, n
+ // mute/no_recv options
+ switch ( flags[i] )
+ {
+@@ -1405,6 +1404,9 @@ struct ast_conf_member* create_member( struct ast_channel *chan, const char* dat
+ case 'M':
+ member->ismoderator = 1;
+ break;
++ case 'n':
++ member->no_create_flag = 1;
++ break;
+ #ifdef VIDEO
+ case 'N':
+ member->no_camera = 1;
+diff --git a/konference/member.h b/konference/member.h
+index 0f9005b..28eff6b 100644
+--- a/konference/member.h
++++ b/konference/member.h
+@@ -105,6 +105,9 @@ struct ast_conf_member
+ // wait option flag
+ char wait_for_moderator_flag;
+
++ // creation of new conference not allowed
++ char no_create_flag;
++
+ // temp flag for when star is pressed
+ char star_pressed;
+
+--
+1.7.0.4
+
diff --git a/testing/asterisk-audio-konf/0001-create-install-dir.patch b/testing/asterisk-audio-konf/0001-create-install-dir.patch
deleted file mode 100644
index 9d2f548eb1..0000000000
--- a/testing/asterisk-audio-konf/0001-create-install-dir.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From b44f99b7ab158f3e0cf3a2344fcc58d90982378c Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Thu, 27 May 2010 09:31:03 +0000
-Subject: [PATCH] create install dir
-
----
- konference/Makefile | 1 +
- 1 files changed, 1 insertions(+), 0 deletions(-)
-
-diff --git a/konference/Makefile b/konference/Makefile
-index 9cc2201..e0901df 100644
---- a/konference/Makefile
-+++ b/konference/Makefile
-@@ -158,6 +158,7 @@ vad_test: vad_test.o libspeex/preprocess.o libspeex/misc.o libspeex/smallft.o
- $(CC) $(PROFILE) -o $@ $^ -lm
-
- install:
-+ $(INSTALL) -d $(INSTALL_MODULES_DIR)
- $(INSTALL) -m 755 $(TARGET) $(INSTALL_MODULES_DIR)
-
-
---
-1.7.1
-
diff --git a/testing/asterisk-audio-konf/APKBUILD b/testing/asterisk-audio-konf/APKBUILD
index d10dcbc91e..cd87e2780e 100644
--- a/testing/asterisk-audio-konf/APKBUILD
+++ b/testing/asterisk-audio-konf/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=asterisk-audio-konf
_basever=0
-_gitver=100527
+_gitver=100607
pkgver=${_basever}_git${_gitver}
pkgrel=0
pkgdesc="A fork of AppKonference focused entirely on audio conferencing"
@@ -14,10 +14,10 @@ install=
subpackages=
_snapfile="$pkgname-$pkgver.tar.bz2"
source="http://build.alpinelinux.org:8010/distfiles/$_snapfile
- 0001-create-install-dir.patch
+ 0001-add-n-flag-to-prevent-dynamic-create-of-conference.patch
"
-_gitver=100527
+_gitver=100607
_giturl="git://github.com/jthomerson/AsteriskAudioKonf.git"
@@ -27,6 +27,7 @@ _builddir="$srcdir"/$pkgname/konference
snapshot() {
_gitver=$(date +%y%m%d)
pkgver=${_basever}_git$_gitver
+ _snapfile="$pkgname-$pkgver.tar.bz2"
if [ -d "$SRCDEST"/$pkgname ]; then
cd "$SRCDEST"/$pkgname
@@ -62,5 +63,5 @@ package() {
make INSTALL_PREFIX="$pkgdir" install
}
-md5sums="4e81c731d4b4bd258cd426b5d5dfcdc0 asterisk-audio-konf-0_git100527.tar.bz2
-822df062f4f0890889e3be382ae90504 0001-create-install-dir.patch"
+md5sums="8a716a2d1daa622f86a485804e403571 asterisk-audio-konf-0_git100607.tar.bz2
+937afbb9fa2ce57615f09919e15ab2d3 0001-add-n-flag-to-prevent-dynamic-create-of-conference.patch"