From a70c313c908078019cd83b48530b9790a5fa1bc5 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 18 Dec 2007 01:29:52 +0000 Subject: [PATCH] blinking lights for xmas presence(2) git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6851 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/sofia_presence.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index 986e3dc54f..f2975d08db 100644 --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -682,21 +682,18 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char * astate = dft_state; } + if (!strcasecmp(event_status, "hold")) { + astate = "early"; + } + stream.write_function(&stream, "\n" "\n", switch_str_nil(switch_event_get_header(helper->event, "event_count")), clean_id); - /* astate of aleg/outbound should start @ confirmed not early. direction is recipient or initiator */ + stream.write_function(&stream, "\n", uuid, direction); - stream.write_function(&stream, "%s\n", astate); - - if (!strcasecmp(event_status, "hold")) { - stream.write_function(&stream, "\n\n" - "\n" - "\n\n", clean_id); - } stream.write_function(&stream, "\n\n"); pl = stream.data; ct = "application/dialog-info+xml"; @@ -704,7 +701,7 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char * if (astate && uuid && helper->stream.data) { stream.write_function(&helper->stream, "update sip_dialogs set state='%s' where uuid='%s';\n", astate, uuid); } - + } else { pl = switch_mprintf("\r\n" "