Unable to register between two Asterisk 1.6.2.6 / FreePBX 2.7 with SIP

Hi,

I’m trying to configure a SIP trunk between two Asterisk installations (trough FreePBX). The trunks are loading correctly, and allows to pass calls but, in sip show registry, they show as No Registration

When I enable sip debugging, it shows Bad Auth.

Here is the config I have right now:

=====================================
FIRST SITE
trunk_name: the_trunk

PEER Details:
username=the_trunk
type=friend
trunkstyle=voip
secret=abc123
registersip=yes
registeriax=no
host=firstsite.example1.com
hassip=yes
hasiax=no
hasexten=no
group=null

Register string: the_trunk:[email protected]

SECOND SITE
trunk_name: the_trunk

PEER Details:
username=the_trunk
type=friend
trunkstyle=voip
secret=abc123
registersip=yes
registeriax=no
host=secondsite.example1.com
hassip=yes
hasiax=no
hasexten=no
group=null

Register string: the_trunk:[email protected]

I certainly have something wrong, but I can’t figure it out. Any help would be appreciated. Thanks.

Forget about what’s in my first post. Maybe this comes from the old Asterisk GUI. I dunno. The fact is that this allows me to connect to my VoIP provider, and I see the trunk registered with them. But it does not work between two Asterisk/FreePBX (well, as I say, it partly works…)

What I would want is an example on how to create registered trunks with FreePBX. The actual stuff that’s in there… I’ll just wash it out.

I have no idea what I am even looking at. Those are not Asterisk variables (unless something changed and I missed the memo).

Isn’t trunkstyle metadata from the old Asterisk GUI???

For trunking using the IAX2 protocol use this webpage: Connecting two Asterisk PBX servers using IAX2, if you want to use SIP, then use these instructions: Connecting two Asterisk PBX servers using SIP user/peer trunking. In both cases, download the spreadsheet and fill in the green areas. The FreePBX config will be generated in the spreadsheet and then you just copy the results into FreePBX.

It’s now clearer for me.

Thanks.