private SIPChannel GetDefaultChannel(SIPProtocolsEnum protocol)
{
// Channels that are not on a loopback address take priority.
foreach (SIPChannel sipChannel in m_sipChannels.Values)
{
if (sipChannel.SIPChannelEndPoint.Protocol == protocol && !IPAddress.IsLoopback(sipChannel.SIPChannelEndPoint.Address))
{
return sipChannel;
}
}
foreach (SIPChannel sipChannel in m_sipChannels.Values)
{
if (sipChannel.SIPChannelEndPoint.Protocol == protocol)
{
return sipChannel;
}
}
logger.Warn("No default SIP channel could be found for " + protocol + ".");
return null;
}