Originate Call into a Queue

Good morning, so I’m looking to be able to originate a call into a queue that will only ring the destination number once an agent picks up. Preferably we could accomplish this with ARI, but can use AMI or callfiles as well. I’d additionally like to have the CallerID set by this for the agent to see which gets processed by the Call Pop in Sangoma Phone to make sure they have the record up they need to work when they answer the call.

I’ve spent a bit of time on it, but end up either having Asterisk do nothing, or the queue picks up and hangs up the call immediately, and doesn’t ring any agents or dial the outbound number.

Currently on FreePBX 15.0.37.1 with Asterisk 18.16.0

Thanks in advance for any help.

What you are prescribing is possible. You would be able to do it via the methods you propose. You could call a context that plays a message forever (or for several minutes at least), then when the agent presses 1. We have something similar (not in queues) where we use a call file to trigger in inbound call. You could do the same. The next steps make an outbound call using the ${CALLERID(num)} and connecting the call.

What help or questions do you have specifically with your approach that we can help with? If you want someone to write for you, there is a JOBS section of the forum. You may be able to use an off the shelf product:

Auto Dialer | Asterisk Dialer | AsterCTI (techextension.com)

Asterisk Predictive Dialer | WombatDialer

@QM2021 frequents the forum and would probably be able to answer questions regarding if their solution meets your needs.

Asterisk cmd Dial - VoIP-Info
Asterisk Call Files - Asterisk Project - Asterisk Project Wiki
How the Asterisk cmr Read variables work - VoIP-Info
Asterisk cmd Wait Command - VoIP-Info

1 Like

I think I ended up figuring out how to get it to work for my needs.
Just a regular ARI request to /ari/channels with this body:

{
    "endpoint": "Local/123@from-internal",
    "extension": "5551234567",
    "context": "from-internal",
    "variables":{
        "CONNECTEDLINE(num)": "5551234567",
        "CONNECTEDLINE(name)": "CallerID to Show Agent"
    }
}

In this example, 123 would be the queue number. The only change I needed on the queue itself was to set Queue No Answer to Yes. Generally I wouldn’t want to do this for incoming calls, but since all of the answering parties will be our agents using Sangoma Phone, I won’t be worried about any of the early media limitations.

The last downside now is the Call Pop Up feature in Sangoma Phone only looks to work on calls that came in on an inbound route, I’ve tried testing a few of the variables that could make the softphone think it was inbound, but no luck yet. Luckily it does look like even though it won’t auto pop, you can click a button on the call in the softphone to force the URL to pop.

1 Like

I think it could work, though I’m not sure why you would do that for incoming calls - usually you do that for outbound, and that’s basically the “core” of a dialer. :grinning:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.