本文整理了Java中javax.sip.message.Request.getRequestURI
方法的一些代码示例,展示了Request.getRequestURI
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getRequestURI
方法的具体详情如下:
包路径:javax.sip.message.Request
类名称:Request
方法名:getRequestURI
暂无
代码示例来源:origin: org.mobicents.servlet.sip/sip-servlets-impl
/**
* {@inheritDoc}
*/
public URI getRequestURI() {
Request request = (Request) super.message;
if (request.getRequestURI() instanceof javax.sip.address.SipURI)
return new SipURIImpl((javax.sip.address.SipURI) request
.getRequestURI(), ModifiableRule.Modifiable);
else if (request.getRequestURI() instanceof javax.sip.address.TelURL)
return new TelURLImpl((javax.sip.address.TelURL) request
.getRequestURI());
else
// From horacimacias : Fix for Issue 2115 MSS unable to handle GenericURI URIs
return new GenericURIImpl(request.getRequestURI());
}
代码示例来源:origin: org.mobicents.servlet.sip/sip-servlets-impl
public String getScheme() {
return ((Request)message).getRequestURI().getScheme();
}
代码示例来源:origin: org.mobicents.servlet.sip/sip-servlets-impl
if(request.getRequestURI() instanceof TelURL ||
!(request.getRequestURI() instanceof javax.sip.address.SipURI)) {
throw new DispatcherException(Response.SERVER_INTERNAL_ERROR, "cannot dispatch a request with a tel url or generic request uri outside the container ");
javax.sip.address.SipURI sipRequestUri = (javax.sip.address.SipURI)request.getRequestURI();
代码示例来源:origin: org.mobicents.examples/call-controller2-forwarding-sbb
private void onNonInviteEvent(javax.sip.RequestEvent event,
CallForwardingSbbActivityContextInterface localAci) {
localAci.detach(this.getSbbLocalObject());
// get proxy child SBB
ChildRelation proxyRelation = getJainSipProxySbb();
if (!proxyRelation.isEmpty()) {
// we have a child so we are processing this call,
// attach the proxy so it can have a chance to cancel the invite
localAci.attach((SbbLocalObject) proxyRelation.iterator().next());
log.info("########## Processing request "+event.getRequest().getMethod()+" for user "+event.getRequest().getRequestURI());
}
}
private LocationService locationService = new LocationService();
代码示例来源:origin: org.mobicents.servlet.sip/sip-servlets-impl
public static void optimizeRouteHeaderAddressForInternalRoutingrequest(SipConnector sipConnector, Request request, MobicentsSipSession session, SipFactoryImpl sipFactoryImpl, String transport) {
RouteHeader rh = (RouteHeader) request.getHeader(RouteHeader.NAME);
javax.sip.address.URI uri = null;
if(rh != null) {
uri = rh.getAddress().getURI();
} else {
uri = request.getRequestURI();
}
if(uri.isSipURI()) {
javax.sip.address.SipURI sipUri = (javax.sip.address.SipURI) uri;
optimizeUriForInternalRoutingRequest(sipConnector, sipUri, session, sipFactoryImpl, transport);
}
}
代码示例来源: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.servlet.sip/sip-servlets-impl
uri = routeHeader.getAddress().getURI();
} else {
uri = request.getRequestURI();
代码示例来源:origin: org.mobicents.servlet.sip/sip-servlets-impl
public static String findRouteOrRequestUriTransport(Request request) {
RouteHeader route = (RouteHeader) request.getHeader(RouteHeader.NAME);
if(route != null) {
URI uri = route.getAddress().getURI();
return findURITransport(uri, request.getContentLength().getContentLength());
}
URI ruri = request.getRequestURI();
return findURITransport(ruri, request.getContentLength().getContentLength());
}
// https://github.com/Mobicents/sip-servlets/issues/62
代码示例来源:origin: org.mobicents.servlet.sip/sip-servlets-impl
if(poppedAddress.getParameter(MessageDispatcher.RR_PARAM_PROXY_APP) != null ||
(request.getRequestURI() instanceof javax.sip.address.SipURI && ((Parameters)request.getRequestURI()).getParameter(MessageDispatcher.RR_PARAM_PROXY_APP) != null)) {
if(logger.isDebugEnabled()) {
logger.debug("the request is for a proxy application, thus it is a subsequent request ");
代码示例来源:origin: org.mobicents.examples/call-controller2-forwarding-sbb
URI toURI = event.getRequest().getRequestURI();
URI contactURI = isUserAvailable(toURI);
if (contactURI != null) {
代码示例来源:origin: org.mobicents.servlet.sip/sip-servlets-impl
javax.sip.address.URI uri = request.getRequestURI();
RouteHeader route = (RouteHeader) request.getHeader(RouteHeader.NAME);
if(route != null) {
代码示例来源:origin: org.mobicents.servlet.sip/sip-servlets-impl
javax.sip.address.URI uriToResolve = request.getRequestURI();
RouteHeader routeHeader = (RouteHeader) request.getHeader(RouteHeader.NAME);
if(routeHeader != null) {
代码示例来源:origin: org.mobicents.servlet.sip/sip-servlets-impl
public static void optimizeViaHeaderAddressForStaticAddress(SipConnector sipConnector, Request request, SipFactoryImpl sipFactoryImpl, String transport) throws ParseException, InvalidArgumentException {
javax.sip.address.URI uri = request.getRequestURI();
ViaHeader viaHeader = (ViaHeader) request.getHeader(ViaHeader.NAME);
RouteHeader route = (RouteHeader) request.getHeader(RouteHeader.NAME);
if(route != null) {
uri = route.getAddress().getURI();
}
if(uri.isSipURI()) {
javax.sip.address.SipURI sipUri = (javax.sip.address.SipURI) uri;
String host = sipUri.getHost();
int port = sipUri.getPort();
if(sipFactoryImpl.getSipApplicationDispatcher().isExternal(host, port, transport)) {
viaHeader.setHost(sipConnector.getStaticServerAddress());
viaHeader.setPort(sipConnector.getStaticServerPort());
}
}
}
}
代码示例来源:origin: org.jitsi/jain-sip-ri-ossonly
SipURI sipUri = (SipURI) reoriginatedRequest.getRequestURI();
sipUri.setMAddrParam(hop.getHost());
if ( hop.getPort() != -1 ) sipUri.setPort(hop.getPort());
SipURI requestUri = (SipURI) challengedTransaction.getRequest().getRequestURI();
while (authHeaders.hasNext()) {
authHeader = (WWWAuthenticateHeader) authHeaders.next();
"Cannot find user creds for the given user name and realm");
URI uri = reoriginatedRequest.getRequestURI();
sipDomain = credHash.getSipDomain();
authorization = this.getAuthorization(reoriginatedRequest
.getMethod(), reoriginatedRequest.getRequestURI().toString(),
(reoriginatedRequest.getContent() == null) ? "" : new String(
reoriginatedRequest.getRawContent()), authHeader, userCreds);
代码示例来源:origin: org.jitsi/jain-sip-ri-ossonly
if (dialog.firstTransactionIsServerTransaction) {
dialog.firstTransactionSecure = transaction.getRequest()
.getRequestURI().getScheme().equalsIgnoreCase("sips");
} else {
dialog.firstTransactionSecure = ((SIPClientTransaction) transaction)
代码示例来源:origin: org.mobicents.servlet.sip/sip-servlets-impl
final ContactHeader contact = (ContactHeader) request.getHeader(ContactHeader.NAME);
final URI requestUri = request.getRequestURI();
代码示例来源:origin: org.mobicents.servlet.sip/sip-servlets-impl
try {
if(sipConnector != null && sipConnector.isUseStaticAddress()) {
javax.sip.address.URI uri = clonedRequest.getRequestURI();
RouteHeader route = (RouteHeader) clonedRequest.getHeader(RouteHeader.NAME);
if(route != null) {
代码示例来源:origin: org.mobicents.examples/call-controller2-sbbs
URI toURI = event.getRequest().getRequestURI();
getLocationSbb().getBindings(toURI.toString());
代码示例来源:origin: org.mobicents.examples/call-controller2-sbbs
URI toURI = event.getRequest().getRequestURI();
CallForwardingSbbActivityContextInterface localAci = this.asSbbActivityContextInterface(eventContext.getActivityContextInterface());
代码示例来源:origin: org.mobicents.servlet.sip/sip-servlets-impl
final javax.sip.address.URI requestURI = request.getRequestURI();
内容来源于网络,如有侵权,请联系作者删除!