I have built a simple WPF app, and calls both inbound and outbound are working. However, audio is not present for outbound calls. I think it's a NAT issue and would like to prove it by explicitly setting the public IP of the client when connecting to the switch or by using STUN.
Linphone works fine on the same PC, but an app built on sipdotnet
has no audio for outbound calls.
It appears that the SDP packet has the internal IP of the machine from which the call is placed.
It's almost certainly a NAT issue, of course, but so far I've been unable to properly send the external IP in the SDP packet. I've tried several different ways to set a STUN server address and enable its usage but nothing so far has worked. Since I know the hostname/IP of the machine to which I'm connecting, I'd like to try setting an explicit value for the address just to confirm that this is the issue, but I haven't been able to do that, either.
The source code is here.
The area in the code where I'm setting up STUN is near the bottom of the CreatePhone method. I pasted a copy of the method at the top of the source file to make it easier to find.
Any help you can offer would be greatly appreciated!