public Trunk(string displayName, string hostname, string username, Transports transport, IPEndPoint localEndPoint, string outgoingProxy, string authId, string password, string localUri, int registerAfterErrorTimeout) { sync = new object(); state = States.Initiliazed; nonce.SetDefaultValue(); opaque.SetDefaultValue(); errorMessage = "Connecting..."; Username = username; Hostname = hostname; OutgoingProxy = string.IsNullOrEmpty(outgoingProxy) ? hostname : outgoingProxy; DisplayName = new ByteArrayPart(string.IsNullOrEmpty(displayName) ? username : displayName); Domain = new ByteArrayPart(hostname); Realm = Domain; Uri = new ByteArrayPart("sip:" + username + "@" + hostname); RequestUri = new ByteArrayPart("sip:" + hostname); Transport = transport; LocalEndPoint = (localEndPoint.Address == IPAddress.None) ? new IPEndPoint(IPAddress.Any, 0) : localEndPoint; AuthenticationId = new ByteArrayPart(string.IsNullOrEmpty(authId) ? username : authId); Password = new ByteArrayPart(password); RegisterDuration = 600; RegisterAfterErrorTimeout = registerAfterErrorTimeout; ForwardCallToUri = new ByteArrayPart(localUri); usedCSeqs = new UsedCSeq[128]; //dialogs = new Dictionary<int, Dialogs>(); dialogs1 = new Dictionary <int, Dialog>(); dialogs2 = new Dictionary <int, Dialog>(); }
public void SetDefaultValue() { Final = false; Error = false; state = State0; boolExPosition = int.MinValue; Auid.SetDefaultValue(); Segment2.SetDefaultValue(); Item.SetDefaultValue(); DocumentName.SetDefaultValue(); Username.SetDefaultValue(); Domain.SetDefaultValue(); IsGlobal = false; OnSetDefaultValue(); }