function get_Callrecord(){
var arr =[];
callRecord.openCallRecord(function(ret) {
var jsondata = ret.CallRecord;
for (var i=0;i<jsondata.length;i++){
if(jsondata[i].type=='呼入'){
arr.push(jsondata[i]);
}
}
arr.sort(uptime);
// alert(JSON.stringify(ret));
alert(JSON.stringify(arr));
});
}
//按照升序排列
function up(x,y){
return x.type-y.type;
}
//按照降序排列
function uptime(x,y){
return Date.parse(y.time)-Date.parse(x.time);
} 