<html><head><style type="text/css"><!-- DIV {margin:0px} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV></DIV>
<DIV>Essentially the session is the high level entity that represents an outside connection and the channel is an </DIV>
<DIV>object inside the session that is a collection of the higher level components of the call.</DIV>
<DIV> </DIV>
<DIV>see <A href="http://www.freeswitch.org/docs/structswitch__core__session.html">http://www.freeswitch.org/docs/structswitch__core__session.html</A></DIV>
<DIV> </DIV>
<DIV>At this point channel is just a struct inside session that shows you things you are allowed to safely play with.</DIV>
<DIV> </DIV>
<DIV>Think of it like C++ as if channel is a class based on session as a base class.</DIV>
<DIV> </DIV>
<DIV>The switch_channel.c api has no idea what a session is and the core_session api has no idea what a channel is they</DIV>
<DIV>only know they have an opaque pointer to each other to use api calls on when the time comes.</DIV>
<DIV> </DIV>
<DIV>The session contains all the low level things like access to memory pools and the I/O routines where the channel</DIV>
<DIV>has things like channel variables and is the main entitiy that travels in the state machine and passes messages and dtmf around.</DIV>
<DIV> </DIV>
<DIV>So the short answer is that it's purely asthetic for the sake of a clean API.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><BR> </DIV>Anthony Minessale II<BR><BR>FreeSWITCH http://www.freeswitch.org/<BR>ClueCon http://www.cluecon.com/<BR><BR>AIM: anthm<BR>MSN:anthony_minessale@hotmail.com<BR>JABBER:anthony.minessale@gmail.com<BR><BR>FreeSWITCH Developer Conference<BR>sip:888@66.250.68.194<BR>iax:guest@66.250.68.194/888<BR>googletalk:freeswitch@gmail.com<BR>pstn:712-432-7800
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><BR><BR>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR>From: will <will@camangi.com><BR>To: freeswitch-users@lists.freeswitch.org<BR>Sent: Wednesday, August 30, 2006 3:35:07 AM<BR>Subject: [Freeswitch-users] What's differents with "session" and "channel"?<BR><BR>
<STYLE>
<!--
_filtered {font-family:PMingLiU;
panose-1:2 2 3 0 0 0 0 0 0 0;}
_filtered {font-family:PMingLiU;
panose-1:2 2 3 0 0 0 0 0 0 0;}
_filtered {font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
text-decoration:underline;}
span.EmailStyle17
        {
font-family:Arial;
color:windowtext;}
_filtered {
margin:72.0pt 90.0pt 72.0pt 90.0pt;
}
div.Section1
        {}
-->
</STYLE>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Verdana size=1><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">I am confused “session” with “channel” in FreeSwitch.</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Verdana size=1><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">A channel is a connection which brings in a call to the FreeSwitch.</SPAN></FONT><FONT face=Verdana size=1><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana"> </SPAN></FONT></P>
<P class=MsoNormal><FONT face=Verdana size=1><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">Once a call is established, it is named “session”. </SPAN></FONT></P>
<P class=MsoNormal><FONT face=Verdana size=1><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">So multi session could exist in one channel, am I right? </SPAN></FONT></P>
<P class=MsoNormal><FONT face=Verdana size=1><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana"> </SPAN></FONT></P>
<P class=MsoNormal><FONT face=Verdana size=1><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">Will</SPAN></FONT></P></DIV>
<DIV>_______________________________________________<BR>Freeswitch-users mailing list<BR>Freeswitch-users@lists.freeswitch.org<BR><A href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target=_blank>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</A><BR>UNSUBSCRIBE:<A href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target=_blank>http://lists.freeswitch.org/mailman/options/freeswitch-users</A><BR><A href="http://www.freeswitch.org/" target=_blank>http://www.freeswitch.org</A></DIV></DIV><BR></DIV></div></body></html>