Best way to recording the hold time for a Queue agent or an extension

Home » Asterisk Users » Best way to recording the hold time for a Queue agent or an extension
Asterisk Users 5 Comments

Hi Everyone,

We are using Queuemetrics but it doesn’t Record the Hold Time as it’s never
logged on the queue_log file. However, when an agent or an extension presses
HOLD button on their phone, asterisk does create an event for Music On Hold
which is logged in the /var/log/asterisk/full.

I want to record the total hold time for an extension and save it with an
epoch time stamp.

What is the best approach to this? read and parse /var/log/asterisk/full in
a cron job every few seconds?
Have a presistent PHP-AGI connection to check for hold time events?

As much detail as possible on above approaches or other ideas are most
appreciated.

Thanks

5 thoughts on - Best way to recording the hold time for a Queue agent or an extension

  • Anything on this guys?

    I am sure someone had the need to record the HOLD time or maybe it is
    already being recorded somewhere?

    Any thoughts are appreciated.

    Thanks,
    Bruce

  • Thanks for the feedback. I don’t need the Queue times but rather putting ON
    HOLD times. If you press the HOLD button on your SIP phone, Asterisk records
    the event Music On HOLD Playing and that is recorded in
    /var/log/asterisk/full. I want to harvest the ON HOLD time per phone SET.

    Thanks

    On Mon, Oct 25, 2010 at 4:51 AM, Antonio Berrios <

    href=”mailto:antonio@sheffieldcitytaxis.com”>antonio@sheffieldcitytaxis.com> wrote:

  • _____

    href=”mailto:asterisk-users-bounces@lists.digium.com”>asterisk-users-bounces@lists.digium.com
    [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Bruce B
    Sent: Monday, October 25, 2010 9:32 AM
    Queue agent or an extension

    Thanks for the feedback. I don’t need the Queue times but rather putting ON
    HOLD times. If you press the HOLD button on your SIP phone, Asterisk records
    the event Music On HOLD Playing and that is recorded in
    /var/log/asterisk/full. I want to harvest the ON HOLD time per phone SET.

    Thanks

    Again, the AMI would be your most likely help here. The information in
    /v/l/a/full is going to give you a start and stop time for MOH, but not in a
    format where you can easily tie it back to an extension. You will have a
    “start moh” and “stop moh” event in the AMI that is tied to an extension by
    the uniqueid. In “PERL Weenie” world, the way to process this is to pipe
    the AMI output where it is an input file keyed by the uniqueid. You can
    find some decent examples on voip-info.org.

  • Thanks for the input.

    Would I have to process each call through a specific dial-plan for the AMI
    to be in charge of each call so that it can see the Unique ID of the channel
    and the Hold event? Because that seems like a lot of work. If AMI (I have no
    experience with it) allows me to open a socket and just read whatever comes
    through then it might work for me.

    Thanks

    href=”mailto:asterisk-users-bounces@lists.digium.com”>asterisk-users-bounces@lists.digium.com [mailto:
    href=”mailto:asterisk-users-bounces@lists.digium.com”>asterisk-users-bounces@lists.digium.com] *On Behalf Of *Bruce B

  • _____

    href=”mailto:asterisk-users-bounces@lists.digium.com”>asterisk-users-bounces@lists.digium.com
    [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Bruce B
    Sent: Monday, October 25, 2010 10:07 AM
    Queue agent or an extension

    Thanks for the input.

    Would I have to process each call through a specific dial-plan for the AMI
    to be in charge of each call so that it can see the Unique ID of the channel
    and the Hold event? Because that seems like a lot of work. If AMI (I have no
    experience with it) allows me to open a socket and just read whatever comes
    through then it might work for me.

    In my experience, AMI is “agnostic” to how many calls it is handling.
    Therefore you would identify each call by getting the uniqueid from the
    answer event and assigning the remaining events to that call by matching
    (whether it would be 1, 100 or 1000 calls).