Skip to content

Commit

Permalink
last fix for cflow
Browse files Browse the repository at this point in the history
  • Loading branch information
adubovikov committed May 15, 2016
1 parent a971662 commit 2edfcbd
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions api/RestApi/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -1020,8 +1020,15 @@ public function doSearchTransaction($timestamp, $param) {
$rtpinfo = array();
$localdata = array();

/* RTC call */
$data = $this->getRTCForTransaction($timestamp, $param);
foreach($data as $row) {
$localdata[] = $this->getRTCflow((object) $row, $hosts, $info, $uac, $hostcount, $rtpinfo, true);
//if(!$min_ts) $min_ts = $row['micro_ts'];
}

$data = $this->getMessagesForTransaction($timestamp, $param);

foreach($data as $row) {
$localdata[] = $this->getSIPCflow((object) $row, $hosts, $info, $uac, $hostcount, $rtpinfo, true);
if(!$min_ts) $min_ts = $row['micro_ts'];
Expand All @@ -1030,12 +1037,7 @@ public function doSearchTransaction($timestamp, $param) {
//print_r($localdata);
//exit;

/* RTC call */
$data = $this->getRTCForTransaction($timestamp, $param);
foreach($data as $row) {
$localdata[] = $this->getRTCflow((object) $row, $hosts, $info, $uac, $hostcount, $rtpinfo, true);
//if(!$min_ts) $min_ts = $row['micro_ts'];
}


//print_r($data);
//exit;
Expand Down Expand Up @@ -1463,11 +1465,11 @@ function getRTCflow($data, &$hosts, &$info, &$uac, &$hostcount, &$rtpinfo, $mess
$calldata["method_text"] = $method_text;

// MSG Temperature
if(preg_match('/^40|50/', $method_text )) $msgcol = "red";
else if(preg_match('/^30|SUBSCRIBE|OPTIONS|NOTIFY/', $method_text)) $msgcol = "purple";
else if(preg_match('/^20/', $method_text)) $msgcol = "green";
else if(preg_match('/^INVITE/', $method_text)) $msgcol = 'blue';
else $msgcol = 'red';
if(preg_match('/^call.end/', $method_text )) $msgcol = "red";
else if(preg_match('/^call.accept/', $method_text)) $msgcol = "green";
else if(preg_match('/^call.ringing/', $method_text)) $msgcol = "purple";
else if(preg_match('/^call.start/', $method_text)) $msgcol = 'blue';
else $msgcol = 'black';

$calldata["msg_color"] = $msgcol;

Expand Down

0 comments on commit 2edfcbd

Please sign in to comment.