Conf Into A Call In Progress

Home » Asterisk Users » Conf Into A Call In Progress
Asterisk Users 6 Comments


Does anyone know if it’s possible to setup the following scenario?

1. A specific ext(let’s say 111) is on active call with an external number via SIP (let’s say 22334455).
2. Via a web GUI, send to Asterisk another phone number (22556677) and the ext number (111).
3. Asterisk initiates a call to that number (22556677) and joins it to the call in progress (between 111 and 22334455) in order to establish a 3-party conf call.

It’s somewhat similar to ChanSpy, but with full conf capabilities and not only whisper to one side.



6 thoughts on - Conf Into A Call In Progress

  • Hi Michael,

    I would use a combination of AMI & dialplan programming.

    Over AMI I would send both channels of the active call 111 – 22334455 to a context that joins them in a conference room. It is a matter of choice if it is better to create an ad hoc/ on the fly conference or use a set of predefined rooms.

    Next, again through AMI, I would originate the call to 22556677 and join it into the conference.

    You have to be aware that calling somebody and transferring the channel into a conference may leave the person on the other side of the wire WITHOUT means to exit the conference room and thus to close the call (I did it!!! embarrassing..).

    So one has to be sure (I am speaking of the old MeetMe app) that the “originator’s” channel enters the conference room as the conference master. So, when that channel closes, all other channels are dumped out of the conference room and the whole thing closes down.

    HTH, Aldo

  • Hi Aldo,

    Thank you very much for answering my question.

    Can you kindly elaborate on how to do the following or at least where to read about the way to do it?
    joins them in a conference room.


    Thank you very much,


  • Hi you can get some help using n-way dialplan example. Its generate new call and transfer current call in conference meetme. You can google to find its example

  • Hi Michael,


    I am sending you -by direct mail- a diagram that tries to illustrate what I would try to do.
    (I do not know if this list allows attachments; generally it’s not permitted…).

    AMI has a useful command for that task: Redirect, see here:

    and here:

    If you are manipulating a call not from one of the connected terminals (e.g. your phone) you have to take care of both channels. This is what the Redirect command does.

    It lets you specify what to do with both channels: they can be sent to the same context or each to one context by itself. Finally you are able to make changes on one channel only…

    So the plan would be to first send the two channels to a conference room (an ad hoc one), using a first redirect command. This is made to get the conf. room where the three way call will take place AND to be able to call the third party without losing the original call partner’s channel…

    A second Redirect command should detach the user’s channel from the conference and send it to a context that connects him/her to the third party, letting the original user offer the 3 way call.

    If the call is accepted, than a third redirect would send both channels to the conference room created at step 1, where the other party is waiting…

    The dynamic conference is closed either by the original call party hanging up his/her channel or with a direct AMI hangup command doing the same thing.

    Clearly this is logically equivalent to a manual transfer of the user’s call party into a conference room. Then calling the second call party and transfer him/her to the conference and seeing the user finally dialing him/herself into the conference.

    You can do that with AMI, provided you have some means to make some sort of UI for the whole process…

    You’re welcome: hth!


  • Gentlemen,

    So, from your answers I understand that I have 2 options:
    1. AMI “Redirect” command
    2. Asterisk command “ChannelRedirect”

    I’m inclined to prefer the 2nd option, as we’ve never used AMI, but I don’t know if it can be web-initiated.

    Basically, we have the following php code:
    < ?php if( $_POST["ext"] || $_POST["dest"] ) { echo "Selected extension: ". $_POST['ext'] . "
    echo “Destination Number: “. $_POST[‘dest’] . “
    // Enter the selected extension’s active call to a conference room

    // Establish a new call to the entered number

    // Connect the new call to the selected extension’s conference room

    // Put a disconnect/split button

    echo “connecting…


    Destination Number:

    To this code, we need to add the relevant functions to perform the tasks specified above, i.e. enter the active call to a conf room, establish the call to the new number and then, link them all together and give an option to quit the conference.

    What do you suggest?



  • If you’re unfamiliar with the AMI, I would strongly suggest becoming familiar with it. We use PHP with a socket connection to the asterisk AMI
    and it works fantastically. This is precisely the kind of thing the AMI was meant to do.