public Account initAccount(AccountConfig acfg) { // Create the account var account = new Account(acfg); account.IncomingCall += (sender, e) => { NotifyIncomingCall(e.Call); }; account.AccountStateChange += (sender, e) => { NotifyAccountState(e.Account, e.State, e.Reason); }; account.CallStateChange += (sender, e) => { NotifyCallState(e.Call, e.State); }; account.CallMediaStateChange += (sender, e) => { NotifyCallMediaState(e.Call, e.State); }; return(account.Register()); }
public static AccountConfig getBasicAccountConfig(string username, string password, string host, int port = 5060) { var acfg = new AccountConfig(); acfg.idUri = "sip:" + username + "@" + host; acfg.regConfig.registrarUri = "sip:" + host + ":" + port; var cred = new AuthCredInfo("digest", "*", username, 0, password); acfg.sipConfig.authCreds.Add(cred); return(acfg); }
public Account(AccountConfig acfg) { DND = false; this.acfg = acfg; }