Commit 84cc6e092a4c0f4aba3ffbef71325b844e0a4bea
1 parent
c96ab05d
解决低级编译问题
Showing
2 changed files
with
84 additions
and
69 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/SIPRequestHeaderProvider.java
| ... | ... | @@ -4,6 +4,9 @@ import java.text.ParseException; |
| 4 | 4 | import java.util.ArrayList; |
| 5 | 5 | |
| 6 | 6 | import javax.sip.InvalidArgumentException; |
| 7 | +import javax.sip.PeerUnavailableException; | |
| 8 | +import javax.sip.SipFactory; | |
| 9 | +import javax.sip.SipProvider; | |
| 7 | 10 | import javax.sip.address.Address; |
| 8 | 11 | import javax.sip.address.SipURI; |
| 9 | 12 | import javax.sip.header.CSeqHeader; |
| ... | ... | @@ -16,10 +19,10 @@ import javax.sip.header.ViaHeader; |
| 16 | 19 | import javax.sip.message.Request; |
| 17 | 20 | |
| 18 | 21 | import org.springframework.beans.factory.annotation.Autowired; |
| 22 | +import org.springframework.beans.factory.annotation.Qualifier; | |
| 19 | 23 | import org.springframework.stereotype.Component; |
| 20 | 24 | |
| 21 | 25 | import com.genersoft.iot.vmp.conf.SipConfig; |
| 22 | -import com.genersoft.iot.vmp.gb28181.SipLayer; | |
| 23 | 26 | import com.genersoft.iot.vmp.gb28181.bean.Device; |
| 24 | 27 | import com.genersoft.iot.vmp.gb28181.bean.Host; |
| 25 | 28 | |
| ... | ... | @@ -32,132 +35,140 @@ import com.genersoft.iot.vmp.gb28181.bean.Host; |
| 32 | 35 | public class SIPRequestHeaderProvider { |
| 33 | 36 | |
| 34 | 37 | @Autowired |
| 35 | - private SipLayer layer; | |
| 36 | - | |
| 37 | - @Autowired | |
| 38 | 38 | private SipConfig sipConfig; |
| 39 | 39 | |
| 40 | - public Request createMessageRequest(Device device, String content, String viaTag, String fromTag, String toTag) throws ParseException, InvalidArgumentException { | |
| 40 | + @Autowired | |
| 41 | + private SipFactory sipFactory; | |
| 42 | + | |
| 43 | + @Autowired | |
| 44 | + @Qualifier(value="tcpSipProvider") | |
| 45 | + private SipProvider tcpSipProvider; | |
| 46 | + | |
| 47 | + @Autowired | |
| 48 | + @Qualifier(value="udpSipProvider") | |
| 49 | + private SipProvider udpSipProvider; | |
| 50 | + | |
| 51 | + public Request createMessageRequest(Device device, String content, String viaTag, String fromTag, String toTag) throws ParseException, InvalidArgumentException, PeerUnavailableException { | |
| 41 | 52 | Request request = null; |
| 42 | 53 | Host host = device.getHost(); |
| 43 | 54 | // sipuri |
| 44 | - SipURI requestURI = layer.getAddressFactory().createSipURI(device.getDeviceId(), host.getAddress()); | |
| 55 | + SipURI requestURI = sipFactory.createAddressFactory().createSipURI(device.getDeviceId(), host.getAddress()); | |
| 45 | 56 | // via |
| 46 | 57 | ArrayList<ViaHeader> viaHeaders = new ArrayList<ViaHeader>(); |
| 47 | - ViaHeader viaHeader = layer.getHeaderFactory().createViaHeader(sipConfig.getSipIp(), sipConfig.getSipPort(), | |
| 58 | + ViaHeader viaHeader = sipFactory.createHeaderFactory().createViaHeader(sipConfig.getSipIp(), sipConfig.getSipPort(), | |
| 48 | 59 | device.getTransport(), viaTag); |
| 49 | 60 | viaHeader.setRPort(); |
| 50 | 61 | viaHeaders.add(viaHeader); |
| 51 | 62 | // from |
| 52 | - SipURI fromSipURI = layer.getAddressFactory().createSipURI(sipConfig.getSipId(), | |
| 63 | + SipURI fromSipURI = sipFactory.createAddressFactory().createSipURI(sipConfig.getSipId(), | |
| 53 | 64 | sipConfig.getSipIp() + ":" + sipConfig.getSipPort()); |
| 54 | - Address fromAddress = layer.getAddressFactory().createAddress(fromSipURI); | |
| 55 | - FromHeader fromHeader = layer.getHeaderFactory().createFromHeader(fromAddress, fromTag); | |
| 65 | + Address fromAddress = sipFactory.createAddressFactory().createAddress(fromSipURI); | |
| 66 | + FromHeader fromHeader = sipFactory.createHeaderFactory().createFromHeader(fromAddress, fromTag); | |
| 56 | 67 | // to |
| 57 | - SipURI toSipURI = layer.getAddressFactory().createSipURI(device.getDeviceId(), sipConfig.getSipDomain()); | |
| 58 | - Address toAddress = layer.getAddressFactory().createAddress(toSipURI); | |
| 59 | - ToHeader toHeader = layer.getHeaderFactory().createToHeader(toAddress, toTag); | |
| 68 | + SipURI toSipURI = sipFactory.createAddressFactory().createSipURI(device.getDeviceId(), sipConfig.getSipDomain()); | |
| 69 | + Address toAddress = sipFactory.createAddressFactory().createAddress(toSipURI); | |
| 70 | + ToHeader toHeader = sipFactory.createHeaderFactory().createToHeader(toAddress, toTag); | |
| 60 | 71 | // callid |
| 61 | - CallIdHeader callIdHeader = device.getTransport().equals("TCP") ? layer.getTcpSipProvider().getNewCallId() | |
| 62 | - : layer.getUdpSipProvider().getNewCallId(); | |
| 72 | + CallIdHeader callIdHeader = device.getTransport().equals("TCP") ? tcpSipProvider.getNewCallId() | |
| 73 | + : udpSipProvider.getNewCallId(); | |
| 63 | 74 | // Forwards |
| 64 | - MaxForwardsHeader maxForwards = layer.getHeaderFactory().createMaxForwardsHeader(70); | |
| 75 | + MaxForwardsHeader maxForwards = sipFactory.createHeaderFactory().createMaxForwardsHeader(70); | |
| 65 | 76 | // ceq |
| 66 | - CSeqHeader cSeqHeader = layer.getHeaderFactory().createCSeqHeader(1L, Request.MESSAGE); | |
| 77 | + CSeqHeader cSeqHeader = sipFactory.createHeaderFactory().createCSeqHeader(1L, Request.MESSAGE); | |
| 67 | 78 | |
| 68 | - request = layer.getMessageFactory().createRequest(requestURI, Request.MESSAGE, callIdHeader, cSeqHeader, fromHeader, | |
| 79 | + request = sipFactory.createMessageFactory().createRequest(requestURI, Request.MESSAGE, callIdHeader, cSeqHeader, fromHeader, | |
| 69 | 80 | toHeader, viaHeaders, maxForwards); |
| 70 | - ContentTypeHeader contentTypeHeader = layer.getHeaderFactory().createContentTypeHeader("Application", "MANSCDP+xml"); | |
| 81 | + ContentTypeHeader contentTypeHeader = sipFactory.createHeaderFactory().createContentTypeHeader("Application", "MANSCDP+xml"); | |
| 71 | 82 | request.setContent(content, contentTypeHeader); |
| 72 | 83 | return request; |
| 73 | 84 | } |
| 74 | 85 | |
| 75 | - public Request createInviteRequest(Device device, String channelId, String content, String viaTag, String fromTag, String toTag) throws ParseException, InvalidArgumentException { | |
| 86 | + public Request createInviteRequest(Device device, String channelId, String content, String viaTag, String fromTag, String toTag) throws ParseException, InvalidArgumentException, PeerUnavailableException { | |
| 76 | 87 | Request request = null; |
| 77 | 88 | Host host = device.getHost(); |
| 78 | 89 | //请求行 |
| 79 | - SipURI requestLine = layer.getAddressFactory().createSipURI(channelId, host.getAddress()); | |
| 90 | + SipURI requestLine = sipFactory.createAddressFactory().createSipURI(channelId, host.getAddress()); | |
| 80 | 91 | //via |
| 81 | 92 | ArrayList<ViaHeader> viaHeaders = new ArrayList<ViaHeader>(); |
| 82 | - // ViaHeader viaHeader = layer.getHeaderFactory().createViaHeader(sipConfig.getSipIp(), sipConfig.getSipPort(), device.getTransport(), viaTag); | |
| 83 | - ViaHeader viaHeader = layer.getHeaderFactory().createViaHeader(device.getHost().getIp(), device.getHost().getPort(), device.getTransport(), viaTag); | |
| 93 | + // ViaHeader viaHeader = sipFactory.createHeaderFactory().createViaHeader(sipConfig.getSipIp(), sipConfig.getSipPort(), device.getTransport(), viaTag); | |
| 94 | + ViaHeader viaHeader = sipFactory.createHeaderFactory().createViaHeader(device.getHost().getIp(), device.getHost().getPort(), device.getTransport(), viaTag); | |
| 84 | 95 | viaHeader.setRPort(); |
| 85 | 96 | viaHeaders.add(viaHeader); |
| 86 | 97 | //from |
| 87 | - SipURI fromSipURI = layer.getAddressFactory().createSipURI(sipConfig.getSipId(),sipConfig.getSipDomain()); | |
| 88 | - Address fromAddress = layer.getAddressFactory().createAddress(fromSipURI); | |
| 89 | - FromHeader fromHeader = layer.getHeaderFactory().createFromHeader(fromAddress, fromTag); //必须要有标记,否则无法创建会话,无法回应ack | |
| 98 | + SipURI fromSipURI = sipFactory.createAddressFactory().createSipURI(sipConfig.getSipId(),sipConfig.getSipDomain()); | |
| 99 | + Address fromAddress = sipFactory.createAddressFactory().createAddress(fromSipURI); | |
| 100 | + FromHeader fromHeader = sipFactory.createHeaderFactory().createFromHeader(fromAddress, fromTag); //必须要有标记,否则无法创建会话,无法回应ack | |
| 90 | 101 | //to |
| 91 | - SipURI toSipURI = layer.getAddressFactory().createSipURI(channelId,sipConfig.getSipDomain()); | |
| 92 | - Address toAddress = layer.getAddressFactory().createAddress(toSipURI); | |
| 93 | - ToHeader toHeader = layer.getHeaderFactory().createToHeader(toAddress,null); | |
| 102 | + SipURI toSipURI = sipFactory.createAddressFactory().createSipURI(channelId,sipConfig.getSipDomain()); | |
| 103 | + Address toAddress = sipFactory.createAddressFactory().createAddress(toSipURI); | |
| 104 | + ToHeader toHeader = sipFactory.createHeaderFactory().createToHeader(toAddress,null); | |
| 94 | 105 | |
| 95 | 106 | //callid |
| 96 | 107 | CallIdHeader callIdHeader = null; |
| 97 | 108 | if(device.getTransport().equals("TCP")) { |
| 98 | - callIdHeader = layer.getTcpSipProvider().getNewCallId(); | |
| 109 | + callIdHeader = tcpSipProvider.getNewCallId(); | |
| 99 | 110 | } |
| 100 | 111 | if(device.getTransport().equals("UDP")) { |
| 101 | - callIdHeader = layer.getUdpSipProvider().getNewCallId(); | |
| 112 | + callIdHeader = udpSipProvider.getNewCallId(); | |
| 102 | 113 | } |
| 103 | 114 | |
| 104 | 115 | //Forwards |
| 105 | - MaxForwardsHeader maxForwards = layer.getHeaderFactory().createMaxForwardsHeader(70); | |
| 116 | + MaxForwardsHeader maxForwards = sipFactory.createHeaderFactory().createMaxForwardsHeader(70); | |
| 106 | 117 | |
| 107 | 118 | //ceq |
| 108 | - CSeqHeader cSeqHeader = layer.getHeaderFactory().createCSeqHeader(1L, Request.INVITE); | |
| 109 | - request = layer.getMessageFactory().createRequest(requestLine, Request.INVITE, callIdHeader, cSeqHeader,fromHeader, toHeader, viaHeaders, maxForwards); | |
| 119 | + CSeqHeader cSeqHeader = sipFactory.createHeaderFactory().createCSeqHeader(1L, Request.INVITE); | |
| 120 | + request = sipFactory.createMessageFactory().createRequest(requestLine, Request.INVITE, callIdHeader, cSeqHeader,fromHeader, toHeader, viaHeaders, maxForwards); | |
| 110 | 121 | |
| 111 | - Address concatAddress = layer.getAddressFactory().createAddress(layer.getAddressFactory().createSipURI(sipConfig.getSipId(), sipConfig.getSipIp()+":"+sipConfig.getSipPort())); | |
| 112 | - // Address concatAddress = layer.getAddressFactory().createAddress(layer.getAddressFactory().createSipURI(sipConfig.getSipId(), device.getHost().getIp()+":"+device.getHost().getPort())); | |
| 113 | - request.addHeader(layer.getHeaderFactory().createContactHeader(concatAddress)); | |
| 122 | + Address concatAddress = sipFactory.createAddressFactory().createAddress(sipFactory.createAddressFactory().createSipURI(sipConfig.getSipId(), sipConfig.getSipIp()+":"+sipConfig.getSipPort())); | |
| 123 | + // Address concatAddress = sipFactory.createAddressFactory().createAddress(sipFactory.createAddressFactory().createSipURI(sipConfig.getSipId(), device.getHost().getIp()+":"+device.getHost().getPort())); | |
| 124 | + request.addHeader(sipFactory.createHeaderFactory().createContactHeader(concatAddress)); | |
| 114 | 125 | |
| 115 | - ContentTypeHeader contentTypeHeader = layer.getHeaderFactory().createContentTypeHeader("Application", "SDP"); | |
| 126 | + ContentTypeHeader contentTypeHeader = sipFactory.createHeaderFactory().createContentTypeHeader("Application", "SDP"); | |
| 116 | 127 | request.setContent(content, contentTypeHeader); |
| 117 | 128 | return request; |
| 118 | 129 | } |
| 119 | 130 | |
| 120 | - public Request createPlaybackInviteRequest(Device device, String channelId, String content, String viaTag, String fromTag, String toTag) throws ParseException, InvalidArgumentException { | |
| 131 | + public Request createPlaybackInviteRequest(Device device, String channelId, String content, String viaTag, String fromTag, String toTag) throws ParseException, InvalidArgumentException, PeerUnavailableException { | |
| 121 | 132 | Request request = null; |
| 122 | 133 | Host host = device.getHost(); |
| 123 | 134 | //请求行 |
| 124 | - SipURI requestLine = layer.getAddressFactory().createSipURI(device.getDeviceId(), host.getAddress()); | |
| 135 | + SipURI requestLine = sipFactory.createAddressFactory().createSipURI(device.getDeviceId(), host.getAddress()); | |
| 125 | 136 | //via |
| 126 | 137 | ArrayList<ViaHeader> viaHeaders = new ArrayList<ViaHeader>(); |
| 127 | - // ViaHeader viaHeader = layer.getHeaderFactory().createViaHeader(sipConfig.getSipIp(), sipConfig.getSipPort(), device.getTransport(), viaTag); | |
| 128 | - ViaHeader viaHeader = layer.getHeaderFactory().createViaHeader(device.getHost().getIp(), device.getHost().getPort(), device.getTransport(), viaTag); | |
| 138 | + // ViaHeader viaHeader = sipFactory.createHeaderFactory().createViaHeader(sipConfig.getSipIp(), sipConfig.getSipPort(), device.getTransport(), viaTag); | |
| 139 | + ViaHeader viaHeader = sipFactory.createHeaderFactory().createViaHeader(device.getHost().getIp(), device.getHost().getPort(), device.getTransport(), viaTag); | |
| 129 | 140 | viaHeader.setRPort(); |
| 130 | 141 | viaHeaders.add(viaHeader); |
| 131 | 142 | //from |
| 132 | - SipURI fromSipURI = layer.getAddressFactory().createSipURI(sipConfig.getSipId(),sipConfig.getSipDomain()); | |
| 133 | - Address fromAddress = layer.getAddressFactory().createAddress(fromSipURI); | |
| 134 | - FromHeader fromHeader = layer.getHeaderFactory().createFromHeader(fromAddress, fromTag); //必须要有标记,否则无法创建会话,无法回应ack | |
| 143 | + SipURI fromSipURI = sipFactory.createAddressFactory().createSipURI(sipConfig.getSipId(),sipConfig.getSipDomain()); | |
| 144 | + Address fromAddress = sipFactory.createAddressFactory().createAddress(fromSipURI); | |
| 145 | + FromHeader fromHeader = sipFactory.createHeaderFactory().createFromHeader(fromAddress, fromTag); //必须要有标记,否则无法创建会话,无法回应ack | |
| 135 | 146 | //to |
| 136 | - SipURI toSipURI = layer.getAddressFactory().createSipURI(channelId,sipConfig.getSipDomain()); | |
| 137 | - Address toAddress = layer.getAddressFactory().createAddress(toSipURI); | |
| 138 | - ToHeader toHeader = layer.getHeaderFactory().createToHeader(toAddress,null); | |
| 147 | + SipURI toSipURI = sipFactory.createAddressFactory().createSipURI(channelId,sipConfig.getSipDomain()); | |
| 148 | + Address toAddress = sipFactory.createAddressFactory().createAddress(toSipURI); | |
| 149 | + ToHeader toHeader = sipFactory.createHeaderFactory().createToHeader(toAddress,null); | |
| 139 | 150 | |
| 140 | 151 | //callid |
| 141 | 152 | CallIdHeader callIdHeader = null; |
| 142 | 153 | if(device.getTransport().equals("TCP")) { |
| 143 | - callIdHeader = layer.getTcpSipProvider().getNewCallId(); | |
| 154 | + callIdHeader = tcpSipProvider.getNewCallId(); | |
| 144 | 155 | } |
| 145 | 156 | if(device.getTransport().equals("UDP")) { |
| 146 | - callIdHeader = layer.getUdpSipProvider().getNewCallId(); | |
| 157 | + callIdHeader = udpSipProvider.getNewCallId(); | |
| 147 | 158 | } |
| 148 | 159 | |
| 149 | 160 | //Forwards |
| 150 | - MaxForwardsHeader maxForwards = layer.getHeaderFactory().createMaxForwardsHeader(70); | |
| 161 | + MaxForwardsHeader maxForwards = sipFactory.createHeaderFactory().createMaxForwardsHeader(70); | |
| 151 | 162 | |
| 152 | 163 | //ceq |
| 153 | - CSeqHeader cSeqHeader = layer.getHeaderFactory().createCSeqHeader(1L, Request.INVITE); | |
| 154 | - request = layer.getMessageFactory().createRequest(requestLine, Request.INVITE, callIdHeader, cSeqHeader,fromHeader, toHeader, viaHeaders, maxForwards); | |
| 164 | + CSeqHeader cSeqHeader = sipFactory.createHeaderFactory().createCSeqHeader(1L, Request.INVITE); | |
| 165 | + request = sipFactory.createMessageFactory().createRequest(requestLine, Request.INVITE, callIdHeader, cSeqHeader,fromHeader, toHeader, viaHeaders, maxForwards); | |
| 155 | 166 | |
| 156 | - Address concatAddress = layer.getAddressFactory().createAddress(layer.getAddressFactory().createSipURI(sipConfig.getSipId(), sipConfig.getSipIp()+":"+sipConfig.getSipPort())); | |
| 157 | - // Address concatAddress = layer.getAddressFactory().createAddress(layer.getAddressFactory().createSipURI(sipConfig.getSipId(), device.getHost().getIp()+":"+device.getHost().getPort())); | |
| 158 | - request.addHeader(layer.getHeaderFactory().createContactHeader(concatAddress)); | |
| 167 | + Address concatAddress = sipFactory.createAddressFactory().createAddress(sipFactory.createAddressFactory().createSipURI(sipConfig.getSipId(), sipConfig.getSipIp()+":"+sipConfig.getSipPort())); | |
| 168 | + // Address concatAddress = sipFactory.createAddressFactory().createAddress(sipFactory.createAddressFactory().createSipURI(sipConfig.getSipId(), device.getHost().getIp()+":"+device.getHost().getPort())); | |
| 169 | + request.addHeader(sipFactory.createHeaderFactory().createContactHeader(concatAddress)); | |
| 159 | 170 | |
| 160 | - ContentTypeHeader contentTypeHeader = layer.getHeaderFactory().createContentTypeHeader("Application", "SDP"); | |
| 171 | + ContentTypeHeader contentTypeHeader = sipFactory.createHeaderFactory().createContentTypeHeader("Application", "SDP"); | |
| 161 | 172 | request.setContent(content, contentTypeHeader); |
| 162 | 173 | return request; |
| 163 | 174 | } | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java
| 1 | 1 | package com.genersoft.iot.vmp.gb28181.transmit.cmd.impl; |
| 2 | 2 | |
| 3 | 3 | import java.text.ParseException; |
| 4 | +import java.util.regex.Matcher; | |
| 5 | +import java.util.regex.Pattern; | |
| 4 | 6 | |
| 5 | 7 | import javax.sip.ClientTransaction; |
| 6 | 8 | import javax.sip.Dialog; |
| 7 | 9 | import javax.sip.InvalidArgumentException; |
| 8 | 10 | import javax.sip.SipException; |
| 11 | +import javax.sip.SipFactory; | |
| 12 | +import javax.sip.SipProvider; | |
| 9 | 13 | import javax.sip.TransactionDoesNotExistException; |
| 10 | -import javax.sip.address.Address; | |
| 11 | 14 | import javax.sip.address.SipURI; |
| 12 | 15 | import javax.sip.header.ViaHeader; |
| 13 | 16 | import javax.sip.message.Request; |
| 14 | 17 | |
| 15 | 18 | import org.springframework.beans.factory.annotation.Autowired; |
| 16 | -import org.springframework.boot.autoconfigure.security.SecurityProperties.Headers; | |
| 19 | +import org.springframework.beans.factory.annotation.Qualifier; | |
| 17 | 20 | import org.springframework.stereotype.Component; |
| 18 | 21 | |
| 19 | 22 | import com.genersoft.iot.vmp.conf.SipConfig; |
| 20 | -import com.genersoft.iot.vmp.gb28181.SipLayer; | |
| 21 | 23 | import com.genersoft.iot.vmp.gb28181.bean.Device; |
| 22 | 24 | import com.genersoft.iot.vmp.gb28181.session.VideoStreamSessionManager; |
| 23 | 25 | import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommander; |
| 24 | 26 | import com.genersoft.iot.vmp.gb28181.transmit.cmd.SIPRequestHeaderProvider; |
| 25 | 27 | import com.genersoft.iot.vmp.gb28181.utils.DateUtil; |
| 26 | 28 | |
| 27 | -import java.util.regex.Pattern; | |
| 28 | -import java.util.regex.Matcher; | |
| 29 | - | |
| 30 | 29 | /** |
| 31 | 30 | * @Description:设备能力接口,用于定义设备的控制、查询能力 |
| 32 | 31 | * @author: swwheihei |
| ... | ... | @@ -42,10 +41,15 @@ public class SIPCommander implements ISIPCommander { |
| 42 | 41 | private SIPRequestHeaderProvider headerProvider; |
| 43 | 42 | |
| 44 | 43 | @Autowired |
| 45 | - private SipLayer sipLayer; | |
| 44 | + private VideoStreamSessionManager streamSession; | |
| 46 | 45 | |
| 47 | 46 | @Autowired |
| 48 | - private VideoStreamSessionManager streamSession; | |
| 47 | + @Qualifier(value="tcpSipProvider") | |
| 48 | + private SipProvider tcpSipProvider; | |
| 49 | + | |
| 50 | + @Autowired | |
| 51 | + @Qualifier(value="udpSipProvider") | |
| 52 | + private SipProvider udpSipProvider; | |
| 49 | 53 | |
| 50 | 54 | /** |
| 51 | 55 | * 云台方向放控制,使用配置文件中的默认镜头移动速度 |
| ... | ... | @@ -305,9 +309,9 @@ public class SIPCommander implements ISIPCommander { |
| 305 | 309 | String protocol = viaHeader.getTransport().toUpperCase(); |
| 306 | 310 | ClientTransaction clientTransaction = null; |
| 307 | 311 | if("TCP".equals(protocol)) { |
| 308 | - clientTransaction = sipLayer.getTcpSipProvider().getNewClientTransaction(byeRequest); | |
| 312 | + clientTransaction = tcpSipProvider.getNewClientTransaction(byeRequest); | |
| 309 | 313 | } else if("UDP".equals(protocol)) { |
| 310 | - clientTransaction = sipLayer.getUdpSipProvider().getNewClientTransaction(byeRequest); | |
| 314 | + clientTransaction = udpSipProvider.getNewClientTransaction(byeRequest); | |
| 311 | 315 | } |
| 312 | 316 | dialog.sendRequest(clientTransaction); |
| 313 | 317 | } catch (TransactionDoesNotExistException e) { |
| ... | ... | @@ -541,9 +545,9 @@ public class SIPCommander implements ISIPCommander { |
| 541 | 545 | private ClientTransaction transmitRequest(Device device, Request request) throws SipException { |
| 542 | 546 | ClientTransaction clientTransaction = null; |
| 543 | 547 | if("TCP".equals(device.getTransport())) { |
| 544 | - clientTransaction = sipLayer.getTcpSipProvider().getNewClientTransaction(request); | |
| 548 | + clientTransaction = tcpSipProvider.getNewClientTransaction(request); | |
| 545 | 549 | } else if("UDP".equals(device.getTransport())) { |
| 546 | - clientTransaction = sipLayer.getUdpSipProvider().getNewClientTransaction(request); | |
| 550 | + clientTransaction = udpSipProvider.getNewClientTransaction(request); | |
| 547 | 551 | } |
| 548 | 552 | clientTransaction.sendRequest(); |
| 549 | 553 | return clientTransaction; | ... | ... |