Registration Timing Out - Trying to connect to SIP provider

Hey All,

I’ve been reading the free O’Reilly ebook “Asterisk: The future of Telephony” and I followed the instructions for installation onto CentOS 5.3 which appears to have been completed successfully.

The part I got stuck on is how I can register my server with my VoIP SIP provider (www.voip.ms)

When I start Asterisk, this is what I get after it says “Asterisk Ready”:

NOTICE[3321]: chan_sip.c:7550 sip_reg_timeout: – Registration for 'USERNAME@sip.us3b.voip.ms’ timed out, trying again (Attempt #1)

and it keeps attempting and timing out…

I have tested “ping sip.us3b.voip.ms” and it correctly resolves the IP address and pings so that is not the issue.

I am running my server behind a Belkin consumer-grade router and I have set up a DMZ for the local IP address of my server (forwards all ports) and disabled the firewall - all for diagnostic purposes of getting this thing up and running.

I am trying to use the sample configuration files that voip.ms has provided to me and they are displayed below:

sip.conf

[general]                
register => MYUSERNAME:PASSWORD@sip.us3b.voip.ms:5060

[voipms]
canreinvite=no
context=mycontext
host=sip.us3b.voip.ms
secret=PASSWORD
type=friend
username=MYUSERNAME
disallow=all
allow=ulaw
; allow=g729 ; Uncomment if you support G729
fromuser=MYUSERNAME
trustrpid=yes
sendrpid=yes
insecure=port,invite
nat=yes ; Uncomment this if your box is behind a NAT

extensions.conf

[mycontext]
include => voipms-outbound
include => voipms-inbound

[voipms-outbound]
exten => _1NXXNXXXXXX,1,Dial(SIP/${EXTEN}@voipms)
exten => _1NXXNXXXXXX,n,Hangup()
exten => _NXXNXXXXXX,1,Dial(SIP/1${EXTEN}@voipms)
exten => _NXXNXXXXXX,n,Hangup()
exten => _011.,1,Dial(SIP/${EXTEN}@voipms)
exten => _011.,n,Hangup()
exten => _00.,1,Dial(SIP/${EXTEN}@voipms)
exten => _00.,n,Hangup()

; inbound context example

[voipms-inbound]
exten => *MY DID*,1,Answer()

I have tried both commenting and uncommenting the NAT line in sip.conf.

Could someone please help me figure out what the problem is here? I’d really like to get this server registered with my provider so I can start learning how to make dialplans and do really cool stuff.

Thanks so much for any help in advance.

  • dshap

UPDATE:

Okay after a long talk with some of the very helpful people in the IRC, I got my sip.conf “cleaned up” to look like the following:

[general]
nat=yes
externip=68.231.218.208
localnet=192.168.2.0/24
canreinvite=no
register => 103845:***@sip.us3b.voip.ms:5060


[voipms]
context=mycontext
host=sip.us3b.voip.ms
secret=***
type=friend
username=103845
disallow=all
allow=ulaw
; allow = g729 ;Uncomment if you support G729
fromuser=103845
trustrpid=yes
sendrpid=yes
insecure=port,invite
nat=no

I have now disabled the Firewall and SELinux on my CentOS 5.3 and I also did ‘yum remove iptables’ as someone recommended.

I am STILL getting these registration timeout messages :-\ Any further help would be greatly appreciated - I’d really like to get this up and running so I can start learning how to do the cool stuff.

Thanks!