public URI createURI(String uri) throws ServletParseException { return sipFactoryImpl.createURI(uri); }
/** * {@inheritDoc} */ public URI getSubscriberURI() { if(!isValid()) { throw new IllegalStateException("the session has been invalidated"); } if (this.subscriberURI == null) throw new IllegalStateException("Subscriber URI is only available for outbound sessions."); else { try { return sipFactory.createURI(subscriberURI); } catch (ServletParseException e) { throw new IllegalArgumentException("couldn't parse the outbound interface " + subscriberURI, e); } } }
public SipURI getRecordRouteURI() { if(!this.recordRoutingEnabled) throw new IllegalStateException("You must setRecordRoute(true) before getting URI"); if(recordRouteURI == null && recordRouteURIString != null) { try { recordRouteURI = new SipURIImpl(((SipURIImpl)sipFactoryImpl.createURI(recordRouteURIString)).getSipURI(), ModifiableRule.ProxyRecordRouteNotModifiable); recordRouteURIString = null; } catch (ServletParseException e) { logger.error("A problem occured while setting the target URI while proxying a request " + recordRouteURIString, e); return null; } } return this.recordRouteURI; }
public SipURI getRecordRouteURI() { if(this.getRecordRoute()) { if(this.recordRouteURI == null && this.recordRouteURIString == null) this.recordRouteURIString = DEFAULT_RECORD_ROUTE_URI; if(recordRouteURIString != null) { try { recordRouteURI = ((SipURI)proxy.getSipFactoryImpl().createURI(recordRouteURIString)); recordRouteURIString = null; } catch (ServletParseException e) { logger.error("A problem occured while setting the target URI while proxying a request " + recordRouteURI, e); return null; } } return recordRouteURI; } else throw new IllegalStateException("Record Route not enabled for this ProxyBranch. You must call proxyBranch.setRecordRoute(true) before getting an URI."); }
int end = contact.indexOf('>'); contact = contact.substring(start + 1, end); URI uri = proxy.getSipFactoryImpl().createURI(contact); ArrayList<SipURI> list = new ArrayList<SipURI>(); list.add((SipURI)uri);
public ProxyImpl(SipServletRequestImpl request, SipFactoryImpl sipFactoryImpl) { this.proxyTimerService = ((MobicentsSipApplicationSession)request.getSipApplicationSession(false)).getSipContext().getProxyTimerService(); this.originalRequest = request; this.sipFactoryImpl = sipFactoryImpl; this.proxyBranches = new LinkedHashMap<URI, ProxyBranchImpl> (); this.proxyTimeout = 180; // 180 secs default this.proxy1xxTimeout = -1; // not activated by default String outboundInterfaceStringified = ((MobicentsSipSession)request.getSession()).getOutboundInterface(); if(outboundInterfaceStringified != null) { try { outboundInterface = (SipURI) sipFactoryImpl.createURI(outboundInterfaceStringified); } catch (ServletParseException e) { throw new IllegalArgumentException("couldn't parse the outbound interface " + outboundInterface, e); } } this.callerFromTag = ((MessageExt)request.getMessage()).getFromHeader().getTag(); this.previousNode = extractPreviousNodeFromRequest(request); putTransaction(originalRequest); } // https://code.google.com/p/sipservlets/issues/detail?id=238
recordRouteURI = ((SipURI)proxy.getSipFactoryImpl().createURI(recordRouteURIString)); } catch (ServletParseException e) { logger.error("A problem occured while setting the target URI while proxying a request " + recordRouteURIString, e); destination = proxy.getSipFactoryImpl().createURI(targetURI); } catch (ServletParseException e) { logger.error("A problem occured while setting the target URI while proxying a request " + targetURI, e);
targetURI = sipFactoryImpl.createURI(targetURIString); } catch (ServletParseException e) { logger.error("A problem occured while setting the target URI while proxying a request " + targetURIString, e); } else if (recordRouteURIString != null){ try { recordRoute = ((SipURI)proxy.getSipFactoryImpl().createURI(recordRouteURIString)); } catch (ServletParseException e) { logger.error("A problem occured while setting the target URI while proxying a request " + recordRouteURI, e);