/// <summary> /// Create the contact. /// </summary> /// <param name="contactConnection">The contact connection configuration.</param> public void Create(ContactConnection contactConnection) { _pjBuddyConfig = new pjsua2.BuddyConfig(); _pjBuddyConfig.subscribe = contactConnection.Subscribe; _pjBuddyConfig.uri = contactConnection.Uri; // Create the contact. create(_pjAccount, _pjBuddyConfig); }
/// <summary> /// Sip account contact. /// </summary> /// <param name="account">The Sip account.</param> /// <param name="contactConnection">The Sip contact connection configuration.</param> public Contact(Account account, ContactConnection contactConnection) { if (account == null) { throw new ArgumentNullException(nameof(account)); } if (contactConnection == null) { throw new ArgumentNullException(nameof(contactConnection)); } _account = account; _contactConnection = contactConnection; _pjContact = new ContactCallback(account.PjAccount); // Add this contact. _contactUri = contactConnection.Uri; _account.Contacts.Add(this); }