Dynamically transfer normal call to confBridge


#1

Hi,

I am trying to implement Call conferencing using AMI. This is my requirement.

  1. Caller-A calls call centre.
  2. Caller-B attends the call. (Used dial/queue application)
  3. Caller-B calls Caller-C
  4. Join Caller-A, Caller-B and Caller-C into conference, keeping Caller-B as the marked user.

I want to implement this using AMI. Tried “Originate” Action and “ConfBridge” application for that.
I was able to implement conference with Caller-B as the conference initiater/marked user and then add Caller-A and Caller-C as normal user.

Below given is the code i used.

//Caller-B initiate conference as marked user
$toSend = “Action: originate\r\n”;
$toSend .= “Channel: SIP/2001\r\n”;
$toSend .= “CallerId: ast\r\n”;
$toSend .= “Application: ConfBridge\r\n”;
$toSend .= “Data: 1234,ners_bridge,ners_marked_user,ners_marked_cntl\r\n”;
$toSend .= “Async: false\r\n\r\n”;
fputs($oSocket, $toSend);

//Add Caller-A to conference as normal user
echo "Enter number for Conference: ";
$inConfNum = trim(fgets(STDIN));
$callNum = “SIP/”.$inConfNum;
$toSend = “Action: originate\r\n”;
$toSend .= “Channel: $callNum\r\n”;
$toSend .= “CallerId: ast\r\n”;
$toSend .= “Application: ConfBridge\r\n”;
$toSend .= “Data: 1234,ners_bridge,ners_user,\r\n”;
$toSend .= “Async: false\r\n\r\n”;
fputs($oSocket, $toSend);

//Add Caller-C to conference as normal user
echo "Enter number for Conference: ";
$inConfNum = trim(fgets(STDIN));
$callNum = “SIP/”.$inConfNum;
$toSend = “Action: originate\r\n”;
$toSend .= “Channel: $callNum\r\n”;
$toSend .= “CallerId: ast\r\n”;
$toSend .= “Application: ConfBridge\r\n”;
$toSend .= “Data: 1234,ners_bridge,ners_user,\r\n”;
$toSend .= “Async: false\r\n\r\n”;
fputs($oSocket, $toSend);

But my requirement is, call should be initiated by the Caller-A and attended by Caller-B, without knowing that its going to be a conference call. Later Caller-B needs to initiate conference and join Caller-A and Caller-C, on requirement basis.

Query:

  1. Is it possible to convert a normal call (between Caller-A and Caller-B) to conference bridge dynamically and then call Caller-C to join the conference.
  2. If not possible please suggest me a way to do this.

#2

Without studying your current solution in detail, I would expect you to use the two channel version of redirect in any situation where you were putting the two sides of a call into a conference.

More generally, it is almost certain that any solution will involve running some dialplan, rather than directly running an application.


#3

Hi David,
Thanks for the reply. I will try with redirect.