I’m trying to blind transfer an incoming call from AGI to an extension so that the transferred call enters new AGI stream.
Exact behavior on SIP REFER from client side.
Incoming call → Dialplan → AGI → EXEC QUEUE → Agent answers → Agent does a REFER
Where I want to do the same without an agent involved
Incoming call → Dialplan → AGI → Transfer to new Extension → New extension AGI
Have tried following:
DIAL (will not accept extension)
EXEC BlindTransfer [extension] (seems like BlindTransfer tries to transfer callee and not caller)
EXEC Goto (seems like we have to manually exit entering AGI in order for Goto to execute)
Why is that a problem? All that Goto does is update the context, extension, and priority. The actual Goto, if done from the dialplan, doesn’t happen until the Goto application exits. AGI isn’t aware that Goto is special, so execution will only continue at the new location when AGI exits. It’s just really a combination of SET PRIORITY, SET EXTENSION and SET CONTEXT, which are explicitly documented as working in that way.
Immediately undermining AGI would require more complex processing, involving starting a new thread, on a copy of the channel.
I think GoTo isn’t your problem.
What you are requesting is some way to do queue logic without AppQueue and send call to next agent exten revealed by that logic.
You must create your own Queue logic or copy some existing sample that fits you needs and request next agent exten from that.
AppQueue don’t let you now next available agent without applying and recompiling source code.
I think Queue could just have easily (and internally much more simply) been Dial in the first scenario, and this is a about the transfer part of that scenario, not, not about Queue.