Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0-pr
    • Labels:
      None
    • Tags:

      Description

      Allows for applications to perform DNS/ENUM queries to resolve a SIP Or TelURI to use the results in a SIP Message or share the corresponding SIPURi in a Web Page, ...

        Activity

        Hide
        binod added a comment -

        Here is a proposal for the same.

        /**

        • Interface encapsulating DNS resolution. It resolves a {@code TelURL} or a {@code SipURI} that contains
          * telephone numbers to SipURIs.
          *
          * <p>An instance of this interface can be accessed through the <code>ServletContext</code>
          * parameter named <code>javax.servlet.sip.DnsResolver</code> or it can be injected
          * using the @Resource or @Inject annotations.
          *
          * @since 2.0
          */
          public interface DnsResolver {

          /**
          * Get string representation of a {@code TelURL}

          or a

          {@code SipURI} in ENUM format, per RFC 6116.
          *
          * @param uri a {@code TelURL} or {@code SipURI}

          with a user=phone parameter

        • @return ENUM formatted string.
        • @throws IllegalArgumentException if the {@code uri} is null or does not represent a telephone number
          */
          String toEnum(URI uri);

          /**
          * Resolve a {@code TelURL} or a {@code SipURI} with user=phone parameter
          * to a SIP URI according to the procedures specified in RFC 3824 and RFC 6116.
          * Only SIP enumservice ("E2U+SIP") will be used for resolution. If there are
          * multiple NAPTR records matching the SIP enum service, it returns the SIP URI
          * with highest precedence by order and preference of NAPTR records.
          *
          * @param uri a {@code TelURL} or {@code SipURI} with a user=phone parameter
          * @return Resolved SIP URI or null, if there is no resolved SIP URI.
          * @throws java.io.IOException if the DNS resolution fails.
          * @throws IllegalArgumentException if the {@code uri}

          is null or does not represent a telephone number
          */
          SipURI resolveToSipURI(URI uri);

        /**

        • Resolve a {@code TelURL} or a {@code SipURI} with user=phone parameter
          * to SIP URIs according to the procedures specified in RFC 3824 and RFC 6116.
          * Only SIP enumservice ("E2U+SIP") will be used for resolution. The returned
          * Sip URIs are ordered first by order and then by preference of the NAPTR records.
          *
          * @param uri a {@code TelURL}

          or

          {@code SipURI} with a user=phone parameter
          * @return Resolved SIP URIs or empty list, if there is no resolved SIP URI.
          * @throws java.io.IOException if the DNS resolution fails.
          * @throws IllegalArgumentException if the {@code uri} is null or does not represent a telephone number
          */
          List<SipURI> resolveToSipURIs(URI uri);

          /**
          * Resolve a {@code TelURL} or a {@code SipURI}

          with user=phone parameter

        • to URIs according to the procedures specified in RFC 6116 for the
        • specified enum service. The enum services are listed in RFC 6118.
        • The returned URIs are ordered first by order and then by preference
        • of the NAPTR records.
          *
        • @param uri a {@code TelURL}

          or

          {@code SipURI}

          with a user=phone parameter

        • @param enumService Name of the enum service. Eg: "E2U+pres" or "E2U+email"
        • @return Resolved URIs as strings or empty list, if there is no resolved URI.
        • @throws java.io.IOException if the DNS resolution fails.
        • @throws IllegalArgumentException if the {@code uri}

          is null or does not represent a telephone number
          */
          List<String> resolveToStrings(URI uri, String enumService);

        Show
        binod added a comment - Here is a proposal for the same. /** Interface encapsulating DNS resolution. It resolves a {@code TelURL} or a {@code SipURI} that contains * telephone numbers to SipURIs. * * <p>An instance of this interface can be accessed through the <code>ServletContext</code> * parameter named <code>javax.servlet.sip.DnsResolver</code> or it can be injected * using the @Resource or @Inject annotations. * * @since 2.0 */ public interface DnsResolver { /** * Get string representation of a {@code TelURL} or a {@code SipURI} in ENUM format, per RFC 6116. * * @param uri a {@code TelURL} or {@code SipURI} with a user=phone parameter @return ENUM formatted string. @throws IllegalArgumentException if the {@code uri} is null or does not represent a telephone number */ String toEnum(URI uri); /** * Resolve a {@code TelURL} or a {@code SipURI} with user=phone parameter * to a SIP URI according to the procedures specified in RFC 3824 and RFC 6116. * Only SIP enumservice ("E2U+SIP") will be used for resolution. If there are * multiple NAPTR records matching the SIP enum service, it returns the SIP URI * with highest precedence by order and preference of NAPTR records. * * @param uri a {@code TelURL} or {@code SipURI} with a user=phone parameter * @return Resolved SIP URI or null, if there is no resolved SIP URI. * @throws java.io.IOException if the DNS resolution fails. * @throws IllegalArgumentException if the {@code uri} is null or does not represent a telephone number */ SipURI resolveToSipURI(URI uri); /** Resolve a {@code TelURL} or a {@code SipURI} with user=phone parameter * to SIP URIs according to the procedures specified in RFC 3824 and RFC 6116. * Only SIP enumservice ("E2U+SIP") will be used for resolution. The returned * Sip URIs are ordered first by order and then by preference of the NAPTR records. * * @param uri a {@code TelURL} or {@code SipURI} with a user=phone parameter * @return Resolved SIP URIs or empty list, if there is no resolved SIP URI. * @throws java.io.IOException if the DNS resolution fails. * @throws IllegalArgumentException if the {@code uri} is null or does not represent a telephone number */ List<SipURI> resolveToSipURIs(URI uri); /** * Resolve a {@code TelURL} or a {@code SipURI} with user=phone parameter to URIs according to the procedures specified in RFC 6116 for the specified enum service. The enum services are listed in RFC 6118. The returned URIs are ordered first by order and then by preference of the NAPTR records. * @param uri a {@code TelURL} or {@code SipURI} with a user=phone parameter @param enumService Name of the enum service. Eg: "E2U+pres" or "E2U+email" @return Resolved URIs as strings or empty list, if there is no resolved URI. @throws java.io.IOException if the DNS resolution fails. @throws IllegalArgumentException if the {@code uri} is null or does not represent a telephone number */ List<String> resolveToStrings(URI uri, String enumService);
        Hide
        binod added a comment -

        This proposal now forms section 5.2.3 of the draft circulated.

        Also see the corresponding javadoc here.

        https://sipservlet-spec.java.net/javadoc/2.0/draft/javax/servlet/sip/DnsResolver.html

        Show
        binod added a comment - This proposal now forms section 5.2.3 of the draft circulated. Also see the corresponding javadoc here. https://sipservlet-spec.java.net/javadoc/2.0/draft/javax/servlet/sip/DnsResolver.html
        Hide
        keith-lewis added a comment - - edited

        The proposal allows applications to perform an enum query.

        Would a container also be expected to perform this resolution as part of the normal sending of SIP messages by the container?

        If both are possible are there cases where the application needs to take control of the process?

        Show
        keith-lewis added a comment - - edited The proposal allows applications to perform an enum query. Would a container also be expected to perform this resolution as part of the normal sending of SIP messages by the container? If both are possible are there cases where the application needs to take control of the process?
        Hide
        binod added a comment -

        The proposal is only for the applications to resolve the TelURLs. I just did a quick google search and found
        that there are APIs exposed by three different containers for doing the same.

        http://ci.jboss.org/jenkins/view/Mobicents/job/Mobicents-Books/lastSuccessfulBuild/artifact/api-docs/jsr289/extensions/org/mobicents/javax/servlet/sip/dns/DNSResolver.html

        http://docs.oracle.com/cd/E27702_01/doc.51/e36938/com/bea/wcp/sip/WlssTelURI.html

        http://massapi.com/source/sailfin-v2-b31g-src/sailfin/common/src/main/java/org/glassfish/comms/api/telurl/TelUrlResolver.java.html

        Since all of these containers expose the API to applications, I was assuming that there should be sufficient usecases
        for applications to do the ENUM resolution explicitely.

        Show
        binod added a comment - The proposal is only for the applications to resolve the TelURLs. I just did a quick google search and found that there are APIs exposed by three different containers for doing the same. http://ci.jboss.org/jenkins/view/Mobicents/job/Mobicents-Books/lastSuccessfulBuild/artifact/api-docs/jsr289/extensions/org/mobicents/javax/servlet/sip/dns/DNSResolver.html http://docs.oracle.com/cd/E27702_01/doc.51/e36938/com/bea/wcp/sip/WlssTelURI.html http://massapi.com/source/sailfin-v2-b31g-src/sailfin/common/src/main/java/org/glassfish/comms/api/telurl/TelUrlResolver.java.html Since all of these containers expose the API to applications, I was assuming that there should be sufficient usecases for applications to do the ENUM resolution explicitely.

          People

          • Assignee:
            binod
            Reporter:
            deruelle_jean
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: