I upgraded from asterisk 11 to 13 today and everything works fine, except agi/cdr when multiple dial are involved.
I know there have been big changes in *12, but this behaviour doesn’t sound right to me:
The first 3 lines in the cdr table belong to the agi call, the second 3 lines to the dialplan call. I would expect to have the same result inside my custom variable, but it doesn’t happen.
I tried with asterisk 13.6 and 13.7.2, they both have the same problem.
Am I missing something?
Looking at what is occurring, the dialplan result looks correct. The first CDR represents the dial attempt and the path of communication between the inbound SIP channel and what it is dialling; the second CDR is the execution of the inbound channel as it survives the failed Dial operation, which picks up the server2 variable. The last is probably because you’re recording CDRs in the h exten, which you can disable in cdr.conf.
I would try the latest tip of the Asterisk 13 branch. The behaviour of setting CDR variables got tweaked slightly due to a bug (ASTERISK-25458) and we may have “fixed” this there. That patch hasn’t been released yet, and will be out in 13.8.0.