本文整理了Java中javax.sip.message.Request.setRequestURI
方法的一些代码示例,展示了Request.setRequestURI
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.setRequestURI
方法的具体详情如下:
包路径:javax.sip.message.Request
类名称:Request
方法名:setRequestURI
暂无
代码示例来源:origin: org.mobicents.servlet.sip/sip-servlets-impl
public void setRequestURI(URI uri) {
checkReadOnly();
Request request = (Request) message;
URIImpl uriImpl = (URIImpl) uri;
javax.sip.address.URI wrappedUri = uriImpl.getURI();
request.setRequestURI(wrappedUri);
//TODO look through all contacts of the user and change them depending of if STUN is enabled
//and the request is aimed to the local network or outside
}
代码示例来源:origin: org.mobicents.servlet.sip/sip-servlets-impl
private void checkRequestURIForNonCompliantAgents(MobicentsProxyBranch finalBranch, Request request) throws ServletParseException {
URI requestURI = request.getRequestURI();
if(request.getRequestURI() instanceof javax.sip.address.SipURI && ((Parameters)requestURI).getParameter(MessageDispatcher.RR_PARAM_PROXY_APP) != null && requestURI instanceof SipURI) {
final String host = ((SipURI) requestURI).getHost();
final int port = ((SipURI) requestURI).getPort();
final String transport = JainSipUtils.findTransport(request);
boolean isAnotherDomain = StaticServiceHolder.sipStandardService.getSipApplicationDispatcher().isExternal(host, port, transport);
if(!isAnotherDomain) {
if(logger.isDebugEnabled()) {
logger.debug("Non Compliant Agent targeting Mobicents directly, Changing the request URI from " + requestURI + " to " + finalBranch.getTargetURI() + " to avoid going in a loop");
}
request.setRequestURI(
((URIImpl)(StaticServiceHolder.sipStandardService.getSipApplicationDispatcher().getSipFactory().createURI(
finalBranch.getTargetURI()))).getURI());
}
}
}
}
代码示例来源:origin: org.mobicents.examples/restcomm-slee-example-sip11-b2b-sbb
private void forwardRequest(RequestEvent event, DialogActivity out)
throws SipException {
final Request incomingRequest = event.getRequest();
if (tracer.isInfoEnabled()) {
tracer.info("Forwarding request " + incomingRequest.getMethod()
+ " to dialog " + out);
}
// Copies the request, setting the appropriate headers for the dialog.
Request outgoingRequest = out.createRequest(incomingRequest);
outgoingRequest.setRequestURI(out.getRemoteParty().getURI());
// Send the request on the dialog activity
final ClientTransaction ct = out.sendRequest(outgoingRequest);
// Record an association with the original server transaction,
// so we can retrieve it when forwarding the response.
out.associateServerTransaction(ct, event.getServerTransaction());
}
代码示例来源:origin: org.mobicents.servlet.sip/sip-servlets-impl
logger.debug("Routing the request externally " + sipServletRequest );
request.setRequestURI(SipFactoryImpl.addressFactory.createURI(routes[0]));
try {
forwardRequestStatefully(sipServletRequest, null, sipRouteModifier);
代码示例来源:origin: org.mobicents.servlet.sip/sip-servlets-impl
throw new IllegalArgumentException("Unexpected exception happened on setting method " + method, e);
request.setRequestURI(requestUri);
((MessageExt)request).setApplicationData(null);
logger.debug("setting request uri to " + sipUri);
request.setRequestURI(sipUri);
logger.debug("setting request uri to " + sipUri);
request.setRequestURI(sipUri);
代码示例来源:origin: org.mobicents.servlet.sip/sip-servlets-impl
clonedRequest.setRequestURI(((URIImpl)destination).getURI());
内容来源于网络,如有侵权,请联系作者删除!