You would have to do a /trace and that will echo the reply. Then you figure out which part of the reply you need and set it to a variable like I showed above.