I am originating a channel through ARI. During it I have set a HANGUPCAUSE channel variable. After the channel timeout i got the channel destroyed event. But rather than showing the cause which I set, it is showing 0 Unknown. Can anyone help me with this.
You can’t set hangup cause like that. Did something tell you that you could? The hangup cause is set when the channel is hung up, be it through whatever means that occurs.
Additional explanation. HANGUPCAUSE and a few others, are really functions, even though you use the syntax for variables. It directly reflects the numerical value in a field in the channel data structure, rather than being the string value of a key-value pair.
While originating, I am getting “0 – Unknown” after a timeout, but for create and dial, I’m getting “16 – Normal Clearing.”
My question is, why am I getting “0 – Unknown” for the timeout case, and why is it different for both scenarios?