public String toString() { return this.uri.toString(); }
public boolean equals(Object that) { if (this==that) return true; else if (that instanceof URI) { final URI o = (URI) that; // This is not sufficient for equality; revert to String equality... // return this.getScheme().equalsIgnoreCase( o.getScheme() ) return this.toString().equalsIgnoreCase( o.toString() ); } return false; }
public static String parseURI(HeaderAddress header) { URI uri = getURI(header); return uri != null ? uri.toString() : null; }
public String getValue() { return RFC2396UrlDecoder.decode(this.uri.toString()); }
public String getValue() { return RFC2396UrlDecoder.decode(this.uri.toString()); }
public String getRequestURI() { return isRequest ? ((SIPRequest) msg).getRequestURI().toString() : null; }
private String getCanonicalAddress(HeaderAddress header) { String addr = header.getAddress().getURI().toString(); int index = addr.indexOf(':'); index = addr.indexOf(':', index + 1); if (index != -1) { // Get rid of the port addr = addr.substring(0, index); } return addr; }
/** * Generates an Id for checking potentially merged requests. * * @return String to check for merged requests */ public String getMergeId() { /* * generate an identifier from the From tag, Call-ID, and CSeq */ String fromTag = this.getFromTag(); String cseq = this.cSeqHeader.toString(); String callId = this.callIdHeader.getCallId(); /* NOTE : The RFC does NOT specify you need to include a Request URI * This is added here for the case of Back to Back User Agents. */ String requestUri = this.getRequestURI().toString(); if (fromTag != null) { return new StringBuilder().append(requestUri).append(":").append(fromTag).append(":").append(cseq).append(":") .append(callId).toString(); } else return null; }
public void writeExternal(ObjectOutput out) throws IOException { out.writeLong(calleeCSeq); out.writeLong(callerCSeq); out.writeUTF(calleeContact.toString()); out.writeUTF(callerContact.toString()); out.writeInt(calleeRouteSet.size()); Iterator<javax.sip.address.Address> i = calleeRouteSet.iterator(); while (i.hasNext()) { javax.sip.address.Address a = i.next(); out.writeUTF(a.toString()); } out.writeInt(callerRouteSet.size()); i = callerRouteSet.iterator(); while (i.hasNext()) { javax.sip.address.Address a = i.next(); out.writeUTF(a.toString()); } out.writeUTF(toHeader.getAddress().toString()); out.writeUTF(toHeader.getTag()); out.writeUTF(fromHeader.getAddress().toString()); out.writeUTF(fromHeader.getTag()); out.writeUTF(callId); }
String A2 = request.getMethod().toUpperCase() + ":" + uri.toString(); byte mdbytes[] = messageDigest.digest(A1.getBytes()); String HA1 = toHexString(mdbytes);
String A2 = request.getMethod().toUpperCase() + ":" + uri.toString(); byte mdbytes[] = messageDigest.digest(A1.getBytes()); String HA1 = toHexString(mdbytes);
public URI getURI() { final javax.sip.address.URI localUri = getAddress().getURI(); if (localUri instanceof javax.sip.address.SipURI) return new SipURIImpl((javax.sip.address.SipURI) localUri, isModifiable); else if (localUri instanceof javax.sip.address.TelURL) return new TelURLImpl((javax.sip.address.TelURL) localUri); else if (localUri instanceof javax.sip.address.URI) { URI uri = new GenericURIImpl((javax.sip.address.URI) localUri); // setting the value to make sure jain sip runs scheme validation on it ((Parameterable)uri).setValue(localUri.toString()); return uri; } else throw new IllegalArgumentException("unsupported operation - unknown scheme"); } /*
String A2 = request.getMethod().toUpperCase() + ":" + uri.toString(); String HA1 = hashedPassword;
public void proxyTo(final URI uri) { if(uri == null) { throw new NullPointerException("URI can't be null"); } if(!JainSipUtils.checkScheme(uri.toString())) { // Fix for Issue http://code.google.com/p/mobicents/issues/detail?id=2327, checking the route header RouteHeader routeHeader = (RouteHeader) originalRequest.getMessage().getHeader(RouteHeader.NAME); if(routeHeader == null || (routeHeader != null && !JainSipUtils.checkScheme(routeHeader.getAddress().getURI().toString()))) { throw new IllegalArgumentException("Scheme " + uri.getScheme() + " is not supported"); } } final ProxyBranchImpl branch = new ProxyBranchImpl(uri, this); branch.setRecordRoute(recordRoutingEnabled); branch.setRecurse(recurse); this.proxyBranches.put(uri, branch); startProxy(); }
/** * Event handler from the timer event, which signals that a message must be * sent back to the UA * * @param event * @param aci */ public void onTimerEvent(TimerEvent event, ActivityContextInterface aci) { // detaching so the null AC is claimed after the event handling aci.detach(sbbContext.getSbbLocalObject()); try { DataSourceChildSbbLocalInterface child = (DataSourceChildSbbLocalInterface) getLocationChildRelation().create(); child.getBindings(getSender().getURI().toString()); } catch (Exception e) { tracer.severe("failed to create sip registrar child sbb, to lookup the sender's contacts",e); return; } }
sipDomain = credHash.getSipDomain(); authorization = this.getAuthorization(reoriginatedRequest .getMethod(), uri.toString(), (reoriginatedRequest.getContent() == null) ? "" : new String( reoriginatedRequest.getRawContent()), authHeader, credHash); .getMethod(), reoriginatedRequest.getRequestURI().toString(), (reoriginatedRequest.getContent() == null) ? "" : new String( reoriginatedRequest.getRawContent()), authHeader, userCreds);
getLocationSbb().getBindings(toURI.toString());
String toURI = toHeader.getAddress().getURI().toString();