<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:courier,monaco,monospace,sans-serif;font-size:12pt">see inline comments.<br><br><div> </div><div>Anthony Minessale II<br><br><span>FreeSWITCH <a target="_blank" href="http://www.freeswitch.org/">http://www.freeswitch.org/</a></span><br><span>ClueCon <a target="_blank" href="http://www.cluecon.com/">http://www.cluecon.com/</a></span><br><br>AIM: anthm<br>MSN:anthony_minessale@hotmail.com<br>GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<br>IRC: irc.freenode.net #freeswitch</div><div><br>FreeSWITCH Developer Conference<br>sip:888@conference.freeswitch.org<br>iax:guest@conference.freeswitch.org/888<br>googletalk:conf+888@conference.freeswitch.org<br>pstn:213-799-1400</div><div style="font-family: courier,monaco,monospace,sans-serif; font-size: 12pt;"><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">-----
Original Message ----<br>From: Michael Collins <mcollins@fcnetwork.com><br>To: freeswitch-dev@lists.freeswitch.org<br>Sent: Tuesday, February 5, 2008 6:34:50 PM<br>Subject: Re: [Freeswitch-dev] TDM questions: OZ, signaling on digital spans<br><br>
<style>
<!--
_filtered {font-family:Wingdings;panose-1:5 0 0 0 0 0 0 0 0 0;}
_filtered {margin:1.0in 1.25in 1.0in 1.25in;}
_filtered {font-family:Courier;panose-1:2 7 4 9 2 2 5 2 4 4;}
_filtered {font-family:Wingdings;panose-1:5 0 0 0 0 0 0 0 0 0;}
_filtered {font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;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;}
span.EmailStyle18
        {font-family:Arial;color:navy;}
