I have clean Debian VPS that I have installed Asterisk on.
I have a SIP account and number with a VoIP provider. I’m trying to make my asterisk register to that SIP account. However, it always times out. I’m fairly new to asterisk but I think the sip.conf is correct.
I turned on debugging and this is what I get every time
I can register fine using Softphone on my PC. Any help would be greatly appreciated. I’ve followed x amount of guides but asterisk never succeeds to register and I’m not sure what could be going wrong. It’s timing out but maybe something in the sip.conf isn’t configured correctly. I have not installed a firewall on this VPS.
First of all, it looks like a network-level issue, not a problem with Asterisk.
Hi,
Do you mean that you can register on the provider’s side from your PC? Or you can register on the Asterisk itself from your PC?
Does your VPS have a public IP address? Otherwise you should configure NAT in Asterisk.
Is the incoming SIP traffic allowed to your server by iptables? iptables -nL -v
Check whether any incoming SIP packets arrive: tcpdump -i [interface name] -n -w [filename.pcap]
Then download your filename.pcap and open it with Wireshark on a PC.
NOTICE[1726]: chan_sip.c:15109 transmit_register: Strange, trying to register USERNAME@sip-gw6.t3.se when registration already pending
I also just ran asterisk -c and then I get a bunch of these,
NOTICE[1775][C-00000000]: chan_sip.c:25628 handle_request_invite: Call from '' (89.163.146.150:5078) to extension '810972599158234' rejected because extension not found in context 'default'.
NOTICE[1775]: chan_sip.c:28066 handle_request_register: Registration from '"102" <sip:102@11.MY.VPS.IP>' failed for '146.0.32.173:5074' - Wrong password
I have no idea what those IP-addresses are.
I also ran tcptrack on port 5060 but it never showed anything.
Either your network is failing to get the request to the ITSP, or the ITSP is unable to root responses back to 11.MY.VPS.IP You will need to ask the ITSP whether they are receiving your requests.
I could successfully connect to SIP.US so maybe my ITSP just doesn’t allow connections to be made from abroad. It’s a Swedish company so maybe they’re blocking connections being made from outside of Sweden.
So, I had to look up my theory from above and it turns out it should work just fine connecting from a different country. So I moved my VPS to a datacenter in NYC instead of Amsterdam and it worked just fine! So just out of curiosity I transferred it to a London datacenter and it would not register. So either some countries are blocked or some specific IP ranges are blocked and I got unlucky twice.
Either way, moved it back to NYC and it works. Just a bummer I can’t keep it closer to Sweden (latency…).