[asterisk-users] how to join 2 channels using AGI/AMI

John Kiniston johnkiniston at gmail.com
Thu Jun 30 14:50:41 CDT 2016

I think a simpler way to do this would be to define an member in your
queues.conf that points to a local channel that calls the remote users cell

You can use the M option in your dial to run a macro to prompt the user to
accept the call.

Here's my connector macro, I call it with:


exten => s,1,NoOP()
 same =>   n(TOP),Read(RESPONSE,beep&accept-reject,1,s,3,5); 3 tries with 5
seconds to respond each time
 same =>   n,GotoIf($[${LEN(${RESPONSE})} = 0]?REJECT,1)        ;If we
didn't get a response try and fail gracefully
 same =>   n,GotoIf($["${RESPONSE}" = "1"]?ACCEPT,1)            ;Take the
 same =>   n,GotoIf($["${RESPONSE}" = "2"]?REJECT,1)            ;Reject the
 same =>   n,Goto(s,TOP)

exten => ACCEPT,1,NoOP()                                        ;Just
connect the caller and callee
 same =>   n,Playback(pls-wait-connect-call)
 same =>   n,MacroExit()                                        ;Return

exten => REJECT,1,NoOP()
 same =>   n,Playback(beep&cancelled&goodbye)
 same =>   n,Set(MACRO_RESULT=BUSY)                        ;Reject the call
 same =>   n,Hangup()
 same =>   n,MacroExit()                                        ;Return

On Thu, Jun 30, 2016 at 6:08 AM, nik600 <nik600 at gmail.com> wrote:

> Dear all
> i'm using an "old"  Asterisk, and want to know if is
> possible to configure a scenario like this:
> 1) receive a call and put it on-hold in a queue (OK)
> 2) monitor the queue and trigger an outbound call to a remote number using
> AMI, setting the channel of the on-hold on a specific var named
> channel2Link (OK)
> 3) when the remote number answer, trigger an AGI/diaplan script that ask
> to accept the call pressing a specific key (OK)
> 4) if right key is pressed redirect the current call to the channel2Link,
> connecting the call in queue with the remote number (?)
> Step 1,2,3 works properly but i'm not able to link the two channels, even
> using redirect,goto or pickupChan.
> Any idea or help will be appreciated!
> Thanks
> --
> /*************/
> nik600
> http://www.kumbe.it
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>                http://www.asterisk.org/hello
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users

A human being should be able to change a diaper, plan an invasion, butcher
a hog, conn a ship, design a building, write a sonnet, balance accounts,
build a wall, set a bone, comfort the dying, take orders, give orders,
cooperate, act alone, solve equations, analyze a new problem, pitch manure,
program a computer, cook a tasty meal, fight efficiently, die gallantly.
Specialization is for insects.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20160630/101f12bc/attachment.html>

More information about the asterisk-users mailing list