sipsorcery-org / sipsorcery

A WebRTC, SIP and VoIP library for C# and .NET. Designed for real-time communications apps.
https://sipsorcery-org.github.io/sipsorcery
Other
1.42k stars 431 forks source link

Do incoming calls work with the SoftPhone example? #1069

Open Alexfedel opened 6 months ago

Alexfedel commented 6 months ago

I'm testing the Softphone example. I entered SIPUsername, SIPPassword and SIPServer from my SIP account provider in the App.config and outgoing calls work, but the application does not receive incoming calls. Do incoming calls should work or do I need to adjust something other than the App.config? On my phone it's saying "The number you have dialed is temporarily unavailable" and I do not get any logs about an incoming call in Visual Studio. Disabling Windows Firewall did not help. I also tried PhonerLite Software and there incoming calls working with the same SIP account.

sipsorcery commented 6 months ago

Yes they do but if you don't have some way of dealing with NAT the incoming call is unlikely to get through to you. What's your network config?

Alexfedel commented 6 months ago

Just for testing I disabled Windows Firewall and on my FritzBox Router I set my computer as „Exposed Host“, so guess this means all incoming traffic should come through? Also I read something about setting my public IP for SIPTransport.ContactHost, which I did. Or do I need to add something more to the existing code?

I‘m not sure what‘s the correct network config to let incoming calls get through. Maybe I missed something in the Router config page. Also how do I know which port to open for incoming calls? I thought the Exposed Host setting will automatically accept data on all ports, but maybe I need to open some specific port?

Alexfedel commented 6 months ago

I ended up using another library that isn't free but doesn't deal with NAT issues. With the other library I don't have to change anything in my router settings or disable the firewall. I'm sorry I can't solve it with your library.