I have a freepbx server behind my router. The calls should pass through the router to my freepbx server and then forwarded back to the router.
This works for outgoing calls. But every time an incoming call comes in the console shows an error and the server does not handle it. WARNING[C-00000029]: chan_sip.c:17207 check_auth: username mismatch, have <99>, digest has <server620>
Which is strange, because 99 is my extension back to the router (FritzBox) again.
This is my trunk configuration (I also tried type=peer):
OK - a “type=Friend” setting means “use the same settings for the inbound that you used for the outbound.” Friend is “PEER + USER”, so you don’t have to fill in the User section on a Friend type connection. You shouldn’t need a “user” section at all if all of the settings are the same AND you are using a “friend” type.
I’m not sure I understand how your PBX is set up if your using an extension to send calls back out into the Internet. The bidirectional trunk you set up for server620 should handle all of your traffic in and out.