I have made some further testing, and
even without an “execute_on_answer” in the ONANSWER-code, the
variable set in the dialstring appears now and then. And it only happens, when the
ONANSWER code for the a-leg is executed first. On my system, this happens in 30-50%
of the tests. If I move the ONANSWER code to another file, where this is the
only condition, it does not work, but entering some dummy conditions before,
makes it work now and then. So this may be a concurrency issue?
Jon