Hi Stavros.
Quote:
That's the intended behaviour. I think it shows all ANSWERED or ANSWER calls so far this month when you first load the page.
I agree on you. It should display all ANSWERED or ANSWER calls when you first load the page but I believe that it should only display the current date.
Before, without enabling the callback, when you first load the page, it will only display the current date's successful STANDARD (ANSWER) call since the code will select or focus on the "Answered call" radio button in the OPTIONS - SHOW of the Web UI if not set.
Code:
//To select just terminatecause=ANSWER
if (!isset($terminatecause)){
$terminatecause="ANSWER";
After enabling the callback and during the first day of callback, it will display ANSWER and ANSWERED status for successful STANDARD and CALLBACK call respectively. When you make a successful callback on the following day and reload the CDR (without selecting any option), it will show the current date's successful STANDARD and CALLBACK call as well as the previous date's ANSWERED CALLBACK and not displaying the previous date's ANSWER STANDARD call anymore. I believe that the code would only display the current date's successful call and not the current month's successful call.
Quote:
That code looks fine; if the UI selects $terminatecause='ANSWER' it will match either 'ANSWER' or 'ANSWERED'.
Code:
$FG_TABLE_CLAUSE .= " t1.terminatecause='ANSWER' OR t1.terminatecause='ANSWERED' ";
After changing all ANSWERED to ANSWER in the database for the CALLBACK call, and reloading the CDR, it is now displaying only current date's successful STANDARD and CALLBACK calls.
And therefore I conclude that the OR statement is not functioning as expected because if the status have both ANSWER and ANSWERED in the database, it will not only filter ANSWER STANDARD and ANSWERED CALLBACK call of the current date but also ANSWERED CALLBACK call from the previous date.
To fix this problem, I have changed the ANSWERED to ANSWER in the a2billing.php.
BEFORE:
Code:
// SET CORRECTLY THE CALLTIME FOR THE 1st LEG
$RateEngine -> answeredtime = time() - $G_startime;
$RateEngine -> dialstatus = 'ANSWERED';
AFTER:
Code:
// SET CORRECTLY THE CALLTIME FOR THE 1st LEG
$RateEngine -> answeredtime = time() - $G_startime;
$RateEngine -> dialstatus = 'ANSWER';
After doing so, all successful CALLBACK will now have ANSWER as the status in the CDR thus reloading the CDR Report will only display the current date's successful call.
I hope this would help.