No audio from Azure hosted server - Several 200/Ok followed by timeout (401 Unauthorized)

I’m trying to set up an asterisk server in an Azure VM. I’ve managed to install and can get my local soft phone to register and initially connect for a few seconds with several 200/Ok messages passed. Eventually, I get an error “chan_sip.c:4119 retrans_pkt: Retransmission timeout reached on transmission POiFG2BiNjU3XRX2_MsrOA… for seqno 2 (Critical Response) – See”

I’ve opened all the ports to my IP and disabled all firewalls, which seems to allow for registering and initiating a call but does not allow the call to actually occur. I get an answer but then none of the other steps defined in the extension occur correctly. As far as I can tell, everything on the Azure server and VPN is wide open.

I’ve tried enabling nat=yes and nat=comedia and neither changed the behavior.

I’m using Zoiper on Ubuntu as the softphone and just following the hello-world example. I’ve tried turning STUN on and off (not sure that I’m setting this up correctly), but it has no effect.

Sorry if this is not the correct place to ask this question. I think that everything on the Azure server and VPN are wide open, so I think that I don’t have some sort of NAT setting correct.

I’ve attached the full sip debug log in the pastebin below:

If Azure uses a setup like AWS, then you have to configure sip.conf to state that it is behind a NAT so that the public IP address is placed in the signaling. You’ve redacted things so I can’t see if that is the problem or not.

I tried adding nat=yes and nat=comedia both with externip= to no effect. I put it under [general] in sip.conf according to a SO question I saw.

Thanks for your help. I’m very new to networking and asterisk so the exact workings of these things is still a bit of a mystery to me.

Unredacted debug is here:

You need to set localnet or else chan_sip will have no idea when to use the external IP address.

1 Like

The networks that are directly connected to the host machines should be in localnests without needing to add them explicitly.

Thanks! I didn’t realize I also needed to set the local net. Adding


to sip.conf fixed it!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.