Multiple Queue Login Automation

Discussion in 'General' started by wfulton, Jul 22, 2009.

  1. wfulton

    Joined:
    Jul 2, 2009
    Messages:
    15
    Likes Received:
    0
    Hello,

    I have not seen any scripts shared in this forum yet. I am new to the forum and the product but have been using asterisk for awhile.

    I recently built a recipe for selective call monitoring, similar to chanspy except that it allows you to select the extension you want to monitor. I would be happy to share this if anyone is interested.

    However, I am interested in seeing a script that will automate multiple queue logins via one feature code. I have three queue's that several agents all work at the same time. This is why I need the script. They should not have to login to each queue and logout of each queue manually each shift. If they can only use one command, it would be more useful to accomplish all three.

    So, I have queue 1 "0001", queue 5 "0005" and queue 8 "0008". Currently, they dial 0001* and confirm their agent number to login. I would like this to happen for all three.

    Any ideas would be great.

    Thanks!
     
  2. wfulton

    Joined:
    Jul 2, 2009
    Messages:
    15
    Likes Received:
    0
    Well, I figured this out shortly after posting.

    I am kind of new here, so I am wondering if this community is very active at all. I have posted a few times with no response at all. If anyone is interested in the multiple queue login script, please msg me.

    Bill
     
  3. jgutierrez

    Joined:
    Feb 28, 2008
    Messages:
    5,737
    Likes Received:
    0
    Hi,
    Sure post it, it may help a lot to the forum's members
     
  4. wfulton

    Joined:
    Jul 2, 2009
    Messages:
    15
    Likes Received:
    0
    Okay. I posted the code in extensions_custom.conf. It survives reboots and rebuilds. The code is posted below and this system I modified it for has three queues, to add more or remove them simply add or remove the lines of code.

    For signin:
    exten => s,n(a9),AddQueueMember(xxxx,Local/${CALLBACKNUM}@from-internal/n)

    For signout:
    exten => s,n(a7),RemoveQueueMember(xxxx,Local/${CALLBACKNUM}@from-internal/n)

    Please understand that this particular installation does not require agent authentication, so i removed this piece. This code is based on the recipe already in the system for queue login/logout, I simply modified it for my purposes. Also, you will have to call these functions by custom feature codes which I also posted below.

    [macro-agent-signin]
    include => macro-agent-add-custom
    exten => s,1,Wait(1)
    exten => s,n,Macro(user-callerid,SKIPTTL)
    exten => s,n(a3),Read(CALLBACKNUM,agent-login,,,,)
    exten => s,n,GotoIf($["${CALLBACKNUM}" != ""]?a7)
    exten => s,n(a5),Set(CALLBACKNUM=${AMPUSER})
    exten => s,n,ExecIf($["${CALLBACKNUM}" = ""],Set,CALLBACKNUM=${CALLERID(number)})
    exten => s,n,GotoIf($["${CALLBACKNUM}" = ""]?a3)
    exten => s,n(a7),GotoIf($["${CALLBACKNUM}" = "${ARG1}"]?invalid)
    exten => s,n,ExecIf($["${QREGEX}" != ""],GotoIf,$["${REGEX("${QREGEX}" ${CALLBACKNUM})}" = "0"]?invalid)
    exten => s,n,ExecIf($["${ARG2}" != ""],${ARG2})
    exten => s,n(a9),AddQueueMember(xxxx,Local/${CALLBACKNUM}@from-internal/n)
    exten => s,n(a9),AddQueueMember(xxxx,Local/${CALLBACKNUM}@from-internal/n)
    exten => s,n(a9),AddQueueMember(xxxx,Local/${CALLBACKNUM}@from-internal/n)
    exten => s,n,UserEvent(Agentlogin,Agent: ${CALLBACKNUM})
    exten => s,n,Wait(1)
    exten => s,n,Playback(agent-loginok&with&extension)
    exten => s,n,SayDigits(${CALLBACKNUM})
    exten => s,n,Hangup
    exten => s,n,MacroExit()
    exten => s,n(invalid),Playback(pbx-invalid)
    exten => s,n,Goto(a3)

    ; end of [macro-agent-signing]


    [macro-agent-signout]
    include => macro-agent-del-custom
    exten => s,1,Wait(1)
    exten => s,n,Macro(user-callerid,SKIPTTL)
    exten => s,n(a3),Read(CALLBACKNUM,agent-logoff,,,,)
    exten => s,n,GotoIf($["${CALLBACKNUM}" = ""]?a5:a7)
    exten => s,n(a5),Set(CALLBACKNUM=${AMPUSER})
    exten => s,n,ExecIf($["${CALLBACKNUM}" = ""],Set,CALLBACKNUM=${CALLERID(number)})
    exten => s,n,GotoIf($["${CALLBACKNUM}" = ""]?a3)
    exten => s,n(a7),RemoveQueueMember(xxxx,Local/${CALLBACKNUM}@from-internal/n)
    exten => s,n(a7),RemoveQueueMember(xxxx,Local/${CALLBACKNUM}@from-internal/n)
    exten => s,n(a7),RemoveQueueMember(xxxx,Local/${CALLBACKNUM}@from-internal/n)
    exten => s,n,UserEvent(RefreshQueue)
    exten => s,n,Wait(1)
    exten => s,n,Playback(agent-loggedoff)
    exten => s,n,Hangup

    ; end of [macro-agent-signout]

    The custom feature codes:

    [from-internal-custom]
    exten => 0010*,1,Macro(agent-signin)
    exten => 0010**,1,Macro(agent-signout)

    I hope this helps. I also found and modified an extension spy tool that is based on chanspy but can be directed to the correct extension rather than random. If anyone wants it please let me know.

    Bill
     
  5. haamed

    Joined:
    Jul 23, 2007
    Messages:
    251
    Likes Received:
    0
    Thank you wfulton :)
     
  6. Usuarioforum

    Joined:
    Nov 15, 2007
    Messages:
    93
    Likes Received:
    0
    Hi:

    I'm interested in the call monitoring. Can you show me the way???

    Cheers
     

Share This Page