mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
More RSW merges. Everything from apps/ except for the big offenders
app_voicemail and app_queue. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@137055 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1193,7 +1193,7 @@ static int osp_finish(
|
||||
int recorded,
|
||||
int cause,
|
||||
time_t start,
|
||||
time_t connect,
|
||||
time_t connect_time,
|
||||
time_t end,
|
||||
unsigned int release)
|
||||
{
|
||||
@@ -1216,11 +1216,11 @@ static int osp_finish(
|
||||
|
||||
error = OSPPTransactionReportUsage(
|
||||
handle,
|
||||
difftime(end, connect),
|
||||
difftime(end, connect_time),
|
||||
start,
|
||||
end,
|
||||
alert,
|
||||
connect,
|
||||
connect_time,
|
||||
isPddInfoPresent,
|
||||
pdd,
|
||||
release,
|
||||
@@ -1664,7 +1664,7 @@ static int ospfinished_exec(
|
||||
int inhandle = OSP_INVALID_HANDLE;
|
||||
int outhandle = OSP_INVALID_HANDLE;
|
||||
int recorded = 0;
|
||||
time_t start, connect, end;
|
||||
time_t start, connect_time, end;
|
||||
unsigned int release;
|
||||
char buffer[OSP_INTSTR_SIZE];
|
||||
const char* status;
|
||||
@@ -1713,24 +1713,24 @@ static int ospfinished_exec(
|
||||
|
||||
if (chan->cdr) {
|
||||
start = chan->cdr->start.tv_sec;
|
||||
connect = chan->cdr->answer.tv_sec;
|
||||
if (connect) {
|
||||
connect_time = chan->cdr->answer.tv_sec;
|
||||
if (connect_time) {
|
||||
end = time(NULL);
|
||||
} else {
|
||||
end = connect;
|
||||
end = connect_time;
|
||||
}
|
||||
} else {
|
||||
start = 0;
|
||||
connect = 0;
|
||||
connect_time = 0;
|
||||
end = 0;
|
||||
}
|
||||
ast_debug(1, "OSPFinish: start '%ld'\n", start);
|
||||
ast_debug(1, "OSPFinish: connect '%ld'\n", connect);
|
||||
ast_debug(1, "OSPFinish: connect '%ld'\n", connect_time);
|
||||
ast_debug(1, "OSPFinish: end '%ld'\n", end);
|
||||
|
||||
release = ast_check_hangup(chan) ? 0 : 1;
|
||||
|
||||
if (osp_finish(outhandle, recorded, cause, start, connect, end, release) <= 0) {
|
||||
if (osp_finish(outhandle, recorded, cause, start, connect_time, end, release) <= 0) {
|
||||
ast_debug(1, "OSPFinish: Unable to report usage for outbound call\n");
|
||||
}
|
||||
switch (cause) {
|
||||
@@ -1740,7 +1740,7 @@ static int ospfinished_exec(
|
||||
cause = AST_CAUSE_NO_ROUTE_DESTINATION;
|
||||
break;
|
||||
}
|
||||
if (osp_finish(inhandle, recorded, cause, start, connect, end, release) <= 0) {
|
||||
if (osp_finish(inhandle, recorded, cause, start, connect_time, end, release) <= 0) {
|
||||
ast_debug(1, "OSPFinish: Unable to report usage for inbound call\n");
|
||||
}
|
||||
snprintf(buffer, sizeof(buffer), "%d", OSP_INVALID_HANDLE);
|
||||
|
Reference in New Issue
Block a user