diff options
Diffstat (limited to 'main/asterisk-audio-konf/0003-member-ability-to-play-an-announcement-to-joiner.patch')
-rw-r--r-- | main/asterisk-audio-konf/0003-member-ability-to-play-an-announcement-to-joiner.patch | 105 |
1 files changed, 0 insertions, 105 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 deleted file mode 100644 index f59b8bff7..000000000 --- a/main/asterisk-audio-konf/0003-member-ability-to-play-an-announcement-to-joiner.patch +++ /dev/null @@ -1,105 +0,0 @@ -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 - |