From a17473345b00f5c420ab0b02dbb2548f3545bea3 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 14 Feb 2008 19:45:15 +0000 Subject: [PATCH] update git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7615 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/sofia_presence.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index 6d4658e6fa..77ed13bd1e 100644 --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -792,15 +792,19 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char * if (!strcmp(astate, "early")) { switch_snprintf(status_line, sizeof(status_line), "R %s", switch_str_nil(from_id)); - rpid = "busy"; + rpid = "on-the-phone"; } else if (!strcmp(astate, "confirmed")) { char *dest = switch_event_get_header(helper->event, "Caller-Destination-Number"); if (switch_strlen_zero(from_id) && !switch_strlen_zero(dest)) { from_id = dest; } - - switch_snprintf(status_line, sizeof(status_line), "T %s", switch_str_nil(from_id)); - rpid = "busy"; + + if (switch_strlen_zero(from_id)) { + switch_snprintf(status_line, sizeof(status_line), "Available"); + } else { + switch_snprintf(status_line, sizeof(status_line), "T %s", switch_str_nil(from_id)); + rpid = "on-the-phone"; + } } else if (!strcmp(astate, "terminated")) { switch_snprintf(status_line, sizeof(status_line), "Available"); }