astate = "confirmed";
}
- if (!strcasecmp(astate, "ringing")) {
- if (!strcasecmp(direction, "recipient")) {
- astate = "early";
- } else {
- astate = "confirmed";
- }
- }
if (is_dialog) {
+ if (!strcasecmp(astate, "ringing")) {
+ if (!strcasecmp(direction, "recipient")) {
+ astate = "early";
+ } else {
+ astate = "confirmed";
+ }
+ }
+
stream.write_function(&stream, "<dialog id=\"%s\" direction=\"%s\">\n", uuid, direction);
stream.write_function(&stream, "<state>%s</state>\n", astate);
+ } else {
+ if (!strcasecmp(astate, "ringing")) {
+ astate = "confirmed";
+ }
}
+
if (!strcasecmp(astate, "early") || !strcasecmp(astate, "confirmed")) {
clean_to_user = switch_mprintf("%s", sub_to_user ? sub_to_user : to_user);