From: Anthony Minessale Date: Thu, 19 Aug 2010 00:51:10 +0000 (-0500) Subject: tweak presence X-Git-Tag: v1.2-rc1~506 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=18695c75f2b2cd41ce8c7e7893913e4c3c091f68;p=thirdparty%2Ffreeswitch.git tweak presence --- diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index c6c0ccaa23..0c938b9ded 100644 --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -1348,17 +1348,23 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char * 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, "\n", uuid, direction); stream.write_function(&stream, "%s\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);