|
|
|
@ -25,6 +25,7 @@
|
|
|
|
|
#include <asterisk/musiconhold.h>
|
|
|
|
|
#include <asterisk/callerid.h>
|
|
|
|
|
#include <asterisk/utils.h>
|
|
|
|
|
#include <asterisk/app.h>
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
#include <errno.h>
|
|
|
|
|
#include <unistd.h>
|
|
|
|
@ -477,10 +478,9 @@ static int dial_exec(struct ast_channel *chan, void *data)
|
|
|
|
|
sdtmfptr = strchr(sdtmfdata, ')');
|
|
|
|
|
if (sdtmfptr)
|
|
|
|
|
*sdtmfptr = '\0';
|
|
|
|
|
else {
|
|
|
|
|
else
|
|
|
|
|
ast_log(LOG_WARNING, "D( Data lacking trailing ')'\n");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* XXX LIMIT SUPPORT */
|
|
|
|
|
if ((limitptr = strstr(transfer, "L("))) {
|
|
|
|
@ -494,9 +494,8 @@ static int dial_exec(struct ast_channel *chan, void *data)
|
|
|
|
|
limitptr = strchr(limitdata, ')');
|
|
|
|
|
if (limitptr)
|
|
|
|
|
*limitptr = '\0';
|
|
|
|
|
else {
|
|
|
|
|
else
|
|
|
|
|
ast_log(LOG_WARNING, "Limit Data lacking trailing ')'\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var = pbx_builtin_getvar_helper(chan,"LIMIT_PLAYAUDIO_CALLER");
|
|
|
|
|
play_to_caller = var ? ast_true(var) : 1;
|
|
|
|
@ -544,8 +543,7 @@ static int dial_exec(struct ast_channel *chan, void *data)
|
|
|
|
|
if (!play_warning && !start_sound && !end_sound && timelimit) {
|
|
|
|
|
calldurationlimit=timelimit/1000;
|
|
|
|
|
timelimit=play_to_caller=play_to_callee=play_warning=warning_freq=0;
|
|
|
|
|
}
|
|
|
|
|
else if (option_verbose > 2) {
|
|
|
|
|
} else if (option_verbose > 2) {
|
|
|
|
|
ast_verbose(VERBOSE_PREFIX_3"Limit Data:\n");
|
|
|
|
|
ast_verbose(VERBOSE_PREFIX_3"timelimit=%ld\n",timelimit);
|
|
|
|
|
ast_verbose(VERBOSE_PREFIX_3"play_warning=%ld\n",play_warning);
|
|
|
|
@ -556,7 +554,6 @@ static int dial_exec(struct ast_channel *chan, void *data)
|
|
|
|
|
ast_verbose(VERBOSE_PREFIX_3"warning_sound=%s\n",warning_sound ? warning_sound : "UNDEF");
|
|
|
|
|
ast_verbose(VERBOSE_PREFIX_3"end_sound=%s\n",end_sound ? end_sound : "UNDEF");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* XXX ANNOUNCE SUPPORT */
|
|
|
|
@ -845,8 +842,7 @@ static int dial_exec(struct ast_channel *chan, void *data)
|
|
|
|
|
|
|
|
|
|
// Ok, done. stop autoservice
|
|
|
|
|
res = ast_autoservice_stop(chan);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
} else
|
|
|
|
|
res = 0;
|
|
|
|
|
|
|
|
|
|
if (!res) {
|
|
|
|
@ -854,8 +850,7 @@ static int dial_exec(struct ast_channel *chan, void *data)
|
|
|
|
|
time(&now);
|
|
|
|
|
chan->whentohangup = now + calldurationlimit;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(strlen(sdtmfdata))
|
|
|
|
|
if (!ast_strlen_zero(sdtmfdata))
|
|
|
|
|
res = ast_dtmf_stream(peer,chan,sdtmfdata,0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -873,8 +868,7 @@ static int dial_exec(struct ast_channel *chan, void *data)
|
|
|
|
|
config.end_sound = end_sound;
|
|
|
|
|
config.start_sound = start_sound;
|
|
|
|
|
res = ast_bridge_call(chan,peer,&config);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
} else
|
|
|
|
|
res = -1;
|
|
|
|
|
|
|
|
|
|
if (res != AST_PBX_NO_HANGUP_PEER)
|
|
|
|
|