wrtc.onGotHungUp() is an event function called when when person you were in call with ends call, "hungs up the phone". It also occurs if other end denies your call.
(If call was ended by local user wrtc.onHungUp() occurs instead.)
You can use this event to indicate call has ended.
wrtc.onGotHungUp(obj, arg)
Ignored.
wrtc.onGotHungUp = function(obj, arg) {
if (arg.response) {
if (arg.response == 486)
window.alert(arg.partner + " is busy");
else if ((arg.response == 404) || (arg.response == 480))
window.alert(arg.partner + " not found");
else
window.alert(arg.partner + ": " + arg.response + ": " + arg.msg);
}
else {
-- call has ended --
}
}