Hello,
I think you may be missing a couple of key fundamentals of SIP protocol mechanics:
1) By definition, one cannot respond to an ACK; an ACK garners no responses.
2) End-to-end ACKs for 2xx INVITE responses are generated by a SIP UA; a proxy simply cannot behave as though it were an endpoint since it has no hand in SDP negotiation.
So, you really have no choice but to forward an end-to-end ACK to the destination for which it is intended. If you intercepted it at the proxy and absorbed it somehow, the UA that is waiting for it (the callee) would eventually end the dialog because it remains in established-nonconfirmed state.
Now, as far as Kamailio goes: an ACK is a separate transaction from the INVITE to which it corresponds, and accordingly, does not have access to transaction-persistent variables associated with that INVITE. There are two or three ways to maintain dialog-persistent variables:
1) Stuff them into Record-Route parameters.
2) Put them in htable entries.
3) Use $dlg_var():
http://www.kamailio.org/wiki/cookbooks/4.3.x/pseudovariables#dlg_var_key
However, whatever you're trying to do here, it doesn't sound like it's going to work. I would encourage you to acquire a deeper understanding of SIP before proceeding further.
-- Alex