14 Commits

Author SHA1 Message Date
liang chao
b9463f07ac Merge branch 'release/1.0' into 'main'
merge: 1.0-rc3

See merge request galaxy/tsg_olap/sip-rtp-correlation!10
2023-08-28 03:30:06 +00:00
liang chao
35e2807a91 Merge branch 'hotfix/rename' into 'release/1.0'
style: rename job name

See merge request galaxy/tsg_olap/sip-rtp-correlation!9
2023-08-28 03:29:10 +00:00
chaoc
2275f349d1 Merge remote-tracking branch 'origin/release/1.0' into hotfix/rename 2023-08-28 11:27:23 +08:00
chaoc
1fedfbe4b8 style: add plugin reproducible 2023-08-28 11:26:25 +08:00
chaoc
b2f15b3919 style: modify job name 2023-08-28 11:11:02 +08:00
liang chao
8fc8cc7c2d Merge branch 'hotfix/null-point-err' into 'release/1.0'
style: update versions

See merge request galaxy/tsg_olap/sip-rtp-correlation!8
2023-08-21 09:09:25 +00:00
chaoc
98bb843159 style: update versions 2023-08-21 17:08:51 +08:00
liang chao
edb044596e Merge branch 'hotfix/null-point-err' into 'release/1.0'
docs: add hotfix changelog

See merge request galaxy/tsg_olap/sip-rtp-correlation!7
2023-08-21 09:06:49 +00:00
chaoc
557156af79 docs: add hotfix changelog 2023-08-21 17:06:22 +08:00
liang chao
32a811fb1c Merge branch 'hotfix/null-point-err' into 'release/1.0'
fix(utils): fix null point err

See merge request galaxy/tsg_olap/sip-rtp-correlation!6
2023-08-21 08:59:11 +00:00
chaoc
36cbaebf0c fix(utils): fix null point err 2023-08-21 16:57:13 +08:00
liang chao
da572f4bd0 Merge branch 'release/1.0' into 'main'
merge: 1.0.rc1

See merge request galaxy/tsg_olap/sip-rtp-correlation!5
2023-08-16 03:05:22 +00:00
liang chao
77cdd73f02 Merge branch 'hotfix/no-collect-expire-data' into 'main'
fix: cannot collect data due to expiration

See merge request galaxy/tsg_olap/sip-rtp-correlation!4
2023-08-11 06:18:46 +00:00
liang chao
5481a7b9ee Merge branch 'feature/address-keyby-impl' into 'main'
feature: develop job using java

See merge request galaxy/tsg_olap/sip-rtp-correlation!3
2023-08-10 09:39:51 +00:00
4 changed files with 45 additions and 10 deletions

4
CHANGELOG.md Normal file
View File

@@ -0,0 +1,4 @@
# Changelog
### Hotfix
- [#5](https://git.mesalab.cn/galaxy/tsg_olap/sip-rtp-correlation/-/issues/5) 修复了由于 IPUtil 在判断 Ipv6 地址没有判空而引起的空指针异常

16
pom.xml
View File

@@ -7,7 +7,7 @@
<groupId>com.zdjizhi</groupId>
<artifactId>sip-rtp-correlation</artifactId>
<version>1.0-rc1</version>
<version>1.0-rc3</version>
<name>Flink : SIP-RTP : Correlation</name>
@@ -285,6 +285,20 @@
</executions>
</plugin>
<plugin>
<groupId>io.github.zlika</groupId>
<artifactId>reproducible-build-maven-plugin</artifactId>
<version>0.2</version>
<executions>
<execution>
<goals>
<goal>strip-jar</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>

View File

@@ -94,6 +94,6 @@ public class CorrelateApp {
voIpOperator.addSink(producer);
env.execute("VoIP Fusion Job");
env.execute("SIP-RTP-CORRELATION");
}
}

View File

@@ -104,16 +104,16 @@ class MeaninglessAddressProcessFunction extends ProcessFunction<ObjectNode, Obje
record.getServerPort() >= 0;
final SIPRecord sipRecord = new SIPRecord(obj);
boolean cond2 = !IPUtil.isIPAddress(sipRecord.getOriginatorSdpConnectIp())
|| IPUtil.internalIp(sipRecord.getOriginatorSdpConnectIp());
boolean cond3 = !IPUtil.isIPAddress(sipRecord.getResponderSdpConnectIp())
|| IPUtil.internalIp(sipRecord.getResponderSdpConnectIp());
boolean cond4 = IPUtil.isIPAddress(sipRecord.getOriginatorSdpConnectIp())
|| IPUtil.isIPAddress(sipRecord.getResponderSdpConnectIp());
boolean cond2 = !isIPAddress(sipRecord.getOriginatorSdpConnectIp())
|| isInternalIp(sipRecord.getOriginatorSdpConnectIp());
boolean cond3 = !isIPAddress(sipRecord.getResponderSdpConnectIp())
|| isInternalIp(sipRecord.getResponderSdpConnectIp());
boolean cond4 = isIPAddress(sipRecord.getOriginatorSdpConnectIp())
|| isIPAddress(sipRecord.getResponderSdpConnectIp());
boolean cond5 = SchemaType.SIP.equals(sipRecord.getSchemaType());
boolean cond6 = StreamDir.DOUBLE == sipRecord.getStreamDir() &&
IPUtil.internalIp(sipRecord.getResponderSdpConnectIp()) &&
IPUtil.internalIp(sipRecord.getOriginatorSdpConnectIp());
isInternalIp(sipRecord.getResponderSdpConnectIp()) &&
isInternalIp(sipRecord.getOriginatorSdpConnectIp());
// Both client and server addresses in the data are valid.
if (cond1 && (
@@ -132,4 +132,21 @@ class MeaninglessAddressProcessFunction extends ProcessFunction<ObjectNode, Obje
}
}
}
// ======================================================================================
// ----------------------------------- private helper -----------------------------------
private static boolean isIPAddress(final String ipaddr) {
if (null == ipaddr) {
return false;
}
return IPUtil.isIPAddress(ipaddr);
}
private static boolean isInternalIp(final String ipaddr) {
if (!isIPAddress(ipaddr)) {
return false;
}
return IPUtil.internalIp(ipaddr);
}
}