<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2873" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I was trying to understand the chan_zap/chan_dahdi
code.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I have a few doubts, listed below:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>What is the concept of using sub-channels
(SUB_REAL/SUB_CALLWAIT/SUB_THREEWAY): Well I understand each of these
sub-channels when allocated would have a corresponding owner ast_channel
(generic to rest of Asterisk).</FONT></DIV>
<DIV><FONT face=Arial size=2>I also understand </FONT></DIV>
<DIV><FONT face=Arial size=2>SUB_REAL -> ast_channel currently interacting
with the phy channel.</FONT></DIV>
<DIV><FONT face=Arial size=2>SUB_CALLWAIT -> ast_channel waiting on the phy.
channel to be available.</FONT></DIV>
<DIV>
<DIV><FONT face=Arial size=2>SUB_THREEWAY -> ast_channel held on MOH (during
transfers etc...).</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>What I do-not understand is why do these
sub-channels need a "fd" to "/dev/zap/pseudo", well one reason could be to aid
conferencing but when I see instances like the one below (sending RBT to a
pseudo-channel) it doesn't appear that pseudo channels are merely for
conferencing:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><FONT color=#008000 size=2>
<P>/* Make ring-back */</P></FONT><FONT size=2>
<P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2>
(tone_zone_play_tone(p->subs[SUB_CALLWAIT].zfd, ZT_TONE_RINGTONE))</P>
<P>ast_log(LOG_WARNING, "Unable to generate call-wait ring-back on channel
%s\n", ast->name);</P>
<P> </P>
<P>above are lines from zt_call - chan_zap (Asterisk 1.4.18).</P>
<P>Could someone plz. help me understand the concept of pseudo
(sub-)channel.</P></FONT></FONT></DIV></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Regds.</FONT></DIV>
<DIV><FONT face=Arial size=2>John</FONT></DIV></BODY></HTML>