0
votes

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

---
Retransmitting #7 (no NAT) to 80.244.65.70:5060:
REGISTER sip:sip-gw6.t3.se SIP/2.0
Via: SIP/2.0/UDP 11.MY.VPS.IP:5060;branch=z9hG4bK72be2ee7
Max-Forwards: 70
From: <sip:[email protected]>;tag=as5ace2218
To: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 103 REGISTER
User-Agent: Asterisk PBX 11.13.1~dfsg-2+b1
Expires: 120
Contact: <sip:[email protected]:5060>
Content-Length: 0


---
REGISTER 10 headers, 0 lines
Reliably Transmitting (no NAT) to 80.244.65.70:5060:
REGISTER sip:sip-gw6.t3.se SIP/2.0
Via: SIP/2.0/UDP 11.MY.VPS.IP:5060;branch=z9hG4bK71b213aa
Max-Forwards: 70
From: <sip:[email protected]>;tag=as5ace2218
To: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 104 REGISTER
User-Agent: Asterisk PBX 11.13.1~dfsg-2+b1
Expires: 120
Contact: <sip:[email protected]:5060>
Content-Length: 0


---
[Jul 27 05:51:32] NOTICE[588]: chan_sip.c:15071 sip_reg_timeout:    -- Registration for '[email protected]' timed out, trying again (Attempt #3)
Really destroying SIP dialog '[email protected]' Method: REGISTER
Retransmitting #1 (no NAT) to 80.244.65.70:5060:
REGISTER sip:sip-gw6.t3.se SIP/2.0
Via: SIP/2.0/UDP 11.MY.VPS.IP:5060;branch=z9hG4bK71b213aa
Max-Forwards: 70
From: <sip:[email protected]>;tag=as5ace2218
To: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 104 REGISTER
User-Agent: Asterisk PBX 11.13.1~dfsg-2+b1
Expires: 120
Contact: <sip:[email protected]:5060>
Content-Length: 0

This is my sip.conf

[general]
port=5060
bindaddr=0.0.0.0
qualify=no
disable=all
allow=alaw
allow=ulaw
dtmfmode=rfc2833
srvlookup=yes
register => USERNAME:[email protected]/provider

[provider]
type=peer
insecure=port,invite
nat=no
canreinvite=no
authuser=USERNAME
defaultuser=USERNAME
fromuser=USERNAME
fromdomain=sip-gw6.t3.se
secret=PASSWORD
host=sip-gw6.t3.se
dtmfmodf=rfc2833
context=provider-in ;extensions.conf context for inbound calls
disallow=all
allow=ulaw
allow=alaw

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.

1
I would recommend to capture register message when you are using softphone and compare with register message from Asterisk and check what differs.os11k
ensure that your firewall is configured properly -- I notice you have "nat=no" for the provider. Since your ip is obfuscated, I can't tell if it is a public IP or not.MichelV69

1 Answers

0
votes

Turns out my ITSP was blocking certain IP ranges. Moved my VPS to a different datacenter, got a different IP range and it started working...