aboutsummaryrefslogtreecommitdiffstats
path: root/main/asterisk-audio-konf
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2010-08-24 17:44:51 +0300
committerTimo Teräs <timo.teras@iki.fi>2010-08-24 17:45:35 +0300
commit64a27b32886549c3aa26115d4e9ba752e9736ffd (patch)
tree37a8a1c5f5d11c690eda5ad1df73bcbf70cb371c /main/asterisk-audio-konf
parentaa38dc0fa38363957661d3772b2c3c6439329f50 (diff)
downloadaports-64a27b32886549c3aa26115d4e9ba752e9736ffd.tar.bz2
aports-64a27b32886549c3aa26115d4e9ba752e9736ffd.tar.xz
main/asterisk-audio-conf: ability to play a welcome speak
playback a speak after pin verification, but before dispatching conference audio.
Diffstat (limited to 'main/asterisk-audio-konf')
-rw-r--r--main/asterisk-audio-konf/0003-member-ability-to-play-an-announcement-to-joiner.patch105
-rw-r--r--main/asterisk-audio-konf/APKBUILD6
2 files changed, 109 insertions, 2 deletions
diff --git a/main/asterisk-audio-konf/0003-member-ability-to-play-an-announcement-to-joiner.patch b/main/asterisk-audio-konf/0003-member-ability-to-play-an-announcement-to-joiner.patch
new file mode 100644
index 0000000000..f59b8bff7c
--- /dev/null
+++ b/main/asterisk-audio-konf/0003-member-ability-to-play-an-announcement-to-joiner.patch
@@ -0,0 +1,105 @@
+From 859a208c7ce995930068159cf512ec50d71b16b0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
+Date: Tue, 24 Aug 2010 17:40:06 +0300
+Subject: [PATCH 2/2] member: ability to play an announcement to joiner
+
+Parameter to playback a file after succesful conference join
+(resources, conference existance and PIN verified), but before
+actually dispatching the conference data.
+---
+ konference/Dialplan.txt | 1 +
+ konference/member.c | 25 +++++++++++++++++++++++++
+ konference/member.h | 1 +
+ 3 files changed, 27 insertions(+), 0 deletions(-)
+
+diff --git a/konference/Dialplan.txt b/konference/Dialplan.txt
+index 17287dd..3784f32 100644
+--- a/konference/Dialplan.txt
++++ b/konference/Dialplan.txt
+@@ -64,6 +64,7 @@ exten => <ext>,<pri>,Konference(<confname>,<flags>,<optional args>,<more optiona
+ max_users=<int> : Limit conference participants to max_users
+ type=<string>: Type identifier
+ spy=<string>: Channel name to spy
++ welcome_prompt=<string>: File to playback after a successful join (PIN verified), but before connecting conference audio
+
+ 3. Examples
+
+diff --git a/konference/member.c b/konference/member.c
+index 5370e73..080db81 100644
+--- a/konference/member.c
++++ b/konference/member.c
+@@ -829,6 +829,21 @@ int member_exec( struct ast_channel* chan, void* data )
+ ) ;
+
+ //
++ // play welcome prompt
++ //
++ if (member->welcome_prompt) {
++ ast_stopstream(chan);
++ res = ast_streamfile(chan, member->welcome_prompt, chan->language);
++ if (!res) {
++ res = ast_waitstream(chan, "");
++ ast_stopstream(chan);
++ } else {
++ ast_log(LOG_WARNING, "Failed to play welcome prompt '%s' on channel '%s'",
++ member->welcome_prompt, chan->name);
++ }
++ }
++
++ //
+ // process loop for new member ( this runs in it's own thread )
+ //
+
+@@ -1064,6 +1079,7 @@ struct ast_conf_member* create_member( struct ast_channel *chan, const char* dat
+ member->max_users = AST_CONF_MAX_USERS;
+ member->type = NULL;
+ member->spyee_channel_name = NULL;
++ member->welcome_prompt = NULL;
+
+ //
+ // initialize member with passed data values
+@@ -1117,6 +1133,7 @@ struct ast_conf_member* create_member( struct ast_channel *chan, const char* dat
+ static const char arg_max_users[] = "max_users";
+ static const char arg_conf_type[] = "type";
+ static const char arg_chanspy[] = "spy";
++ static const char arg_welcomeprompt[] = "welcome_prompt";
+
+ char *value = token;
+ const char *key = strsep(&value, "=");
+@@ -1162,6 +1179,11 @@ struct ast_conf_member* create_member( struct ast_channel *chan, const char* dat
+ member->spyee_channel_name = malloc( strlen( value ) + 1 ) ;
+ strcpy( member->spyee_channel_name, value ) ;
+ DEBUG("spyee channel name is %s\n", member->spyee_channel_name) ;
++ } else if ( strncasecmp(key, arg_welcomeprompt, sizeof(arg_welcomeprompt) - 1) == 0 )
++ {
++ member->welcome_prompt = malloc( strlen( value ) + 1 ) ;
++ strcpy( member->welcome_prompt, value ) ;
++ DEBUG("welcome prompt is %s\n", member->welcome_prompt) ;
+ } else
+ {
+ ast_log(LOG_WARNING, "unknown parameter %s with value %s\n", key, value) ;
+@@ -1729,6 +1751,9 @@ struct ast_conf_member* delete_member( struct ast_conf_member* member )
+ // free the member's copy of the spyee channel name
+ free(member->spyee_channel_name);
+
++ // free the welcome prompt
++ free(member->welcome_prompt);
++
+ // clear all sounds
+ struct ast_conf_soundq *sound = member->soundq;
+ struct ast_conf_soundq *next;
+diff --git a/konference/member.h b/konference/member.h
+index 28eff6b..52b5164 100644
+--- a/konference/member.h
++++ b/konference/member.h
+@@ -69,6 +69,7 @@ struct ast_conf_member
+ char *type ; // conference type
+ char* conf_name ; // name of the conference that own this member
+ char *spyee_channel_name ; // spyee channel name
++ char *welcome_prompt ;
+ int max_users ; // zero or max users for this conference
+
+ // voice flags
+--
+1.7.0.4
+
diff --git a/main/asterisk-audio-konf/APKBUILD b/main/asterisk-audio-konf/APKBUILD
index 3025b873cd..085766d1ba 100644
--- a/main/asterisk-audio-konf/APKBUILD
+++ b/main/asterisk-audio-konf/APKBUILD
@@ -4,7 +4,7 @@ pkgname=asterisk-audio-konf
_basever=0
_gitver=100607
pkgver=${_basever}_git${_gitver}
-pkgrel=1
+pkgrel=2
pkgdesc="A fork of AppKonference focused entirely on audio conferencing"
url="http://github.com/jthomerson/AsteriskAudioKonf/"
license="GPL"
@@ -16,6 +16,7 @@ _snapfile="$pkgname-$pkgver.tar.bz2"
source="http://build.alpinelinux.org:8010/distfiles/$_snapfile
0001-add-n-flag-to-prevent-dynamic-create-of-conference.patch
0002-member-do-not-exit-with-error-if-join_conference-fai.patch
+ 0003-member-ability-to-play-an-announcement-to-joiner.patch
"
_gitver=100607
@@ -66,4 +67,5 @@ package() {
md5sums="8a716a2d1daa622f86a485804e403571 asterisk-audio-konf-0_git100607.tar.bz2
937afbb9fa2ce57615f09919e15ab2d3 0001-add-n-flag-to-prevent-dynamic-create-of-conference.patch
-2d0d8bf20b2a22bd099f1461cfd1fe27 0002-member-do-not-exit-with-error-if-join_conference-fai.patch"
+2d0d8bf20b2a22bd099f1461cfd1fe27 0002-member-do-not-exit-with-error-if-join_conference-fai.patch
+0d07d5e69e6aa75bd916ce29569a8509 0003-member-ability-to-play-an-announcement-to-joiner.patch"