SipTransactionInfo.java 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. package com.genersoft.iot.vmp.gb28181.bean;
  2. import gov.nist.javax.sip.message.SIPResponse;
  3. public class SipTransactionInfo {
  4. private String callId;
  5. private String fromTag;
  6. private String toTag;
  7. private String viaBranch;
  8. // 自己是否媒体流发送者
  9. private boolean asSender;
  10. public SipTransactionInfo(SIPResponse response, boolean asSender) {
  11. this.callId = response.getCallIdHeader().getCallId();
  12. this.fromTag = response.getFromTag();
  13. this.toTag = response.getToTag();
  14. this.viaBranch = response.getTopmostViaHeader().getBranch();
  15. this.asSender = asSender;
  16. }
  17. public SipTransactionInfo(SIPResponse response) {
  18. this.callId = response.getCallIdHeader().getCallId();
  19. this.fromTag = response.getFromTag();
  20. this.toTag = response.getToTag();
  21. this.viaBranch = response.getTopmostViaHeader().getBranch();
  22. this.asSender = false;
  23. }
  24. public SipTransactionInfo() {
  25. }
  26. public String getCallId() {
  27. return callId;
  28. }
  29. public void setCallId(String callId) {
  30. this.callId = callId;
  31. }
  32. public String getFromTag() {
  33. return fromTag;
  34. }
  35. public void setFromTag(String fromTag) {
  36. this.fromTag = fromTag;
  37. }
  38. public String getToTag() {
  39. return toTag;
  40. }
  41. public void setToTag(String toTag) {
  42. this.toTag = toTag;
  43. }
  44. public String getViaBranch() {
  45. return viaBranch;
  46. }
  47. public void setViaBranch(String viaBranch) {
  48. this.viaBranch = viaBranch;
  49. }
  50. public boolean isAsSender() {
  51. return asSender;
  52. }
  53. public void setAsSender(boolean asSender) {
  54. this.asSender = asSender;
  55. }
  56. }