Domain Resolver API

Use the Domain Resolver API to perform DNS lookups of SIP URIs using the RFC 3263 protocol. These lookups can be performed synchronously if you want to avoid having to preserve state in order to handle an asynchronous callback. They can also be performed asynchronously if you need a better performing interface.

The Domain Resolver API provides an interface that enables an application to perform DNS queries for SIP URIs. When the Domain Resolver API is used asynchronously, a listener is called after the DNS query completes. You can use one of the following methods in your application code to access the Domain Resolver API:
  • Get an attribute from the ServletContext using com.ibm.websphere.sip.resolver as a key.
    getServletContext().getAttribute("com.ibm.websphere.sip.resolver ")
    
  • Use @resource injection.
    @resource 
    DomainResolver resolver
Use one of the following methods to perform the URI lookup:
  • Use the SIPURI method if a synchronous API which will return the result of the URI resolve request response.
    DomainResolver
    locate(SIPURI)
  • locate(SIPURI, Listener) – an asynchronous API which will signal the listener once it is finished. When the result is cached the listener will be triggered on the same caller thread.
    DomainResolver
    locate(SIPURI, Listener)

For more information about this API, expand the Reference > Programming interfaces > APIs - Application Programming Interfaces section in the documentation navigation and locate the com.ibm.websphere.sip.resolver package

For more information about DNS servers, see the topic Using DNS procedures to locate SIP servers.