"<dialog-info xmlns=\"urn:ietf:params:xml:ns:dialog-info\" "
"version=\"%s\" state=\"%s\" entity=\"%s\">\n", version, default_dialog, clean_id);
-
}
+ if (!strcasecmp(astate, "hangup")) {
+ astate = "terminated";
+ }
+
if (!zstr(uuid)) {
if (!zstr(answer_state)) {
astate = answer_state;
astate = "confirmed";
}
- if (!strcasecmp(astate, "hangup")) {
- astate = "terminated";
- }
if (is_dialog) {
if (in) {
open = "open";
- if (switch_false(resub)) {
+ if (!strcasecmp(astate, "terminated") && switch_false(resub)) {
int term;
const char *direction = switch_event_get_header(helper->event, "Caller-Direction");