|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DNSResolver
Allows for an application to perform DNS queries to modify the SIP Message before it is sent out.
To get the DNSResolver from your application just use
DNSResolver dnsResolver = (DNSResolver) getServletContext().getAttribute("org.mobicents.servlet.sip.DNS_RESOLVER");
| Method Summary | |
|---|---|
SipURI |
getSipURI(URI uri)
From the uri passed in parameter, try to find the corresponding SipURI. |
| Method Detail |
|---|
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 SipURI
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||