public DefaultSipClient(SipClientAccount account) { if (account == null) { throw new ArgumentNullException("Invalid account."); } Account = account; TransactionLayer = new TransactionAgent(Account.RegistrarUri); }
public static ISipClient UseDefaultSipClient(this ISipBuilder builder) { SipClientAccount account = new SipClientAccount() { RegistrarUri = builder.RegistrarUri, User = builder.User }; DefaultSipClient sipClient = new DefaultSipClient(account); sipClient.TransactionLayer.StartListening(builder.ClientUri.Host, builder.ClientUri.Port); return(sipClient); // TODO this method should create sip builder and save it to some temp variable... sip client definition should be handled by some final builder method }
/// <summary> /// Creates user identification from sip account. /// </summary> /// <param name="account">Sip client account.</param> /// <returns>Identification.</returns> public static Identification GetAccountIdentification(this SipClientAccount account) { SipUri identification = new SipUri(account.RegistrarUri.Host, account.User); return(new Identification(identification, null)); }
public DefaultSipClient(SipClientAccount account, IEnumerable <string> allowedMethods) : this(account) { AllowedMethods = allowedMethods ?? throw new ArgumentNullException("Allowed methods cann't be null."); }