FreePBX SIP trunk registration failure

I’ve setup a sip trunk to voicepulse using their install application. When I do a sip show peers is shows :

VP-SIPSJCB/(userid) 64.61.93.190 N 5060 OK (77 ms)
VP-SIPSJCA/(userid) 67.108.9.165 N 5060 OK (71 ms)

when I do a sip show registry it shows :

pbx*CLI> sip show registry
Host Username Refresh State Reg.Time

a debug does not show a registration packet ever going out, and VP is confirming they are not seeing a registration packet. They are seeing options packets but that is. The registration string in the configration is correct. Any ideas ?

FreePBX 2.5.1

I have an IAX2 peer with another provider which registers fine.

Due to the real lack of details on your setup I can only guess. Do you have the proper ports open for SIP? UDP 5060 and 10000 through 20000 is what is needed.

Also if you are using a firewall you’ll also need to configure SIP for nat, see http://freepbx.org/configuration_files and read the section for the file sip_general_custom.conf.

Well, I have the PBX box sitting behind an IPtables firewall, all the rules that you mentioned are in place. I’m on the pbx box in asterisk -r and i’m not seeing registration strings go out from the box. so this issue lies within the pbx itself not the firewall…

here is my sip_general_custom

[general]
externip=(my ddns name)
localnet=10.1.0.0/255.255.255.0

You have a register string configured and you don’t see any SIP register messages originated from Asterisk?

Do you have SIP debug turned on?

Your RTP is not going to work as you have externip set to a hostname, the correct variable in this case is externhost and you need also to supply the externrefresh value for your environment.

Yes, in sip_registrations.conf the following exists:

register=user:[email protected]
register=user:[email protected]

in sip_additional the follow exists:

[VP-SIPSJCA]
type=peer
context=from-pstn
username=
secret=
host=sjc-primary.voicepulse.com
qualify=5000
allow=all
canreinvite=no
dtmfmode=rfc2833
rfc2833compensate=yes
insecure=port,invite
trustrpid=yes

[VP-SIPSJCB]
type=peer
context=from-pstn
username=
secret=
host=sjc-backup.voicepulse.com
qualify=5000
allow=all
canreinvite=no
dtmfmode=rfc2833
rfc2833compensate=yes
insecure=port,invite
trustrpid=yes

sip_general_custom.conf now has:

[general]
externhost=dyndns
localnet=10.1.0.0/255.255.255.0
nat=yes
externrefresh=10

on a debug i do not see registration, this is all i see from a sip reload:

pbxCLI> sip debug peer vp-sipsjcb
SIP Debugging Enabled for IP: 64.61.93.190:5060
pbx
CLI> sip reload
Reloading SIP
== Parsing ‘/etc/asterisk/sip.conf’: Found
== Parsing ‘/etc/asterisk/sip_general_additional.conf’: Found
== Parsing ‘/etc/asterisk/sip_general_custom.conf’: Found
== Parsing ‘/etc/asterisk/sip_nat.conf’: Found
== Parsing ‘/etc/asterisk/sip_registrations_custom.conf’: Found
== Parsing ‘/etc/asterisk/sip_registrations.conf’: Found
== Parsing ‘/etc/asterisk/sip_custom.conf’: Found
== Parsing ‘/etc/asterisk/sip_additional.conf’: Found
== Parsing ‘/etc/asterisk/sip_custom_post.conf’: Found
== Parsing ‘/etc/asterisk/sip_notify.conf’: Found
Reliably Transmitting (no NAT) to 64.61.93.190:5060:
OPTIONS sip:sjc-backup.voicepulse.com SIP/2.0
Via: SIP/2.0/UDP 10.1.0.114:5060;branch=z9hG4bK254c5efe;rport
From: “Unknown” sip:[email protected];tag=as75838d60
To: sip:sjc-backup.voicepulse.com
Contact: sip:[email protected]
Call-ID: [email protected]
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Tue, 26 May 2009 22:43:32 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Length: 0


pbx*CLI>
<— SIP read from 64.61.93.190:5060 —>
SIP/2.0 200 OK to keepalive
Via: SIP/2.0/UDP 10.1.0.114:5060;branch=z9hG4bK254c5efe;rport=5060;received=98.168.133.2
From: “Unknown” sip:[email protected];tag=as75838d60
To: sip:sjc-backup.voicepulse.com;tag=329cfeaa6ded039da25ff8cbb8668bd2.5b4d
Call-ID: [email protected]
CSeq: 102 OPTIONS
Server: OpenSER (1.3.2-notls (i386/linux))
Content-Length: 0

<------------->
— (8 headers 0 lines) —
Really destroying SIP dialog ‘[email protected]’ Method: OPTIONS

sip show registry produces:

pbx*CLI> sip show registry
Host Username Refresh State Reg.Time

turns out there were two [general] entries in the conf file which i guess caused issues.