SipApplicationRouter
The SipApplicationRouter interface defines the API between the SIP Servlet container and the application router. It allows the container to determine how incoming SIP requests are routed to applications based on custom routing logic. The SipApplicationRouter is an important part of the SIP Servlet API that helps route SIP requests to the correct SIP servlet or application based on custom rules defined by the application. This interface provides the flexibility to implement routing rules based on various factors, such as the content of SIP headers, the type of request, or external business logic. By specifying this interface, the SIP Servlet API decouples routing logic from the container, allowing applications to define and control how requests are processed and which applications should handle them.
Methods:
init
void init()
The method initializes the SipApplicationRouter interface. This method is invoked by the SIP container during its lifecycle to set up the SipApplicationRouter. It can only be called once by the container, and any subsequent calls will result in an exception.
Exception:
java.lang.IllegalStateException: Thrown if the init method is called more than once, as the router is only intended to be initialized once per container lifecycle.
Sign in to read the full article
Start innovating with Mobius
What's next? Let's talk!