Capture RTP IP Address of b-leg

Hi
I want to get the RTP ip information of b-leg, I tried
exten=>h,1,Noop( ${CHANNEL(rtpsource,audio)} ${CHANNEL(rtpdest,audio)}
But this captures the rtp information of a-leg. Then I tried to use
Dial(SIP/XXX/YYY,M(MCDR))
but if b-leg doesn’t have an answer, I can’t get the rtp information of 183.
how can I get the rtp information of b-leg?