confbridge: Add Duration to ConfbridgeList event
authorGeorge Joseph <george.joseph@fairview5.com>
Sat, 30 Aug 2014 17:33:08 +0000 (17:33 +0000)
committerGeorge Joseph <george.joseph@fairview5.com>
Sat, 30 Aug 2014 17:33:08 +0000 (17:33 +0000)
The ConfbridgeList event doesn't include how long the user has been a
member of the conference.  This patch adds Duration (seconds) which
is based on user->chan->answertime.

Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3955/
........

Merged revisions 422444 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 422445 from http://svn.asterisk.org/svn/asterisk/branches/13

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@422446 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_confbridge.c

index c010a52..18ea804 100644 (file)
@@ -2837,6 +2837,7 @@ static void action_confbridgelist_item(struct mansession *s, const char *id_text
                "EndMarked: %s\r\n"
                "Waiting: %s\r\n"
                "Muted: %s\r\n"
+               "AnsweredTime: %d\r\n"
                "\r\n",
                id_text,
                conference->name,
@@ -2848,7 +2849,8 @@ static void action_confbridgelist_item(struct mansession *s, const char *id_text
                ast_test_flag(&user->u_profile, USER_OPT_WAITMARKED) ? "Yes" : "No",
                ast_test_flag(&user->u_profile, USER_OPT_ENDMARKED) ? "Yes" : "No",
                waiting ? "Yes" : "No",
-               user->muted ? "Yes" : "No");
+               user->muted ? "Yes" : "No",
+               ast_channel_get_up_time(user->chan));
 }
 
 static int action_confbridgelist(struct mansession *s, const struct message *m)