Asterisk behind opensips


I have a couple of asterisk servers after an open sips. the architecture looks like this. open sips with two network interfaces one public and one private and the asterisk servers on private network.

The issue is the following: when I call from external a DID which is allocated to an extension the call does not go through because the asterisk is sending 401 Unauthorized. However if I put the asterisk on the public network the call is accepted and works without a problem.

The DID has configured the opensips public IP

Anyone can please give me any hint of how should I make this work?

Thanks and Regards,

You need to provide the configuration for both Asterisk and opensips.

Can you please tell me which configuration file you need on asterisk side?

sip.conf and any file that it includes. Passwords should be obfuscated.