Yes it was an Asterisk bug. Really tough when you spend weeks googling and looking into a "phantom issue" that nobody else ever sees, and then months later you realise you were just the only person who seemed to be actually using that code for those ...
For the record, this appears to have been a bug in Asterisk 13.6.0.
I installed another system yesterday, that I had prepared the same Asterisk build on, back around November, and I am seeing similar issues, but this time with a Gigaset N300IP DECT h...
I am trying, but I don't see anything useful, and the problem is hard to replicate.
I think I am going to try turning off qualify=yes, as there's some talk of this causing problems sometimes.
Perhaps the phone ignore ones of the qualifies (options) ...