HP-UX C SIP Stack Programmer's Guide (Novembery 2007)
Working with Resolvers 345
Working with Handles
RVSIP_RESOLVER_MODE_FIND_URI_BY_NAPTR
Gets the NAPTR record for an ENUM record in a DNS server. For example,
trying to resolve a phone number, such as +97237679623, will result in an NAPTR
query, for 3.2.6.9.7.6.7.3.2.7.9.e164.arpa..The result of this kind of query will be a
regular expression.
RESOLVER MANAGER The ResolverMgr manages the collection of resolvers and is mainly used for
creating new resolvers. The ResolverMgr takes part in the address resolution
process by holding a list of DNS servers that each of the resolvers will contact.
The application can use the Resolver Manager API to change this list.
WORKING WITH
H
ANDLES
All resolvers and the ResolverMgr are identified using handles. You must supply
these handles when using the Resolver API. RvSipResolverMgrHandle defines the
ResolverMgr handle. You receive this handle by calling
RvSipStackGetResolverMgrHandle().
RvSipResolverHandle defines a resolver handle. You receive the Resolver handle
when creating a resolver with RvSipResolverMgrCreateResolver().
RESOLVER API The Resolver API contains a set of functions and function callbacks that allow you
to control resolver functionality.
RESOLVER CONTROL The following Resolver API functions provide resolver control:
RvSipResolverResolve()
Starts a DNS algorithm mechanism. After calling RvSipResolverResolve(), the
resolver will try to obtain data from the DNS servers specified in the SIP Stack.
The retrieved data will be stored in the hDns parameter supplied by the caller.
Using the eMode parameter, you can specify the algorithm session type that the
resolver will try to accomplish. The strQueryString parameter should contain the
base string for the DNS query. The eScheme parameter specifies the scheme to
concatenate to the strQueryString parameter in case that SRV is applied for
transport. You can set bIsSecure to indicate that any record that does not represent
a secure connection will be discarded. The knownPort and knownTransport
parameters are used when a record retrieved from the DNS server does not contain
the data (for example, an A record does not contain port or transport, and SRV
records do not contain transport). The pfnResolveCB parameter indicates which
callback the resolver should call when the DNS algorithm session has ended.
Once a resolution process has ended, the resolver can be reused and the answer for
the next query will be stored in the same DNS list.