Asterisk under 2 routers. Sip clients connection information?

In my scenario:
If client B calls client C, Asterisk gives wrong connection information for client C. (Asterisk gives for client C so B client try to send RTP packets to but B resides in network, in this case B cant send ACK packet to right destination so session can not be created.
Is there any way to modify asterisk in order to asterisk gives 3 ip addresses for sip clients?
If sip user agent is same network with asterisk so give
if sip user agent is upper network so give
if sip client is registered from public ip so give PUBLIC_IP( like this ip)

Is there anyway?
Schema is attached below:

Didn’t we talk about this a couple of weeks ago?

The problems you are going to run into are the transit from router2 to router1. Specifically, the phone associated with is going to give you fits. You are going to have to redirect your SIP port from Router2 to the Asterisk server. How this works is going to depend on some deep magic in your routing tables.

This is a Network Address Translation nightmare.

SIP is a tough enough protocol when dealing with a single NAT device. This is going to be crazy.

You could probably get it to work eventually, but once you’re done, it’s going to be “write-only”. I don’t see a simple way to set it up or manage is.

I think i must not create like this scenario. I will disconnect one of the routers. Thanks for your kindness. Yes i asked couple of weeks ago.

you did not state why you are using two routers, but unless there is an absolute need, i would get rid of one router. if you need isolate parts of the network use vlans. put all the phones on the same vlan and then isolate the various network segments on their own vlans.
cynjut’s comment is spot on. with enough time and effort you might get it to work, but i would not put money on it.