no configured max_contacts unable to register

I am trying to get an OBI110 to work as an FXO, however i cant get it to work, it always gives me this error.
image
if i set authentication to none, it allows me to make outbound calls, but inbound calls give me a registration error.
what settings should they be?

Please check these trunk settings:

Trunk Name: (matches username in OBi)
Secret: (matches password in OBi)
Authentication: Both
Registration: Receive
Match Inbound Authentication: Auth Username
Rewrite Contact: Yes
Force rport: Yes

If you still have trouble, paste the Asterisk log, with pjsip logger on, for a failing call at pastebin.com and post the link here.

Changing Match Inbound Authentication and Rewrite Contact from their default settings to those did fix the problem, thanks!