Exemplo n.º 1
0
//----------------------------------------------------------------------
void SipPhone::unregister()
{
    LogInfo info(LogInfo::STATUS_MESSAGE, "pjsip", 0, "Unregister account");
    signalLogData(info);
    if (pjsua_acc_is_valid(acc_id_))
    {
        hangUpAll();
        pjsua_acc_del(acc_id_);
    }
}
Exemplo n.º 2
0
SipAccount::~SipAccount() {
  Logger::debug("SipAccount::~SipAccount()...");
  m_pPhone = NULL;

  if (m_accId == -1) {
    return;
  }

  (void)pjsua_acc_set_user_data(m_accId, NULL);

  pj_status_t status = pjsua_acc_del(m_accId);
  m_accId = -1;
  if (status != PJ_SUCCESS) {
    Logger::warn("pjsua_acc_del() failed (%s)", Helper::getPjStatusAsString(status).c_str());
  }
}
Exemplo n.º 3
0
static void ui_delete_account()
{
    char buf[128];
    int i;

    if (!simple_input("Enter account ID to delete", buf, sizeof(buf)))
	return;

    i = my_atoi(buf);

    if (!pjsua_acc_is_valid(i)) {
	printf("Invalid account id %d\n", i);
    } else {
	pjsua_acc_del(i);
	printf("Account %d deleted\n", i);
    }
}