mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-22 13:25:17 +00:00
automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@33327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -982,9 +982,18 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
|
|||||||
"At the tone, please say your name:"
|
"At the tone, please say your name:"
|
||||||
|
|
||||||
*/
|
*/
|
||||||
ast_play_and_record(chan, "priv-recordintro", privintro, 4, "gsm", &duration, 128, 2000, 0); /* NOTE: I've reduced the total time to 4 sec */
|
res = ast_play_and_record(chan, "priv-recordintro", privintro, 4, "gsm", &duration, 128, 2000, 0); /* NOTE: I've reduced the total time to */
|
||||||
/* don't think we'll need a lock removed, we took care of
|
/* 4 sec don't think we'll need a lock removed, we
|
||||||
conflicts by naming the privintro file */
|
took care of conflicts by naming the privintro file */
|
||||||
|
if (res == -1) {
|
||||||
|
/* Delete the file regardless since they hung up during recording */
|
||||||
|
ast_filedelete(privintro, NULL);
|
||||||
|
if( ast_fileexists(privintro,NULL,NULL ) > 0 )
|
||||||
|
ast_log(LOG_NOTICE,"privacy: ast_filedelete didn't do its job on %s\n", privintro);
|
||||||
|
else if (option_verbose > 2)
|
||||||
|
ast_verbose( VERBOSE_PREFIX_3 "Successfully deleted %s intro file\n", privintro);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1258,18 +1267,18 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
|
|||||||
do {
|
do {
|
||||||
if (!res2)
|
if (!res2)
|
||||||
res2 = ast_play_and_wait(peer,"priv-callpending");
|
res2 = ast_play_and_wait(peer,"priv-callpending");
|
||||||
if( res2 < '1' || (ast_test_flag(&opts, OPT_PRIVACY) && res2>'5') || (ast_test_flag(&opts, OPT_SCREENING) && res2 > '4') ) /* uh, interrupting with a bad answer is ... ignorable! */
|
if ( res2 < '1' || (ast_test_flag(&opts, OPT_PRIVACY) && res2>'5') || (ast_test_flag(&opts, OPT_SCREENING) && res2 > '4') ) /* uh, interrupting with a bad answer is ... ignorable! */
|
||||||
res2 = 0;
|
res2 = 0;
|
||||||
|
|
||||||
/* priv-callpending script:
|
/* priv-callpending script:
|
||||||
"I have a caller waiting, who introduces themselves as:"
|
"I have a caller waiting, who introduces themselves as:"
|
||||||
*/
|
*/
|
||||||
if (!res2)
|
if (!res2)
|
||||||
res2 = ast_play_and_wait(peer,privintro);
|
res2 = ast_play_and_wait(peer, privintro);
|
||||||
if( res2 < '1' || (ast_test_flag(&opts, OPT_PRIVACY) && res2>'5') || (ast_test_flag(&opts, OPT_SCREENING) && res2 > '4') ) /* uh, interrupting with a bad answer is ... ignorable! */
|
if ( res2 < '1' || (ast_test_flag(&opts, OPT_PRIVACY) && res2>'5') || (ast_test_flag(&opts, OPT_SCREENING) && res2 > '4') ) /* uh, interrupting with a bad answer is ... ignorable! */
|
||||||
res2 = 0;
|
res2 = 0;
|
||||||
/* now get input from the called party, as to their choice */
|
/* now get input from the called party, as to their choice */
|
||||||
if( !res2 ) {
|
if (!res2) {
|
||||||
if( ast_test_flag(&opts, OPT_PRIVACY) )
|
if( ast_test_flag(&opts, OPT_PRIVACY) )
|
||||||
res2 = ast_play_and_wait(peer,"priv-callee-options");
|
res2 = ast_play_and_wait(peer,"priv-callee-options");
|
||||||
if( ast_test_flag(&opts, OPT_SCREENING) )
|
if( ast_test_flag(&opts, OPT_SCREENING) )
|
||||||
|
@@ -2011,20 +2011,25 @@ static int conf_exec(struct ast_channel *chan, void *data)
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct ast_conf_user* find_user(struct ast_conference *conf, char *callerident) {
|
static struct ast_conf_user* find_user(struct ast_conference *conf, char *callerident)
|
||||||
|
{
|
||||||
struct ast_conf_user *user = NULL;
|
struct ast_conf_user *user = NULL;
|
||||||
char usrno[1024] = "";
|
int cid;
|
||||||
|
|
||||||
if (conf && callerident) {
|
if (!conf || !callerident) {
|
||||||
user = conf->firstuser;
|
return NULL;
|
||||||
while (user) {
|
|
||||||
snprintf(usrno, sizeof(usrno), "%d", user->user_no);
|
|
||||||
if (strcmp(usrno, callerident) == 0)
|
|
||||||
return user;
|
|
||||||
user = user->nextuser;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return NULL;
|
|
||||||
|
sscanf(callerident, "%i", &cid);
|
||||||
|
|
||||||
|
user = conf->firstuser;
|
||||||
|
while (user) {
|
||||||
|
if (user->user_no == cid)
|
||||||
|
break;
|
||||||
|
user = user->nextuser;
|
||||||
|
}
|
||||||
|
|
||||||
|
return user;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*--- admin_exec: The MeetMeadmin application */
|
/*--- admin_exec: The MeetMeadmin application */
|
||||||
|
@@ -5866,11 +5866,9 @@ static int auth_fail(int callno, int failcode)
|
|||||||
ast_mutex_lock(&iaxsl[callno]);
|
ast_mutex_lock(&iaxsl[callno]);
|
||||||
iaxs[callno]->authfail = failcode;
|
iaxs[callno]->authfail = failcode;
|
||||||
if (delayreject) {
|
if (delayreject) {
|
||||||
ast_mutex_lock(&iaxsl[callno]);
|
|
||||||
if (iaxs[callno]->authid > -1)
|
if (iaxs[callno]->authid > -1)
|
||||||
ast_sched_del(sched, iaxs[callno]->authid);
|
ast_sched_del(sched, iaxs[callno]->authid);
|
||||||
iaxs[callno]->authid = ast_sched_add(sched, 1000, auth_reject, (void *)(long)callno);
|
iaxs[callno]->authid = ast_sched_add(sched, 1000, auth_reject, (void *)(long)callno);
|
||||||
ast_mutex_unlock(&iaxsl[callno]);
|
|
||||||
} else
|
} else
|
||||||
auth_reject((void *)(long)callno);
|
auth_reject((void *)(long)callno);
|
||||||
ast_mutex_unlock(&iaxsl[callno]);
|
ast_mutex_unlock(&iaxsl[callno]);
|
||||||
|
Reference in New Issue
Block a user