|
|
@@ -10,51 +10,51 @@ public class GZUpCall implements IMessageContent { |
|
|
|
/** |
|
|
|
* 手机号 |
|
|
|
*/ |
|
|
|
private String PhoneNumber; |
|
|
|
private String phoneNumber; |
|
|
|
/** |
|
|
|
* 通话类型 1 CallOut 0 CallIn |
|
|
|
*/ |
|
|
|
private int CallFlag;// |
|
|
|
private int callFlag;// |
|
|
|
/** |
|
|
|
* 通话时间 |
|
|
|
*/ |
|
|
|
private String DateTime ; |
|
|
|
private String dateTime; |
|
|
|
/** |
|
|
|
* 通话时长 |
|
|
|
*/ |
|
|
|
private int Duration; |
|
|
|
private int duration; |
|
|
|
|
|
|
|
|
|
|
|
public String getPhoneNumber() { |
|
|
|
return PhoneNumber; |
|
|
|
return phoneNumber; |
|
|
|
} |
|
|
|
|
|
|
|
public void setPhoneNumber(String phoneNumber) { |
|
|
|
PhoneNumber = phoneNumber; |
|
|
|
this.phoneNumber = phoneNumber; |
|
|
|
} |
|
|
|
|
|
|
|
public int getCallFlag() { |
|
|
|
return CallFlag; |
|
|
|
return callFlag; |
|
|
|
} |
|
|
|
|
|
|
|
public void setCallFlag(int callFlag) { |
|
|
|
CallFlag = callFlag; |
|
|
|
this.callFlag = callFlag; |
|
|
|
} |
|
|
|
|
|
|
|
public String getDateTime() { |
|
|
|
return DateTime; |
|
|
|
return dateTime; |
|
|
|
} |
|
|
|
|
|
|
|
public void setDateTime(String dateTime) { |
|
|
|
DateTime = dateTime; |
|
|
|
this.dateTime = dateTime; |
|
|
|
} |
|
|
|
|
|
|
|
public int getDuration() { |
|
|
|
return Duration; |
|
|
|
return duration; |
|
|
|
} |
|
|
|
|
|
|
|
public void setDuration(int duration) { |
|
|
|
Duration = duration; |
|
|
|
this.duration = duration; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
@@ -77,28 +77,28 @@ public class GZUpCall implements IMessageContent { |
|
|
|
byte[] list = new byte[18]; |
|
|
|
int i=0; |
|
|
|
list[i++] = (byte)getTag(); |
|
|
|
byte[] phone=GZUtil.phoneToByte(PhoneNumber); |
|
|
|
byte[] phone=GZUtil.phoneToByte(phoneNumber); |
|
|
|
System.arraycopy(phone, 0, list, i, phone.length); |
|
|
|
i+=phone.length; |
|
|
|
if(CallFlag==1&&Duration>0){ |
|
|
|
if(callFlag ==1&& duration >0){ |
|
|
|
list[i++] = (byte)0x00; |
|
|
|
} |
|
|
|
else if(CallFlag==1&&Duration==0){ |
|
|
|
else if(callFlag ==1&& duration ==0){ |
|
|
|
list[i++] = (byte)0x01; |
|
|
|
} |
|
|
|
else if(CallFlag==0&&Duration>0){ |
|
|
|
else if(callFlag ==0&& duration >0){ |
|
|
|
list[i++] = (byte)0x02; |
|
|
|
} |
|
|
|
else if(CallFlag==0&&Duration==0){ |
|
|
|
else if(callFlag ==0&& duration ==0){ |
|
|
|
list[i++] = (byte)0x03; |
|
|
|
} |
|
|
|
else { |
|
|
|
list[i++] = (byte)0x04; |
|
|
|
} |
|
|
|
byte[] duration= ByteUtil.toByte(Duration, 2); |
|
|
|
byte[] duration= ByteUtil.toByte(this.duration, 2); |
|
|
|
System.arraycopy(duration, 0, list, i, duration.length); |
|
|
|
i+=duration.length; |
|
|
|
byte[] time=ByteUtil.hexToByteArray(DateTime); |
|
|
|
byte[] time=ByteUtil.hexToByteArray(dateTime); |
|
|
|
System.arraycopy(time, 0, list, i, time.length); |
|
|
|
return list; |
|
|
|
} |
|
|
|