Merge pull request #147 from DSheirer/81-p25-call-priority-and-encrypted-state

Resolves #81 - adds priority, encrypted channel, session mode and cal…
This commit is contained in:
Denny Sheirer
2017-01-28 14:47:12 -05:00
committed by GitHub

View File

@@ -2731,12 +2731,16 @@ public class P25DecoderState extends DecoderState
} }
else else
{ {
StringBuilder details = new StringBuilder();
details.append(pgvcg.isEmergency() ? "EMERGENCY " : "");
details.append("PRI:").append(pgvcg.getPriority());
details.append(pgvcg.isEncryptedChannel() ? " ENCRYPTED" : "");
details.append(" ").append(pgvcg.getSessionMode().name());
P25CallEvent event = new P25CallEvent.Builder(CallEventType.PATCH_GROUP_CALL) P25CallEvent event = new P25CallEvent.Builder(CallEventType.PATCH_GROUP_CALL)
.aliasList(getAliasList()) .aliasList(getAliasList())
.channel(channel) .channel(channel)
.details((pgvcg.isEncrypted() ? "ENCRYPTED " : "") + .details(details.toString())
(pgvcg.isEmergency() ? " EMERGENCY " : "") +
"PATCH SESSION MODE:" + pgvcg.getSessionMode().name())
.frequency(pgvcg.getDownlinkFrequency()) .frequency(pgvcg.getDownlinkFrequency())
.from(from) .from(from)
.to(to) .to(to)
@@ -3010,11 +3014,16 @@ public class P25DecoderState extends DecoderState
} }
else else
{ {
StringBuilder details = new StringBuilder();
details.append(gdcg.isEmergency() ? "EMERGENCY " : "");
details.append("PRI:").append(gdcg.getPriority()).append(" ");
details.append(gdcg.isEncryptedChannel() ? "ENCRYPTED " : "");
details.append(gdcg.getSessionMode().name());
P25CallEvent event = new P25CallEvent.Builder(CallEventType.DATA_CALL) P25CallEvent event = new P25CallEvent.Builder(CallEventType.DATA_CALL)
.aliasList(getAliasList()) .aliasList(getAliasList())
.channel(channel) .channel(channel)
.details((gdcg.isEncrypted() ? "ENCRYPTED" : "") + .details(details.toString())
(gdcg.isEmergency() ? " EMERGENCY" : ""))
.frequency(gdcg.getDownlinkFrequency()) .frequency(gdcg.getDownlinkFrequency())
.from(from) .from(from)
.to(to) .to(to)
@@ -3043,11 +3052,16 @@ public class P25DecoderState extends DecoderState
} }
else else
{ {
StringBuilder details = new StringBuilder();
details.append(gvcg.isEmergency() ? "EMERGENCY " : "");
details.append("PRI:").append(gvcg.getPriority()).append(" ");
details.append(gvcg.isEncryptedChannel() ? "ENCRYPTED " : "");
details.append(gvcg.getSessionMode().name());
P25CallEvent event = new P25CallEvent.Builder(CallEventType.GROUP_CALL) P25CallEvent event = new P25CallEvent.Builder(CallEventType.GROUP_CALL)
.aliasList(getAliasList()) .aliasList(getAliasList())
.channel(channel) .channel(channel)
.details((gvcg.isEncrypted() ? "ENCRYPTED" : "") + .details(details.toString())
(gvcg.isEmergency() ? " EMERGENCY" : ""))
.frequency(gvcg.getDownlinkFrequency()) .frequency(gvcg.getDownlinkFrequency())
.from(from) .from(from)
.to(to) .to(to)
@@ -3074,12 +3088,17 @@ public class P25DecoderState extends DecoderState
} }
else else
{ {
StringBuilder details = new StringBuilder();
details.append(gvcgu.isEmergency() ? "EMERGENCY " : "");
details.append("PRI:").append(gvcgu.getPriority()).append(" ");
details.append(gvcgu.isEncryptedChannel() ? "ENCRYPTED " : "");
details.append(gvcgu.getSessionMode().name());
P25CallEvent event = new P25CallEvent.Builder(CallEventType.GROUP_CALL) P25CallEvent event = new P25CallEvent.Builder(CallEventType.GROUP_CALL)
.aliasList(getAliasList()) .aliasList(getAliasList())
.channel(channel) .channel(channel)
.channel(gvcgu.getChannel1()) .channel(gvcgu.getChannel1())
.details((gvcgu.isEncrypted() ? "ENCRYPTED" : "") + .details(details.toString())
(gvcgu.isEmergency() ? " EMERGENCY" : ""))
.frequency(gvcgu.getDownlinkFrequency1()) .frequency(gvcgu.getDownlinkFrequency1())
.from(from) .from(from)
.to(to) .to(to)
@@ -3103,11 +3122,16 @@ public class P25DecoderState extends DecoderState
} }
else else
{ {
StringBuilder details = new StringBuilder();
details.append(gvcgu.isEmergency() ? "EMERGENCY " : "");
details.append("PRI:").append(gvcgu.getPriority()).append(" ");
details.append(gvcgu.isEncryptedChannel() ? "ENCRYPTED " : "");
details.append(gvcgu.getSessionMode().name());
P25CallEvent event2 = new P25CallEvent.Builder(CallEventType.GROUP_CALL) P25CallEvent event2 = new P25CallEvent.Builder(CallEventType.GROUP_CALL)
.aliasList(getAliasList()) .aliasList(getAliasList())
.channel(gvcgu.getChannel2()) .channel(gvcgu.getChannel2())
.details((gvcgu.isEncrypted() ? "ENCRYPTED" : "") + .details(details.toString())
(gvcgu.isEmergency() ? " EMERGENCY" : ""))
.frequency(gvcgu.getDownlinkFrequency2()) .frequency(gvcgu.getDownlinkFrequency2())
.to(gvcgu.getGroupAddress2()) .to(gvcgu.getGroupAddress2())
.build(); .build();
@@ -3135,11 +3159,16 @@ public class P25DecoderState extends DecoderState
} }
else else
{ {
StringBuilder details = new StringBuilder();
details.append(gvcgue.isEmergency() ? "EMERGENCY " : "");
details.append("PRI:").append(gvcgue.getPriority()).append(" ");
details.append(gvcgue.isEncryptedChannel() ? "ENCRYPTED " : "");
details.append(gvcgue.getSessionMode().name());
P25CallEvent event = new P25CallEvent.Builder(CallEventType.GROUP_CALL) P25CallEvent event = new P25CallEvent.Builder(CallEventType.GROUP_CALL)
.aliasList(getAliasList()) .aliasList(getAliasList())
.channel(channel) .channel(channel)
.details((gvcgue.isEncrypted() ? "ENCRYPTED" : "") + .details(details.toString())
(gvcgue.isEmergency() ? " EMERGENCY" : ""))
.frequency(gvcgue.getDownlinkFrequency()) .frequency(gvcgue.getDownlinkFrequency())
.from(from) .from(from)
.to(to) .to(to)
@@ -3165,11 +3194,16 @@ public class P25DecoderState extends DecoderState
} }
else else
{ {
StringBuilder details = new StringBuilder();
details.append(idcg.isEmergency() ? "EMERGENCY " : "");
details.append("PRI:").append(idcg.getPriority()).append(" ");
details.append(idcg.isEncryptedChannel() ? "ENCRYPTED " : "");
details.append(idcg.getSessionMode().name());
P25CallEvent event = new P25CallEvent.Builder(CallEventType.DATA_CALL) P25CallEvent event = new P25CallEvent.Builder(CallEventType.DATA_CALL)
.aliasList(getAliasList()) .aliasList(getAliasList())
.channel(channel) .channel(channel)
.details((idcg.isEncrypted() ? "ENCRYPTED" : "") + .details(details.toString())
(idcg.isEmergency() ? " EMERGENCY" : ""))
.frequency(idcg.getDownlinkFrequency()) .frequency(idcg.getDownlinkFrequency())
.from(from) .from(from)
.to(to) .to(to)
@@ -3198,11 +3232,15 @@ public class P25DecoderState extends DecoderState
} }
else else
{ {
StringBuilder details = new StringBuilder();
details.append(sdcg.isEmergency() ? "EMERGENCY " : "");
details.append(sdcg.isEncryptedChannel() ? "ENCRYPTED " : "");
details.append(sdcg.getSessionMode().name());
P25CallEvent event = new P25CallEvent.Builder(CallEventType.DATA_CALL) P25CallEvent event = new P25CallEvent.Builder(CallEventType.DATA_CALL)
.aliasList(getAliasList()) .aliasList(getAliasList())
.channel(channel) .channel(channel)
.details((sdcg.isEncrypted() ? "ENCRYPTED" : "") + .details(details.toString())
(sdcg.isEmergency() ? " EMERGENCY" : ""))
.frequency(sdcg.getDownlinkFrequency()) .frequency(sdcg.getDownlinkFrequency())
.from(from) .from(from)
.to(to) .to(to)
@@ -3234,13 +3272,18 @@ public class P25DecoderState extends DecoderState
} }
else else
{ {
StringBuilder details = new StringBuilder();
details.append(tivcg.isEmergency() ? "EMERGENCY " : "");
details.append("PRI:").append(tivcg.getPriority()).append(" ");
details.append(tivcg.isEncryptedChannel() ? "ENCRYPTED " : "");
details.append(tivcg.getSessionMode().name()).append(" ");
details.append("CALL TIMER:").append(tivcg.getCallTimer());
P25CallEvent event = new P25CallEvent.Builder( P25CallEvent event = new P25CallEvent.Builder(
CallEventType.TELEPHONE_INTERCONNECT) CallEventType.TELEPHONE_INTERCONNECT)
.aliasList(getAliasList()) .aliasList(getAliasList())
.channel(channel) .channel(channel)
.details((tivcg.isEncrypted() ? "ENCRYPTED " : "") + .details(details.toString())
(tivcg.isEmergency() ? "EMERGENCY " : "") +
"CALL TIMER:" + tivcg.getCallTimer())
.frequency(tivcg.getDownlinkFrequency()) .frequency(tivcg.getDownlinkFrequency())
.from(from) .from(from)
.to(to) .to(to)
@@ -3271,13 +3314,18 @@ public class P25DecoderState extends DecoderState
} }
else else
{ {
StringBuilder details = new StringBuilder();
details.append(tivcgu.isEmergency() ? "EMERGENCY " : "");
details.append("PRI:").append(tivcgu.getPriority()).append(" ");
details.append(tivcgu.isEncryptedChannel() ? "ENCRYPTED " : "");
details.append(tivcgu.getSessionMode().name()).append(" ");
details.append("CALL TIMER:").append(tivcgu.getCallTimer());
P25CallEvent event = new P25CallEvent.Builder( P25CallEvent event = new P25CallEvent.Builder(
CallEventType.TELEPHONE_INTERCONNECT) CallEventType.TELEPHONE_INTERCONNECT)
.aliasList(getAliasList()) .aliasList(getAliasList())
.channel(channel) .channel(channel)
.details((tivcgu.isEncrypted() ? "ENCRYPTED " : "") + .details(details.toString())
(tivcgu.isEmergency() ? "EMERGENCY " : "") +
"CALL TIMER:" + tivcgu.getCallTimer())
.frequency(tivcgu.getDownlinkFrequency()) .frequency(tivcgu.getDownlinkFrequency())
.from(from) .from(from)
.to(to) .to(to)
@@ -3305,12 +3353,17 @@ public class P25DecoderState extends DecoderState
} }
else else
{ {
StringBuilder details = new StringBuilder();
details.append(uuvcg.isEmergency() ? "EMERGENCY " : "");
details.append("PRI:").append(uuvcg.getPriority()).append(" ");
details.append(uuvcg.isEncryptedChannel() ? " ENCRYPTED " : "");
details.append(uuvcg.getSessionMode().name());
P25CallEvent event = new P25CallEvent.Builder( P25CallEvent event = new P25CallEvent.Builder(
CallEventType.UNIT_TO_UNIT_CALL) CallEventType.UNIT_TO_UNIT_CALL)
.aliasList(getAliasList()) .aliasList(getAliasList())
.channel(channel) .channel(channel)
.details((uuvcg.isEncrypted() ? "ENCRYPTED " : "") + .details(details.toString())
(uuvcg.isEmergency() ? "EMERGENCY " : ""))
.frequency(uuvcg.getDownlinkFrequency()) .frequency(uuvcg.getDownlinkFrequency())
.from(from) .from(from)
.to(to) .to(to)
@@ -3338,12 +3391,17 @@ public class P25DecoderState extends DecoderState
} }
else else
{ {
StringBuilder details = new StringBuilder();
details.append(uuvcgu.isEmergency() ? "EMERGENCY " : "");
details.append("PRI:").append(uuvcgu.getPriority()).append(" ");
details.append(uuvcgu.isEncryptedChannel() ? "ENCRYPTED " : "");
details.append(uuvcgu.getSessionMode().name());
P25CallEvent event = new P25CallEvent.Builder( P25CallEvent event = new P25CallEvent.Builder(
CallEventType.UNIT_TO_UNIT_CALL) CallEventType.UNIT_TO_UNIT_CALL)
.aliasList(getAliasList()) .aliasList(getAliasList())
.channel(channel) .channel(channel)
.details((uuvcgu.isEncrypted() ? "ENCRYPTED " : "") + .details(details.toString())
(uuvcgu.isEmergency() ? "EMERGENCY " : ""))
.frequency(uuvcgu.getDownlinkFrequency()) .frequency(uuvcgu.getDownlinkFrequency())
.from(from) .from(from)
.to(to) .to(to)