Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        private bool IsAccepted(SipMessageReader reader)
        {
            var host = reader.RequestUri.Hostport.Host;

            return(accounts.HasDomain(host) || IsLocalAddress(host.ToIPAddress()));
        }