code: public MgcpEndpoint registerEndpoint(String namespace) throws UnrecognizedMgcpNamespaceException {
          // Get correct endpoint provider
          MgcpEndpointProvider<?> provider = this.providers.get(namespace);
          if (provider == null) {
              throw new UnrecognizedMgcpNamespaceException("Namespace " + namespace + " is unrecognized");
          }
  
          // Create the endpoint and register it
          MgcpEndpoint endpoint = provider.provide();
          endpoint.observe((MgcpEndpointObserver) this);
          endpoint.observe((MgcpMessageObserver) this);
          this.endpoints.put(endpoint.getEndpointId().toString(), endpoint);
          
          if (log.isDebugEnabled()) {
              log.debug("Registered endpoint " + endpoint.getEndpointId().toString() + ". Count: " + this.endpoints.size());
          }
          
          return endpoint;
      }
docs: Registers a new endpoint.
  
  @param endpoint The name space of the endpoint which indicates what kind of endpoint is generated.
  @param domain The domain where the endpoint is to be registered.