Commit ca715e023479297e0ef6a8b2f8ea6f75d933dec6
1 parent
0c14970a
优化via的branch生成规则
Showing
1 changed file
with
2 additions
and
1 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/utils/SipUtils.java
| @@ -7,6 +7,7 @@ import gov.nist.javax.sip.address.AddressImpl; | @@ -7,6 +7,7 @@ import gov.nist.javax.sip.address.AddressImpl; | ||
| 7 | import gov.nist.javax.sip.address.SipUri; | 7 | import gov.nist.javax.sip.address.SipUri; |
| 8 | import gov.nist.javax.sip.header.Subject; | 8 | import gov.nist.javax.sip.header.Subject; |
| 9 | import gov.nist.javax.sip.message.SIPRequest; | 9 | import gov.nist.javax.sip.message.SIPRequest; |
| 10 | +import org.apache.commons.lang3.RandomStringUtils; | ||
| 10 | import org.springframework.util.ObjectUtils; | 11 | import org.springframework.util.ObjectUtils; |
| 11 | 12 | ||
| 12 | import javax.sip.PeerUnavailableException; | 13 | import javax.sip.PeerUnavailableException; |
| @@ -51,7 +52,7 @@ public class SipUtils { | @@ -51,7 +52,7 @@ public class SipUtils { | ||
| 51 | } | 52 | } |
| 52 | 53 | ||
| 53 | public static String getNewViaTag() { | 54 | public static String getNewViaTag() { |
| 54 | - return "z9hG4bK" + System.currentTimeMillis(); | 55 | + return "z9hG4bK" + RandomStringUtils.randomNumeric(10); |
| 55 | } | 56 | } |
| 56 | 57 | ||
| 57 | public static UserAgentHeader createUserAgentHeader(GitUtil gitUtil) throws PeerUnavailableException, ParseException { | 58 | public static UserAgentHeader createUserAgentHeader(GitUtil gitUtil) throws PeerUnavailableException, ParseException { |