Asterisk Trunk Transfer Problem?

Sorry for miss writing on image.

500 calls 502, speaks with 502 without any problem then 500 pushes transfer button and calls 503, after that 500 hears 502’s voice, 503 hears 500’s voice.

I tried this scenario with another ipphone for 500 extension (B brand ipphone).
Working scenario:
B sends 2 different RTP ports for each call. First call (500-502) B brand ipphone gives 12000 port number for connection information itself. Second call(500-503): B gives 12002 for connection information itself.

Not working:
A brand ipphone sends same RTP port for each call. First call (500-502) A brand ipphone gives 12000 port number for connection information itself. Second call(500-503): A gives again 12000 for connection information itself.

B is working but A is not working in attended transfer.
What can be reason? Is there anyway to fix this problem

It’s a phone setting that cause the problem. Tell which phone is A and B, might someone know.

Phone A= analog phone(pots) which is connected to sip server via gateway. But has only one constant port.
Phone B= Yealink, TTEC(fanvil)

The problem is badly underspecified. How does 500 connect to SIP Server. Why are there two trunks going to the same place. How does 500 implement the transfer? How does SIP Server handle transfers done the way that500 implements them, etc.

Which gateway do you use with the analog phone?

Sip server = opensips + (b2bua and gateway)
Gateway is not hardwared, gateway is software not hardwared.

my focus point is that: if transferor is real ip phone so there is not any problem, if transferor is analog phone so there is a problem in sending and receiving RTP. But this problem occurs when transferor calls transfer target(I mean, there is not problem in first stage:500-502 call. Problem occurs when analog phone make flash and calls transfer target (second call:500-503 call))
In last stage 502-503 speaking normally.

I have watched wireshark logs in both situation(transferor ipphone, transferor analog phone cases)and I realize only one difference.if ipphone is transferor so it gives 2 different connection information ports in each call(500-502: 500 is ipphone and gives port 12000 for connection information to 502, 500-503: iphone gives port 12002 to 503). But if transferor is analog phone so my system gives same connection information port for analog phone in each call.