You may be able to use the Asterisk Manager interface to watch the channels. When C calls in, Asterisk could hangup on B and transfer to C. Some mixture of AGI or the normal Dialplan (for after B is droped) and the Manager (for handling control while in a call) should work. And mix everything together with a database somewhere so the manager and the dialplan/AGI can exchange state information.
<br><br>
<div><span class="gmail_quote">On 8/8/07, <b class="gmail_sendername">Dung, Nguyen Anh</b> <<a href="mailto:nadung@tma.com.vn">nadung@tma.com.vn</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Hi All,</span></font></p>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">I'm diving into Asterisk source code to find the way to implement a feature as described in the scenario below:</span>
</font></p>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> 1. A and B are on phone</span></font></p>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> 2. Asterisk calls C</span></font></p>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> 3. C answers and is able to get the RTP stream</span></font></p>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> 4. Asterisk connects A to C, drop B.</span></font></p>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> 5. A and C are on phone, the call duration of A is unchanged.</span></font></p>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">However, I have some questions:</span></font></p>
<p style="MARGIN-LEFT: 0.75in; TEXT-INDENT: -0.25in"><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><span>1.<font face="Times New Roman" size="1"><span> </span>
</font></span></span></font><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Does Asterisk have any feature like this before? As far as I know, the closest feature is unattended transfer, but it still puts one side (B in this case) on hold.
</span></font></p>
<p style="MARGIN-LEFT: 0.75in; TEXT-INDENT: -0.25in"><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><span>2.<font face="Times New Roman" size="1"><span> </span>
</font></span></span></font><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">I tried to use ast_bridge_call() to bridge A to C in the scenario above, but I got a warning message from
channel.c informed that they are already bridged so that the bridging failed. Is there any suggestion for doing this?</span></font></p>
<p style="MARGIN-LEFT: 0.75in; TEXT-INDENT: -0.25in"><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><span>3.<font face="Times New Roman" size="1"><span> </span>
</font></span></span></font><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Is conference code suitable for implementation of this feature? As I know, when using conference call, we must dial to conference number (and then Asterisk leads us to an available MeetMe room), it's not a call through. The only good idea from conference call is it let us drop a channel without having any impact on the existing call.
</span></font></p>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> </span></font></p>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Thanks in advance.</span></font></p>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Dung, Nguyen Anh.</span></font></p></div></div><br>_______________________________________________<br>--Bandwidth and Colocation Provided by
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.api-digital.com--/" target="_blank">http://www.api-digital.com--</a><br><br>asterisk-dev mailing list<br>To UNSUBSCRIBE or update options visit:<br>
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br></blockquote></div><br>
<br clear="all"><br>-- <br>/Nick