public interface DNSResolver
DNSResolver dnsResolver = (DNSResolver) getServletContext().getAttribute("org.mobicents.servlet.sip.DNS_RESOLVER");
SipURI getSipURI(URI uri)
From the uri passed in parameter, try to find the corresponding SipURI. If the uri in parameter is already a SipURI without a user=phone param, it is just returned If the uri in parameter is a TelURL or SipURI with a user=phone param, the phone number is converted to a domain name then a corresponding NAPTR DNS lookup is done to find the SipURI
Usage Example
DNSResolver dnsResolver = (DNSResolver) getServletContext().getAttribute("org.mobicents.servlet.sip.DNS_RESOLVER");
try {
URI uri = sipFactory.createURI("tel:+358-555-1234567");
SipURI sipURI = dnsResolver.getSipURI(uri);
} catch (ServletParseException e) {
logger.error("Impossible to create the tel URL", e);
}
uri - the uri used to find the corresponding SipURICopyright © 2014. All Rights Reserved.