Пример #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);
 }