<? global $vis_language;
	
$calldate = $call_details[0]['calldate'];
$clid = $call_details[0]['clid'];
$src = $call_details[0]['src'];
$dst = $call_details[0]['dst'];
$dcontext = $call_details[0]['dcontext'];
$channel = $call_details[0]['channel'];
$dstchannel = $call_details[0]['dstchannel'];
$lastapp = $call_details[0]['lastapp'];
$lastdata = $call_details[0]['lastdata'];
$duration = $call_details[0]['duration'];
$billsec = $call_details[0]['billsec'];
$disposition = $call_details[0]['disposition'];
$amaflags = $call_details[0]['amaflags'];
$accountcode = $call_details[0]['accountcode'];
$uniqueid = $call_details[0]['uniqueid'];
$userfield = $call_details[0]['userfield'];
$recordingfile = $call_details[0]['recordingfile'];
$cnum = $call_details[0]['cnum'];
$cnam = $call_details[0]['cnam'];
$outbound_cnum = $call_details[0]['outbound_cnum'];
$outbound_cnam = $call_details[0]['outbound_cnam'];
$dst_cnam  = $call_details[0]['dst_cnam'];
$did = $call_details[0]['did'];
$LinkedId = $call_details[0]['LinkedId'];
	
?>
<section id="breadcrumb" class="row m-b m-l-none m-r-none"> 
  <div class="col-sm-6">
    <h3 class="m-b-xs text-black"><? echo $vis_language['TXTCALLDETAILS'];?></h3>
    <ul class="breadcrumb bg-empty no-border m-b-xxs no-padder">
      <li><a class="link" href="#/home/quick_view/<? echo $vis_language['TXTHOME']; ?>"><? echo $vis_language['TXTHOME'];?></a></li>
      <li><a class="link" href="#/voip/asterisk_call/<? echo $vis_language['TXTASTERISK'];?>"><? echo $vis_language['TXTASTERISK'];?></a></li>
      <li><? echo $vis_language['TXTCALLDETAILS'];?></li>
    </ul>
  </div>
