private bool IsFromLocal(SipMessageReader reader) { //if (reader.From.AddrSpec.Hostport.Host.Equals(domainName)) // return true; if (accounts.HasDomain(reader.From.AddrSpec.Hostport.Host)) { return(true); } if (IsLocalAddress(reader.From.AddrSpec.Hostport.IP)) { return(true); } return(false); }
private bool IsAccepted(SipMessageReader reader) { var host = reader.RequestUri.Hostport.Host; return(accounts.HasDomain(host) || IsLocalAddress(host.ToIPAddress())); }