[Fixed displaying empty sessions and updated icons Tijmen de Mes **20150421143930 Ignore-this: 31e9829af7f316e060be9291bc5e2c8d ] hunk ./library/media_sessions.php 378 - print " - - - - - - - - - - - - - - - - - - - - "; + + print " +
 CallersPhonesMedia Streams
Caller addressRelay callerRelay calleeCallee addressStatusCodecTypeDurationBytes
Caller
Bytes
Called
+ + + + + + + + + + + + + + + + + + + + "; hunk ./library/media_sessions.php 402 - $i = 1; - foreach ($this->sessions as $session) { - $from = $session->from_uri; - $to = $session->to_uri; - $fromAgent = $session->caller_ua; - $toAgent = $session->callee_ua; - $fromImage = $this->getImageForUserAgent($fromAgent); - $toImage = $this->getImageForUserAgent($toAgent); - $sc = count($session->streams); + $i = 1; hunk ./library/media_sessions.php 404 - print " + foreach ($this->sessions as $session) { + $from = $session->from_uri; + $to = $session->to_uri; + $fromAgent = $session->caller_ua; + $toAgent = $session->callee_ua; + $fromImage = $this->getImageForUserAgent($fromAgent); + $toImage = $this->getImageForUserAgent($toAgent); + $sc = count($session->streams); + + print " hunk ./library/media_sessions.php 415 - + hunk ./library/media_sessions.php 420 - "; - - $duration = $this->normalizeTime($session->duration); - - foreach ($session->streams as $streamInfo) { - $status = $streamInfo->status; + />"; + } + print ""; + $duration = $this->normalizeTime($session->duration); + if (count($session->streams) > 0) { hunk ./library/media_sessions.php 469 - if ($status=="idle" || $status=='hold') { - $idletime = $this->normalizeTime($streamInfo->timeout_wait); - $status = sprintf("%s %s", $status, $idletime); - } + foreach ($session->streams as $streamInfo) { + $status = $streamInfo->status; hunk ./library/media_sessions.php 472 - $caller = $streamInfo->caller_remote; - $callee = $streamInfo->callee_remote; - $relay_caller = $streamInfo->caller_local; - $relay_callee = $streamInfo->callee_local; + if ($status=="idle" || $status=='hold') { + $idletime = $this->normalizeTime($streamInfo->timeout_wait); + $status = sprintf("%s %s", $status, $idletime); + } hunk ./library/media_sessions.php 477 - $codec = $streamInfo->caller_codec; - $type = $streamInfo->media_type; + $caller = $streamInfo->caller_remote; + $callee = $streamInfo->callee_remote; + $relay_caller = $streamInfo->caller_local; + $relay_callee = $streamInfo->callee_local; hunk ./library/media_sessions.php 482 - if ($caller == '?.?.?.?:?') { - $caller = '–'; // a dash - $align1 = 'center'; - } else { - $align1 = 'left'; - } - if ($callee == '?.?.?.?:?') { - $callee = '–'; // a dash - $align2 = 'center'; - } else { - $align2 = 'left'; - } - if ($codec == 'Unknown') - $codec = '–'; // a dash - if ($type == 'Unknown') - $type = '–'; // a dash - $bytes_in1 = $this->normalizeBytes($streamInfo->caller_bytes); - $bytes_in2 = $this->normalizeBytes($streamInfo->callee_bytes); - print " - - - - + $codec = $streamInfo->caller_codec; + $type = $streamInfo->media_type; hunk ./library/media_sessions.php 485 - - - - - - - "; + if ($caller == '?.?.?.?:?') { + $caller = '–'; // a dash + $align1 = 'center'; + } else { + $align1 = 'left'; hunk ./library/media_sessions.php 491 - $i++; - } - print " -
 CallersPhonesMedia Streams
Caller addressRelay callerRelay calleeCallee addressStatusCodecTypeDurationBytes
Caller
Bytes
Called
$i$i + + "; + if ($fromImage == 'unknown.png') { + print ""; + } else if ($fromImage == 'asterisk.png') { + print ""; + } else { + print " hunk ./library/media_sessions.php 440 - /> + />"; + } + print " hunk ./library/media_sessions.php 444 - + "; + if ($toImage == 'unknown.png') { + print ""; + } else if ($toImage == 'asterisk.png') { + print ""; + } else { + print " hunk ./library/media_sessions.php 463 - /> - $caller$relay_caller$relay_callee$callee$status$codec$type$duration$bytes_in1$bytes_in2
-
"; + if ($callee == '?.?.?.?:?') { + $callee = '–'; // a dash + $align2 = 'center'; + } else { + $align2 = 'left'; + } + if ($codec == 'Unknown') + $codec = '–'; // a dash + if ($type == 'Unknown') + $type = '–'; // a dash + $bytes_in1 = $this->normalizeBytes($streamInfo->caller_bytes); + $bytes_in2 = $this->normalizeBytes($streamInfo->callee_bytes); + print " + $caller + $relay_caller + $relay_callee + $callee hunk ./library/media_sessions.php 509 + $status + $codec + $type + $duration + $bytes_in1 + $bytes_in2 + "; + } + } else { + print ""; + } + $i++; + } + print " + +
";