“Call Me Now” Outbound Calls In A Queue

Home » Asterisk Users » “Call Me Now” Outbound Calls In A Queue
Asterisk Users 9 Comments

I want to put a “call me now” button on the web site that will place the request into an asterisk call Queue and then when an agent picks up the call in the queue, place the outbound call to the customer.

The following AMI command works, but it calls the customer first, before an agent is necessarily available.

Action: Originate Channel: SIP/voipms/customer_number_here Context: external Async: true Application: Queue Data: sales Callerid: Company <8005551212>

How can I get an available agent before the customer call is placed?

9 thoughts on - “Call Me Now” Outbound Calls In A Queue

  • Use AMI to do a queue status. In the status reply, you’ll get a list of all the agents and their status (Not in use, in use, busy, unavailable, or ringing).

  • That approach only works if there are any agents that are not busy on a call – I could pick one, take them out of the queue then connect the call. If all agents are busy, I need to be able to insert the request into the queue so that it gets processed in sequence with the inbound calls.

    Mitch

  • The problem is that you need to have a process waiting for a free agent and then doing the reschedule. Instead of writing your own, you could try our WombatDialer (that is currently free as in beer, as it is being community tested) to automate such a task. It has a nice HTTP API and it would do exactly what you are looking for. See http://wombatdialer.com/
    l.

    2012/9/28 Mitch Claborn

  • Beware of *anything* “free as in beer”. Unless it includes the Source Code, place it gently down on the floor and then run, don’t walk, in the opposite direction as fast as your legs can carry you.

  • Hoping that the Queue application is not automatically Answering the line
    (till an agent will do this) my suggestion is to switch between “who have to answer” in order to progress to the second call leg. This means that the Queue will be called through a Local Channel and the call to your customer will be made through a Dial application.

    Below is something to start with – in case it will work you could modify to your needs.

    [demo]
    exten => s,1,NoOp(Queue without answer)
    exten => s,2,Queue(sales)

    Action: Originate Channel: Local/s@demo/n Application: Dial Data: SIP/voipms/customer_number

    HTH, Ioan Indreias Modulo Consulting // http://www.modulo.ro

  • This is mostly working. See below. My only problem is being able to set the caller ID on the outbound call to the customer. I’ve tried both a queue connected macro and gosub (see below), and those both execute, but the caller ID is not showing up correctly for the customer. I
    assume this is because the caller ID is being set on the agent’s channel not the customers.

    Any ideas on that?

    Action: Originate Channel: Local/s@callmenow/n Application: Dial Data: SIP/voipms/customer_number Async: true Callerid: Call Me Now <777>
    Timeout: 999999

    [callmenow]
    exten => s,1,NoOp(callmenow: Queue without answer)
    same
    =>n,Queue(sales,tc,,,,,CallMeNowQueueConnected,CallMeNowQueueConnectedGosub)

    [CallMeNowQueueConnectedGosub]
    exten =>s,1,NoOp(CallMeNowQueueConnectedGosub)
    same =>n,Set(CALLERID(num)=${OUTBOUND_CALLERID_NUM})
    same =>n,Set(CALLERID(name)=${OUTBOUND_CALLERID_NAME})
    same =>n,Verbose(2,end of gosub)
    same =>n,Return()

    [macro-CallMeNowQueueConnected]
    ; this runs on the agent/member’s channel exten =>s,1,NoOp(CallMeNowQueueConnected)
    same =>n,Set(CALLERID(num)=${OUTBOUND_CALLERID_NUM})
    same =>n,Set(CALLERID(name)=${OUTBOUND_CALLERID_NAME})
    same =>n,Playback(custom/callmenow-announce)
    same =>n,Verbose(2,end of macro)

    Mitch

  • Hi Mitch,

    Glad that it works for you.

    Regarding the CallerID I suggest to set some the variables before the actual Dial.

    Something like:

    Action: Originate Channel: Local/s@callmenow/n Context: to-customer Exten: s Priority: 1
    Async: true Variable: CHANNEL_TO_CUSTOMER=SIP/voipms/customer_number Variable: OUTBOUND_CALLERID_NUMw7
    Variable: OUTBOUND_CALLERID_NAME