@Override protected void doStop() throws Exception { super.doStop(); getSipStack().deleteListeningPoint(configuration.getListeningPoint()); provider.removeSipListener(sipPublishListener); getSipStack().deleteSipProvider(provider); getSipStack().stop(); }
ListeningPointExt listeningPoint = (ListeningPointExt) sipStack.createListeningPoint(ipAddress, port, signalingTransport); if(useStun) { if(sipStack.getSipProviders() != null && sipStack.getSipProviders().hasNext()) { sipProvider = (SipProvider) sipStack.getSipProviders().next(); for (ListeningPoint listeningPointTemp : sipProvider.getListeningPoints()) { if(!(listeningPointTemp.getIPAddress().equalsIgnoreCase(listeningPoint.getIPAddress()) && listeningPointTemp.getPort() == listeningPoint.getPort())) { sipProvider = sipStack.createSipProvider(listeningPoint); } else { sipProvider.addListeningPoint(listeningPoint);
if (extendedListeningPoint != null) { if (extendedListeningPoint.getSipProvider().getListeningPoints().length == 1) { sipStack.deleteSipProvider(extendedListeningPoint.getSipProvider()); if (logger.isDebugEnabled()) { logger.debug("Removing the sip provider"); logger.debug("Removing the following Listening Point " + extendedListeningPoint); sipStack.deleteListeningPoint(extendedListeningPoint.getListeningPoint());
@Override protected void doStart() throws Exception { super.doStart(); Properties properties = configuration.createInitialProperties(); setSipStack(configuration.getSipFactory().createSipStack(properties)); configuration.parseURI(); sipPresenceAgentListener = new SipPresenceAgentListener(this); configuration.setListeningPoint( sipStack.createListeningPoint(configuration.getFromHost(), Integer.valueOf(configuration.getFromPort()).intValue(), configuration.getTransport())); provider = getSipStack().createSipProvider(configuration.getListeningPoint()); provider.addSipListener(sipPresenceAgentListener); }
logger.debug("Sip Stack " + sipStack.getStackName() + " will be using " + addressResolverClass + " as AddressResolver");
protected void stopSipStack() { // stopping the sip stack if(sipStack != null) { sipStack.stop(); sipStack = null; if(logger.isDebugEnabled()) { logger.debug("SIP stack stopped"); } } }
ListeningPointExt listeningPoint = (ListeningPointExt) sipStack.createListeningPoint(ipAddress, port, signalingTransport); if(useStun) { if(sipStack.getSipProviders().hasNext()) { sipProvider = (SipProvider) sipStack.getSipProviders().next(); for (ListeningPoint listeningPointTemp : sipProvider.getListeningPoints()) { if(!(listeningPointTemp.getIPAddress().equalsIgnoreCase(listeningPoint.getIPAddress()) && listeningPointTemp.getPort() == listeningPoint.getPort())) { sipProvider = sipStack.createSipProvider(listeningPoint); } else { sipProvider.addListeningPoint(listeningPoint);
if (extendedListeningPoint != null) { if (extendedListeningPoint.getSipProvider().getListeningPoints().length == 1) { sipStack.deleteSipProvider(extendedListeningPoint.getSipProvider()); if (logger.isDebugEnabled()) { logger.debug("Removing the sip provider"); logger.debug("Removing the following Listening Point " + extendedListeningPoint); sipStack.deleteListeningPoint(extendedListeningPoint.getListeningPoint());
@Override protected void doStart() throws Exception { super.doStart(); Properties properties = configuration.createInitialProperties(); setSipStack(configuration.getSipFactory().createSipStack(properties)); configuration.parseURI(); if (sipPublishListener == null) { sipPublishListener = new SipPublishListener(this); } configuration.setListeningPoint( sipStack.createListeningPoint(configuration.getFromHost(), Integer.valueOf(configuration.getFromPort()).intValue(), configuration.getTransport())); boolean found = false; if (provider != null) { for (ListeningPoint listeningPoint : provider.getListeningPoints()) { if (listeningPoint.getIPAddress().equalsIgnoreCase(configuration.getListeningPoint().getIPAddress()) && (listeningPoint.getPort() == configuration.getListeningPoint().getPort())) { found = true; } } } if (!found) { provider = getSipStack().createSipProvider(configuration.getListeningPoint()); provider.addSipListener(sipPublishListener); configuration.setCallIdHeader(provider.getNewCallId()); } }
logger.debug("Sip Stack " + sipStack.getStackName() + " will be using " + addressResolverClass + " as AddressResolver");
ListeningPointExt listeningPoint = (ListeningPointExt) sipStack.createListeningPoint(ipAddress, port, signalingTransport); if (sipStack.getSipProviders() != null && sipStack.getSipProviders().hasNext()) { sipProvider = (SipProvider) sipStack.getSipProviders().next(); for (ListeningPoint listeningPointTemp : sipProvider.getListeningPoints()) { if (!(listeningPointTemp.getIPAddress().equalsIgnoreCase(listeningPoint.getIPAddress()) && listeningPointTemp sipProvider = sipStack.createSipProvider(listeningPoint); } else { sipProvider.addListeningPoint(listeningPoint);
if(extendedListeningPoint != null) { if(extendedListeningPoint.getSipProvider().getListeningPoints().length == 1) { sipStack.deleteSipProvider(extendedListeningPoint.getSipProvider()); if(logger.isDebugEnabled()) { logger.debug("Removing the sip provider"); logger.debug("Removing the following Listening Point " + extendedListeningPoint); sipStack.deleteListeningPoint(extendedListeningPoint.getListeningPoint()); extendedListeningPoint = null;
sipSubscriptionListener = new SipSubscriptionListener(this); ListeningPoint listeningPoint = sipStack.createListeningPoint(configuration.getFromHost(), Integer.valueOf(configuration.getFromPort()).intValue(), configuration.getTransport()); configuration.setListeningPoint(listeningPoint); provider = sipStack.createSipProvider(configuration.getListeningPoint()); provider.addSipListener(sipSubscriptionListener);
@Override protected void doStop() throws Exception { super.doStop(); getSipStack().deleteListeningPoint(configuration.getListeningPoint()); provider.removeSipListener(sipPresenceAgentListener); getSipStack().deleteSipProvider(provider); getSipStack().stop(); }
logger.debug("Sip Stack " + sipStack.getStackName() +" will be using " + addressResolverClass + " as AddressResolver");
ListeningPointExt listeningPoint = (ListeningPointExt) sipStack.createListeningPoint(ipAddress, port, signalingTransport); if (sipStack.getSipProviders() != null && sipStack.getSipProviders().hasNext()) { sipProvider = (SipProvider) sipStack.getSipProviders().next(); for (ListeningPoint listeningPointTemp : sipProvider.getListeningPoints()) { if (!(listeningPointTemp.getIPAddress().equalsIgnoreCase(listeningPoint.getIPAddress()) && listeningPointTemp sipProvider = sipStack.createSipProvider(listeningPoint); } else { sipProvider.addListeningPoint(listeningPoint);
if(extendedListeningPoint != null) { if(extendedListeningPoint.getSipProvider().getListeningPoints().length == 1) { sipStack.deleteSipProvider(extendedListeningPoint.getSipProvider()); if(logger.isDebugEnabled()) { logger.debug("Removing the sip provider"); logger.debug("Removing the following Listening Point " + extendedListeningPoint); sipStack.deleteListeningPoint(extendedListeningPoint.getListeningPoint()); extendedListeningPoint = null;
logger.debug("Sip Stack " + sipStack.getStackName() +" will be using " + addressResolverClass + " as AddressResolver");