aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_meetme.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-06 22:04:58 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-06 22:04:58 +0000
commit7771e798909f36a66d267d2d350414b27a9a9885 (patch)
treec65ef13e8a9656d8a0983468576560e0254181c6 /apps/app_meetme.c
parent7b1dfb4063a2f51d6a45b6f570421dd589e20665 (diff)
don't try to support 'i' or 'r' options if chan_zap is not loaded, and warn the user when they attempt to use them (issue #6675)
update application help text to more clearly define when Zaptel and chan_zap are required git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@18087 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_meetme.c')
-rw-r--r--apps/app_meetme.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index 9bfbc8892..0eb185e74 100644
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -70,8 +70,9 @@ static const char *descrip =
"If the conference number is omitted, the user will be prompted to enter\n"
"one. \n"
"User can exit the conference by hangup, or if the 'p' option is specified, by pressing '#'.\n"
-"Please note: A ZAPTEL INTERFACE MUST BE INSTALLED FOR CONFERENCING TO WORK!\n\n"
-
+"Please note: The Zaptel kernel modules and at least one hardware driver (or ztdummy)\n"
+" must be present for conferencing to operate properly. In additon, the chan_zap\n"
+" channel driver must be loaded for the 'i' and 'r' options to operate at all.\n\n"
"The option string may contain zero or more of the following characters:\n"
" 'a' -- set admin mode\n"
" 'A' -- set marked mode\n"
@@ -1620,7 +1621,8 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
return ret;
}
-static struct ast_conference *find_conf(struct ast_channel *chan, char *confno, int make, int dynamic, char *dynamic_pin)
+static struct ast_conference *find_conf(struct ast_channel *chan, char *confno, int make, int dynamic, char *dynamic_pin,
+ struct ast_flags *confflags)
{
struct ast_config *cfg;
struct ast_variable *var;
@@ -1695,6 +1697,19 @@ static struct ast_conference *find_conf(struct ast_channel *chan, char *confno,
dynamic_pin[0] = '\0';
}
+ if (confflags && !cnf->chan &&
+ !ast_test_flag(confflags, CONFFLAG_QUIET) &&
+ ast_test_flag(confflags, CONFFLAG_INTROUSER)) {
+ ast_log(LOG_WARNING, "No Zap channel available for conference, user introduction disabled (is chan_zap loaded?)\n");
+ ast_clear_flag(confflags, CONFFLAG_INTROUSER);
+ }
+
+ if (confflags && !cnf->chan &&
+ ast_test_flag(confflags, CONFFLAG_RECORDCONF)) {
+ ast_log(LOG_WARNING, "No Zap channel available for conference, conference recording disabled (is chan_zap loaded?)\n");
+ ast_clear_flag(confflags, CONFFLAG_RECORDCONF);
+ }
+
return cnf;
}
@@ -1723,7 +1738,7 @@ static int count_exec(struct ast_channel *chan, void *data)
}
confnum = strsep(&localdata,"|");
- conf = find_conf(chan, confnum, 0, 0, NULL);
+ conf = find_conf(chan, confnum, 0, 0, NULL, NULL);
if (conf)
count = conf->users;
else
@@ -1910,7 +1925,7 @@ static int conf_exec(struct ast_channel *chan, void *data)
}
if (!ast_strlen_zero(confno)) {
/* Check the validity of the conference */
- cnf = find_conf(chan, confno, 1, dynamic, the_pin);
+ cnf = find_conf(chan, confno, 1, dynamic, the_pin, &confflags);
if (!cnf) {
res = ast_streamfile(chan, "conf-invalid", chan->language);
if (!res)