</section>
<section class="padder">
  <section class="panel panel-default">
    <div class="wrapper-sm">
	 
      <div class="btn-group">
        <div class="form-group">
          <h5><? echo $vis_language['TXTCALLDETAILS'];?></h5>
        </div>
      </div>	  
	
	  
	  
    <div class="line b-b line-lg pull-in"></div>
    </div>
    <div class="row m-t">
      <div class="col-md-6">
		<div id="created_session_link">
        <div class="row m-b-sm"> <span class="col-xs-3 text-right"><? echo ucfirst($vis_language['TXTXCALLDATE']);?> :</span>
          <div class=" col-xs-9 text-lt text-muted"><? echo $calldate;?></div>
        </div>
        <div class="row m-b-sm"> <span class="col-xs-3 text-right"><? echo ucfirst($vis_language['TXTCHILD']);?> :</span>
          <div class=" col-xs-9 text-lt text-muted"><? echo $clid; ?></div>
        </div>		
		<div class="row m-b-sm"> <span class="col-xs-3 text-right"><? echo ucfirst($vis_language['TXTSRC']);?> :</span>
          <div class=" col-xs-9 text-lt text-muted"><? echo $src; ?></div>
        </div>
		
        <div class="row m-b-sm"> <span class="col-xs-3 text-right"><? echo ucfirst($vis_language['TXTDST']);?> :</span>
          <div class=" col-xs-9 text-lt text-muted"><? echo $dst; ?></div>
        </div>
        <div class="row m-b-sm"> <span class="col-xs-3 text-right "><? echo ucfirst($vis_language['TXTDCONTEXT']);?> :</span>
          <div class=" col-xs-9 text-lt text-muted"><? echo $dcontext; ?></div>
        </div>
         <div class="row m-b-sm"> <span class="col-xs-3 text-right "><? echo ucfirst($vis_language['TXTCHANNEL']);?> :</span>
          <div class=" col-xs-9 text-lt text-muted"><? echo $channel; ?></div>
        </div>  
	   <div class="row m-b-sm"> <span class="col-xs-3 text-right "><? echo ucfirst($vis_language['TXTDSTCHANEL']);?> :</span>
          <div class=" col-xs-9 text-lt text-muted"><? echo $dstchannel; ?></div>
        </div>  
        
        <div class="row m-b-sm"> <span class="col-xs-3 text-right"><? echo ucfirst($vis_language['TXTLASTAPP']);?> :</span>
          <div class=" col-xs-9 text-lt text-muted"><? echo $lastapp;?></div>
        </div>
		<div class="row m-b-sm"> <span class="col-xs-3 text-right"><? echo ucfirst($vis_language['TXTLASTDATA']);?> :</span>
          <div class=" col-xs-9 text-lt text-muted"><? echo $lastdata;?></div>
        </div>
			<div class="row m-b-sm"> <span class="col-xs-3 text-right"><? echo ucfirst($vis_language['TXTDURATION']);?> :</span>
          <div class=" col-xs-9 text-lt text-muted"><? echo $duration.' '.ucfirst($vis_language['TXTSECONDS']);?></div>
        </div>
        <div class="row m-b-sm"> <span class="col-xs-3 text-right"><? echo ucfirst($vis_language['TXTBILLSEC']);?> :</span>
          <div class=" col-xs-9 text-lt text-muted"><? echo $billsec; ?></div>
        </div>
		
		 <div class="row m-b-sm"> <span class="col-xs-3 text-right"><? echo ucfirst($vis_language['TXTDISPOSITION']);?> :</span>
          <div class=" col-xs-9 text-lt text-muted"><? echo $disposition; ?></div>
        </div>
		 <div class="row m-b-sm"> <span class="col-xs-3 text-right"><? echo ucfirst($vis_language['TXTAMAFLAGS']);?> :</span>
          <div class=" col-xs-9 text-lt text-muted"><? echo $amaflags; ?></div>
        </div>
		 <div class="row m-b-sm"> <span class="col-xs-3 text-right"><? echo ucfirst($vis_language['TXTACCOUNTCODE']);?> :</span>
          <div class=" col-xs-9 text-lt text-muted"><? echo $accountcode; ?></div>
        </div>
		 <div class="row m-b-sm"> <span class="col-xs-3 text-right"><? echo ucfirst($vis_language['TXTUNIQUEID']);?> :</span>
          <div class=" col-xs-9 text-lt text-muted"><? echo $uniqueid; ?></div>
        </div>
		 <div class="row m-b-sm"> <span class="col-xs-3 text-right"><? echo ucfirst($vis_language['TXTUSERFIELD']);?> :</span>
          <div class=" col-xs-9 text-lt text-muted"><? echo $userfield; ?></div>
        </div>		 
		<? if($recordingfile !=''){ ?>
        <div class="row m-b-sm">  <span class="col-xs-3 text-right"><? echo ucfirst($vis_language['TXTRECORDINGFILE']);?> :</span>
          <div class=" col-xs-9 text-lt text-muted">
		  <audio src="<?php echo $rec_url_path.$recordingfile; ?>" controls preload="auto" autobuffer ></audio>
		  </div>
        </div>
		<?php } ?>
		
		 <div class="row m-b-sm"> <span class="col-xs-3 text-right"><? echo ucfirst($vis_language['TXTCNUM']);?> :</span>
          <div class=" col-xs-9 text-lt text-muted"><? echo $cnum; ?></div>
        </div>
		 <div class="row m-b-sm"> <span class="col-xs-3 text-right"><? echo ucfirst($vis_language['TXTCNAM']);?> :</span>
          <div class=" col-xs-9 text-lt text-muted"><? echo $cnam; ?></div>
        </div>
		 <div class="row m-b-sm"> <span class="col-xs-3 text-right"><? echo ucfirst($vis_language['TXTOUTBOUNDCNUM']);?> :</span>
          <div class=" col-xs-9 text-lt text-muted"><? echo $outbound_cnum; ?></div>
        </div>
		 <div class="row m-b-sm"> <span class="col-xs-3 text-right"><? echo ucfirst($vis_language['TXTOUTBOUNDCNAM']);?> :</span>
          <div class=" col-xs-9 text-lt text-muted"><? echo $coutbound_cnam; ?></div>
        </div>
		 <div class="row m-b-sm"> <span class="col-xs-3 text-right"><? echo ucfirst($vis_language['TXTDSTCNAM']);?> :</span>
          <div class=" col-xs-9 text-lt text-muted"><? echo $dst_cnam; ?></div>
        </div>
		 <div class="row m-b-sm"> <span class="col-xs-3 text-right"><? echo ucfirst($vis_language['TXTDID']);?> :</span>
          <div class=" col-xs-9 text-lt text-muted"><? echo $did; ?></div>
        </div>
		 <div class="row m-b-sm"> <span class="col-xs-3 text-right"><? echo ucfirst($vis_language['TXTLINKEDID']);?> :</span>
          <div class=" col-xs-9 text-lt text-muted"><? echo $LinkedId; ?></div>
        </div>

        </div>
        <div class="row m-b-sm"> </div>
       <div class="row m-b-sm"> <span class="col-xs-3 text-right"></span>
          <div class=" col-xs-9 text-lt text-muted"> <!--<button type="button" class="btn btn-primary" onclick="SelectText('created_session_link')"><?// echo $vis_language['TXTCOPYTOCLIPBOARD']; ?></button> -->
		  <?php if(isset($operation['vis_domain_id'])){ ?>
		  <a href="javascript:void(0);" class="btn btn-primary" data-toggle="ajaxModal" data-modal-arguments="vis_module=ticket&vis_operation=new_ticket_step_one&vis_static_area=vis_open_new_dialog&vis_chat_type=asterisk&vis_email_id=<? echo str_replace(' ','',$calls_array->raw_digits) ?>&vis_domain_id=<? echo $operation['vis_domain_id']; ?>&vis_asterisk_domain_id=<? echo $operation['vis_domain_id']; ?>&vis_chat_id=<? echo $call_id; ?>" onclick="" ><? echo $vis_language['TXTCONVERTTOTICKET']; ?></a>
		  <?php } ?>
		  </div>
        </div>
      </div>

      <div class="col-md-6"></div>
    </div>
  </section>
</section>
<script>
function SelectText(element) {
    var doc = document
        , text = doc.getElementById(element)
        , range, selection
    ;
    if (doc.body.createTextRange) {
        range = document.body.createTextRange();
        range.moveToElementText(text);
        range.select();
    } else if (window.getSelection) {
        selection = window.getSelection();
        range = document.createRange();
        range.selectNodeContents(text);
        selection.removeAllRanges();
        selection.addRange(range);
    }
}

</script>
