Clearing all variables after call ends

Hi everyone,

How can I clear all dialplan variables after calls end.

On the hangup extension you can set to null string or whatever.

If by dialplan variables, you mean channel variables, they disappear when the channel disappears. In what way does your “call ends” precede the end of the channel, and why does this matter?

I want to know if all variables including global variables clears when the call is hang up.

Global variables don’t clear, because they are global. They persist.


@jcolp even after hanging up the call

Yes, even after hanging up the call. A global variable is shared across ALL channels.

1 Like