In dialplan, how can I access the channel variables of an outbound call leg?

e.g. 

  <extension name="Local_Extension">
    <condition field="destination_number" expression="^(10[0-9][0-9])$">                           
      <action application="set" data="hangup_after_bridge=true"/>                                           
      <action application="set" data="continue_on_fail=false"/>
      <action application="log" data="INFO: read_codec=${read_codec}"/>                  
      <action application="bridge" data="user/$1@${domain}"/>                   
    </condition>                                                                                        
  </extension> 


In the example above, read_codec of call leg A will be logged
Now I want to print the read_codec/write_codec of outbound call leg in this dialplan. How can I achieve it?


--
regards,
akhil