sipservlet-spec
  1. sipservlet-spec
  2. SIPSERVLET_SPEC-16

Allows for applications to set the outbound interface based on SipURI

    Details

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

      Description

      The current API allows only applications to set the outbound interface (in proxy or sipsession) based on InetAddress but the ServletContext provides a SipURI List. The goal would be to align and allows to set based on SipURI instead of (or in addition to) InetAddress

        Activity

        deruelle_jean created issue -
        Hide
        echeung added a comment -

        For historic context, this was the rationale for the asymmetry:

        ----- on 9 Jan 2008---
        Hello,

        We'd like to propose a change to simplify the setOutboundInterface (http://www.289eg.org/cb/proj/tracker/itemDetails.do?navigation=true&task_id=1028) syntax and semantics.

        The idea is to introduce two methods :
        void setOutboundInterface(java.net.InetSocketAddress address)
        void setOutboundInterface(java.net.InetAddress address)

        Instead of existing:
        void setOutboundInterface(SipURI uri)

        The motivation of this change is to allow the developers to easily influence the source port number and IP address chosen by the container when originating requests for SipSession/Proxy/ProxyBranch without interfering with RFC-defined transport selection rules.

        Kristoffer and I spent some time discussing various use cases around the existing 1.1 API (i.e. uri is supplied instead of just the address or address/port combination).

        While trying to write all the corner/error cases out, I realized that the RFC-dictated transport selection rules were rather difficult to work around and a simpler mechanism would be preferable.

        Please let us know what you think.

        Thanks
        Jarek & Mihir

        ----- on 1 May 2008, in response to a question on consistency---
        The short answer is no.
        The idea behind using URI in the ctx attr is that a container implementation could indicate which interfaces are SIPS capable, or possibly limited to a specific transport ('transport=tcp'). The setOutboundInterface takes and InetAddr because we don't want it to interfere with SIP transport type selection rules.

        Thanks,
        Jarek

        Show
        echeung added a comment - For historic context, this was the rationale for the asymmetry: ----- on 9 Jan 2008--- Hello, We'd like to propose a change to simplify the setOutboundInterface ( http://www.289eg.org/cb/proj/tracker/itemDetails.do?navigation=true&task_id=1028 ) syntax and semantics. The idea is to introduce two methods : void setOutboundInterface(java.net.InetSocketAddress address) void setOutboundInterface(java.net.InetAddress address) Instead of existing: void setOutboundInterface(SipURI uri) The motivation of this change is to allow the developers to easily influence the source port number and IP address chosen by the container when originating requests for SipSession/Proxy/ProxyBranch without interfering with RFC-defined transport selection rules. Kristoffer and I spent some time discussing various use cases around the existing 1.1 API (i.e. uri is supplied instead of just the address or address/port combination). While trying to write all the corner/error cases out, I realized that the RFC-dictated transport selection rules were rather difficult to work around and a simpler mechanism would be preferable. Please let us know what you think. Thanks Jarek & Mihir ----- on 1 May 2008, in response to a question on consistency--- The short answer is no. The idea behind using URI in the ctx attr is that a container implementation could indicate which interfaces are SIPS capable, or possibly limited to a specific transport ('transport=tcp'). The setOutboundInterface takes and InetAddr because we don't want it to interfere with SIP transport type selection rules. Thanks, Jarek
        binod made changes -
        Field Original Value New Value
        Assignee binod [ binod ]
        Hide
        binod added a comment -

        As per the discussion in the EG meeting, we decided that, the container will provide a list of IP addresses to the application, so that they can directly use what is obtained from the servlet context. Following are the suggested updates to the API for the same.

        Add to SipServlet:
        public static final String OUTBOUND_ADDRESSES =
        "javax.servlet.sip.outboundAddresses";

        Add to SipServletContext:
        List<InetAddress> getOutboundAddresses();

        Show
        binod added a comment - As per the discussion in the EG meeting, we decided that, the container will provide a list of IP addresses to the application, so that they can directly use what is obtained from the servlet context. Following are the suggested updates to the API for the same. Add to SipServlet: public static final String OUTBOUND_ADDRESSES = "javax.servlet.sip.outboundAddresses"; Add to SipServletContext: List<InetAddress> getOutboundAddresses();
        Show
        binod added a comment - This change is now incorporated. https://sipservlet-spec.java.net/javadoc/2.0/draft/javax/servlet/sip/SipServlet.html#OUTBOUND_ADDRESSES https://sipservlet-spec.java.net/javadoc/2.0/draft/javax/servlet/sip/SipServletContext.html#getOutboundAddresses( )
        binod made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        binod made changes -
        Fix Version/s 2.0-pr [ 16895 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: