public String toString() { return new StringBuffer().append("SleeEventImpl.toString() = { "). append("\n eventID = " + eventID). append("\n activitycontext = " + activityContextId). append("\n eventObject = " + eventObject). append("\n address = " + ( address != null ? address.getAddressString() : null )). append("\n activity = " + activity). append("}").toString(); }
public void verifyAddress(Address address) throws ProfileVerificationException { // Check address plan if (address.getAddressPlan() != AddressPlan.SIP) throw new ProfileVerificationException("Address \"" + address + "\" is not a SIP address"); // Check URI scheme - must be sip: or sips: String uri = address.getAddressString().toLowerCase(); if (!(uri.startsWith("sip:") || uri.startsWith("sips:"))) throw new ProfileVerificationException("Address \"" + address + "\" is not a SIP address"); }
/** * Attempt to find a Backup Address, but the method returns null if there * isn't any address to forward the INVITE. */ private Address getBackupAddress(String sipAddress) { Address backupAddress = null; CallControlProfileCMP profile = this.lookup(new javax.slee.Address( AddressPlan.SIP, sipAddress)); if (profile != null) { javax.slee.Address address = profile.getBackupAddress(); if (address != null) { try { backupAddress = getAddressFactory().createAddress( address.getAddressString()); } catch (ParseException e) { log.error(e.getMessage(), e); } } } return backupAddress; }
/** * Attempt to find a list of Blocked Addresses (SIP URIs), but the method * returns null if the called user (sipAddress) does not block to any user. */ private ArrayList getBlockedArrayList(String sipAddress) { //sipAddress is AOR: sip:newbie@restcomm.com ArrayList uris = null; CallControlProfileCMP profile = super.lookup(new Address(AddressPlan.SIP, sipAddress)); if (profile != null) { Address[] addresses = profile.getBlockedAddresses(); if (addresses != null) { uris = new ArrayList(addresses.length); for (int i = 0; i < addresses.length; i++) { String address = addresses[i].getAddressString(); try { SipURI uri = (SipURI) getAddressFactory().createURI(address); uris.add(uri); } catch (ParseException e) { log.severe(e.getMessage(), e); } } } } return uris; }
/** * Attempt to find a Backup Address, but the method returns null if there * isn't any address to forward the INVITE. */ private Address getBackupAddress(String sipAddress) { Address backupAddress = null; CallControlProfileCMP profile = this.lookup(new javax.slee.Address(AddressPlan.SIP, sipAddress)); if (profile != null) { javax.slee.Address address = profile.getBackupAddress(); if (address != null) { try { backupAddress = getAddressFactory().createAddress(address.getAddressString()); } catch (ParseException e) { log.severe(e.getMessage(), e); } } } return backupAddress; }
if ( logger.isDebugEnabled() ) { logger.debug("profileName = " + profileName + " addressString = " + selector.getAddress().getAddressString());