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