The indent seems wrong here.
And you can simplify to:
warning.textContent = data.reason || "The call has been closed."

Also, some of your new string are using single quotes, everything else uses double quotes for strings. Unless there's a reason for this difference, it would be nice to keep things consistent.