예제 #1
0
  /** Create the softphone handlers and stack */
  public void createSoftPhone(String server) throws MediaException {

    this.server = server;
    SIPConfig.setServer(server);

    if (sipManager != null) {
      destroySoftPhone();
    }

    sipManager = new SipManager();
    softPhoneMedia = new SoftPhoneMedia();
    softPhoneSecurity = new SoftPhoneSecurity();

    sipManager.addCommunicationsListener(this);
    sipManager.setSecurityAuthority(softPhoneSecurity);

    try {
      // put in a seperate thread
      sipManager.start();
      if (sipManager.isStarted()) {
        Log.debug("createSoftPhone", "SIP STARTED");
      }
    } catch (CommunicationsException exc) {
      Log.error("createSoftPhone", exc);
    }
  }
예제 #2
0
 /**
  * Add a CommunicationsListener
  *
  * @param communicationsListener CommunicationsListener
  */
 public void addCommunicationsListener(CommunicationsListener communicationsListener) {
   sipManager.addCommunicationsListener(communicationsListener);
 }