_filtered {margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {}
-->
</style>
<div class="Section1">
<div style="border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color blue; border-width: medium medium medium 1.5pt; padding: 0in 0in 0in 4pt;">
<div>
<div class="MsoNormal" style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">
<hr tabindex="-1" align="center" size="2" width="100%">
</span></font></div>
<p class="MsoNormal"><b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">From:</span></font></b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;"> freeswitch-dev-bounces@lists.freeswitch.org
[mailto:freeswitch-dev-bounces@lists.freeswitch.org] <b><span style="font-weight: bold;">On Behalf Of </span></b>Anthony Minessale<br>
<b><span style="font-weight: bold;">Sent:</span></b> Tuesday, February 05, 2008
6:19 AM<br>
<b><span style="font-weight: bold;">To:</span></b>
freeswitch-dev@lists.freeswitch.org<br>
<b><span style="font-weight: bold;">Subject:</span></b> Re: [Freeswitch-dev] TDM
questions: OZ, signaling on digital spans</span></font></p>
</div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
<div>
<p class="MsoNormal" style="margin-bottom: 12pt;"><font face="Courier" size="3"><span style="font-size: 12pt; font-family: Courier;">It's a trickle-up methodology.<br>
<br>
The low level driver interprets the voltage change<br>
or the bits flipping or whatever and turns it into<br>
driver specific events which in turn are changed<br>
into openzap specific events by the zap_<whatver>.c<br>
zap_zt.c, zap_pika.c etc. when you apply a signaling<br>
to a span in the mod_openzap config the signal specific<br>
module will monitor the span for these events and decide<br>
what they mean in reference to whatever signaling type<br>
it represents.<br>
<br>
<font color="navy"><span style="color: navy;"></span></font></span></font></p>
<p class="MsoNormal" style="margin-bottom: 12pt;"><font color="blue" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: blue;"> Okay,
so the driver-specific events get captured and translated… Makes sense. Curious:
does this all happen at OSI layer 2?</span></font></p>
<p class="MsoNormal" style="margin-bottom: 12pt;"><span style="color: rgb(255, 0, 0);">I don't know exactly how it works.<br></span></p><p class="MsoNormal" style="margin-bottom: 12pt;"><font face="Courier" size="3"><span style="font-size: 12pt; font-family: Courier;">
so<br>
<br>
voltage changes on zaptel card<br>
<br>
zaptel specific ring event is caught by zap_zt.c<br>
<br>
openzap ring event is queued on the channel and<br>
event data flag is set on the span.<br>
<br>
zap_analog.c sees the event data flag and gets the <br>
ring event on the channel<br>
<br>
ring event is sent up to mod_openzap who starts a channel<br>
in freeswitch.<br>
<br>
<br>
so implementing another sig type like e&m just requires<br>
zap_em.c and proper interpretation of the bit shifting <br>
events. I belive zaptel drivers and pika <br>
can do it but I don't know if the native sangoma can yet.<br>
<br>
</span></font><font color="blue" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: blue;">I think I get it. Next question: on a
digital span that is set up in the <analog spans> section of
openzap.conf.xml – does zap_analog.c do the signal translation even
though the span is technically digital? It almost sounds like
zap_analog.c is agnostic to the analog/digital nature of the span simply
because it’s receiving events from the driver via openzap… Last
question: if zap_analog.c is handling the translation of FXO/FXS signaling then
couldn’t we almost just copy zap_analog.c to zap_em.c and then redefine
the bit patterns that represent on-hook, ringing, hangup, etc.? Or am I oversimplifying
again? ;)</span></font></p><p class="MsoNormal" style="margin-bottom: 12pt;"><span style="color: rgb(255, 0, 0);">Yes that is more or less correct. In fact once you took out all the analog state machine etc from zap_analog.c</span></p><p class="MsoNormal" style="margin-bottom: 12pt;"><span style="color: rgb(255, 0, 0);">zap_em.c will be rather tiny just starting calls when it gets off hook and ending them when it gets onhook.</span><br><font color="blue" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: blue;"></span></font></p><p class="MsoNormal" style="margin-bottom: 12pt;"><font color="blue" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: blue;"><br></span></font></p>
<p class="MsoNormal" style="margin-bottom: 12pt;"><font color="blue" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: blue;">Thanks
for the explanation – I will distill this thread into it’s
components and add it to the wiki when we’re done.</span></font></p>
<p class="MsoNormal" style="margin-bottom: 12pt;"><font color="blue" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: blue;">-MC</span></font></p>
<p class="MsoNormal" style="margin-bottom: 12pt;"><font color="blue" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: blue;">P.S. –
the zaptel drivers do support E&M, E&M wink, etc. I’ve used
E&M with the orange splat and connected to my NEC PBX with the exact same
tor2 and trunk-side T1 card. </span></font></p>
<div>
<p class="MsoNormal"><font face="Courier" size="3"><span style="font-size: 12pt; font-family: Courier;"> </span></font></p>
</div>
<div>
<p class="MsoNormal"><font face="Courier" size="3"><span style="font-size: 12pt; font-family: Courier;">Anthony Minessale II<br>
<br>
FreeSWITCH <a rel="nofollow" target="_blank" href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>
ClueCon <a rel="nofollow" target="_blank" href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
<br>
AIM: anthm<br>
MSN:anthony_minessale@hotmail.com<br>
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<br>
IRC: <a target="_blank" href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch</span></font></p>
</div>
<div>
<p class="MsoNormal"><font face="Courier" size="3"><span style="font-size: 12pt; font-family: Courier;"><br>
FreeSWITCH Developer Conference<br>
sip:888@conference.freeswitch.org<br>
iax:guest@conference.freeswitch.org/888<br>
googletalk:conf+888@conference.freeswitch.org<br>
pstn:213-799-1400</span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom: 12pt;"><font face="Courier" size="3"><span style="font-size: 12pt; font-family: Courier;"> </span></font></p>
<div>
<p class="MsoNormal" style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">----- Original Message
----<br>
From: Michael Collins <mcollins@fcnetwork.com><br>
To: freeswitch-dev@lists.freeswitch.org<br>
Sent: Tuesday, February 5, 2008 1:39:13 AM<br>
Subject: [Freeswitch-dev] TDM questions: OZ, signaling on digital spans</span></font></p>
<div>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Guys,</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">You better run for cover because Mikey has been reading
technical books again and now he has questions! </span></font><font face="Wingdings" size="2"><span style="font-size: 10pt; font-family: Wingdings;">J</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">First, I was reading in Matthew Gast’s <i><span style="font-style: italic;">T1 – A Survival Guide</span></i> about
channelized T1’s and channel associated signaling. Just to make
sure I am understanding it correctly – CAS and robbed bit essentially
refer to the same thing on a channelized T1 don’t they? The bits
that are robbed include the signaling bits – AB or ABCD depending on
whether you have SF or ESF. Please confirm if I am understanding this
correctly.</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Second, aren’t FXO and FXS signaling on a digital
channel really just a matter of interpreting the meanings of the A and B bits
being high or low? Obviously there isn’t an actual loop start or
ground start on a digital channel, but rather just a nomenclature for deciding
that a particular combination of A and B bits being high and/or low has a meaning,
like A high + B low means on-hook in one signaling type but could mean ringing
in another signaling type. Again, correct me if I’m wrong…</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Third, if FXO/FXS signaling is just a matter of manipulating
the AB bits in CAS, then shouldn’t it be relatively easy to add E&M
signaling since that is essentially just another set of meanings for each AB
bit pattern? Or am I oversimplifying it?</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Last question – how does OZ, in zap_zt.c, determine
the signal start type? (E.g. see code starting at line 87.) AFAIK
it is not set in openzap.conf.xml nor in openzap.conf. Does it get that
info from the zaptel driver? I know the start type is set in zaptel.conf,
I just didn’t know if the OZ was smart enough to figure out the start
type without requiring the user to specify it in a conf file.</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Thanks for letting me ask all these questions!
I’ll do my best to update the wiki as appropriate as I get the
answers…</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">-MC</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
</div>
<div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
<br>
-----Inline Attachment Follows-----<br>
<br>
_______________________________________________<br>
Freeswitch-dev mailing list<br>
<a rel="nofollow" ymailto="mailto:Freeswitch-dev@lists.freeswitch.org" target="_blank" href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br>
<a rel="nofollow" target="_blank" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a rel="nofollow" target="_blank" href="http://lists.freeswitch.org/mailman/options/freeswitch-dev">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a rel="nofollow" target="_blank" href="http://www.freeswitch.org">http://www.freeswitch.org</a></span></font></p>
</div>
</div>
<p class="MsoNormal"><font face="Courier" size="3"><span style="font-size: 12pt; font-family: Courier;"> </span></font></p>
</div>
</div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
<div class="MsoNormal" style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">
<hr align="center" size="1" width="100%">
</span></font></div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">Be a better friend, newshound, and know-it-all with Yahoo! Mobile. <a rel="nofollow" target="_blank" href="http://us.rd.yahoo.com/evt=51733/*http:/mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ%20">Try
it now.</a></span></font></p>
</div>
</div>
<!-- kill --><div><br><br>-----Inline Attachment Follows-----<br><br>_______________________________________________<br>Freeswitch-dev
mailing
list<br><a ymailto="mailto:Freeswitch-dev@lists.freeswitch.org" href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br></div></div><br></div></div><br>
<hr size=1>Never miss a thing. <a href="http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs"> Make Yahoo your homepage.</a>
</body></html>