Closed evrenmarin closed 10 months ago
I had the same problem but I can't solve the problem. Where is the problem here? Please can you help?
int expiry = 20; string username = "+41xxx"; string password = "x"; string domain = "swisscom.ch"; string sipServerHostname = "fs1.ims.swisscom.ch";
var sipTransport = new SIPTransport(); sipTransport.EnableTraceLogs();
var regUserAgent = new SIPRegistrationUserAgent(sipTransport, username, password, domain, expiry);
IPAddress[] serverIPAddresses = Dns.GetHostAddresses(sipServerHostname); if (serverIPAddresses.Length > 0) { var outboundProxy = new SIPEndPoint(SIPProtocolsEnum.udp, serverIPAddresses[0], 5060); regUserAgent.OutboundProxy = outboundProxy;
}
sipTransport.SIPRequestInTraceEvent += (localSIPEndPoint, remoteEndPoint, sipRequest) => { Console.WriteLine($"Incoming Request: {sipRequest.ToString()}"); };
sipTransport.SIPRequestOutTraceEvent += (localSIPEndPoint, remoteEndPoint, sipRequest) => { Console.WriteLine($"Outgoing Request: {sipRequest.ToString()}"); };
sipTransport.SIPResponseInTraceEvent += (localSIPEndPoint, remoteEndPoint, sipResponse) => { Console.WriteLine($"Incoming Response: {sipResponse.ToString()}"); };
sipTransport.SIPResponseOutTraceEvent += (localSIPEndPoint, remoteEndPoint, sipResponse) => { Console.WriteLine($"Outgoing Response: {sipResponse.ToString()}"); };
// Geri kalan kısım aynı... regUserAgent.RegistrationFailed += RegUserAgent_RegistrationFailed; regUserAgent.RegistrationTemporaryFailure += RegistrationTemporaryFailure; regUserAgent.RegistrationRemoved += RegistrationRemoved; regUserAgent.RegistrationSuccessful += RegistrationSuccessful;
regUserAgent.Start();
Not enough info to be able to provide any useful help. Feel free to re-open if more info available,
Based on what you've provided you don't even need an outbound proxy.
I had the same problem but I can't solve the problem. Where is the problem here? Please can you help?
int expiry = 20; string username = "+41xxx"; string password = "x"; string domain = "swisscom.ch"; string sipServerHostname = "fs1.ims.swisscom.ch";
var sipTransport = new SIPTransport(); sipTransport.EnableTraceLogs();
var regUserAgent = new SIPRegistrationUserAgent(sipTransport, username, password, domain, expiry);
IPAddress[] serverIPAddresses = Dns.GetHostAddresses(sipServerHostname); if (serverIPAddresses.Length > 0) { var outboundProxy = new SIPEndPoint(SIPProtocolsEnum.udp, serverIPAddresses[0], 5060); regUserAgent.OutboundProxy = outboundProxy;
}
sipTransport.SIPRequestInTraceEvent += (localSIPEndPoint, remoteEndPoint, sipRequest) => { Console.WriteLine($"Incoming Request: {sipRequest.ToString()}"); };
sipTransport.SIPRequestOutTraceEvent += (localSIPEndPoint, remoteEndPoint, sipRequest) => { Console.WriteLine($"Outgoing Request: {sipRequest.ToString()}"); };
sipTransport.SIPResponseInTraceEvent += (localSIPEndPoint, remoteEndPoint, sipResponse) => { Console.WriteLine($"Incoming Response: {sipResponse.ToString()}"); };
sipTransport.SIPResponseOutTraceEvent += (localSIPEndPoint, remoteEndPoint, sipResponse) => { Console.WriteLine($"Outgoing Response: {sipResponse.ToString()}"); };
// Geri kalan kısım aynı... regUserAgent.RegistrationFailed += RegUserAgent_RegistrationFailed; regUserAgent.RegistrationTemporaryFailure += RegistrationTemporaryFailure; regUserAgent.RegistrationRemoved += RegistrationRemoved; regUserAgent.RegistrationSuccessful += RegistrationSuccessful;
regUserAgent.Start();