Asterisk authentications

Hi ,
I have a typical problem where I have to boxes (a2billing and FreePBX).

I have created SIP accounts on a2billing and has registered them on FreePBX as trunks.
I am observing sometimes, no authentications of call or sometimes a call get into account for a anpther SIP account of a2billing.

This is for sure unauthentication being performed on a2billing and is being confused by the ‘type’ and ‘insecure’ field that is not making sense to me. The a2billinh see all SIP peers connected from the same IP and same port. It should only auth call based on username/password.

What settings I am missing?