<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="place"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
_filtered {margin:1.0in 1.25in 1.0in 1.25in;}

 /* Font Definitions */
 @font-face
        {font-family:Courier;
        panose-1:2 7 4 9 2 2 5 2 4 4;}
@font-face
        {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
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Tony,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Yep, that was a typo. &nbsp;Thanks for the
explanation.&nbsp; I&#8217;m working on an openzap API command. &nbsp;My thought process
is going something like this:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Create an openzap command, using the <st1:City
w:st="on"><st1:place w:st="on">sofia</st1:place></st1:City> command as a basic
template. &nbsp;(I have the stub functional in my working copy&#8230;)<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>One option is &#8220;openzap span x&#8221;
where x = the span number to view. &nbsp;(Think analogous to, but better than, *&#8217;s
&#8220;pri show span&#8221; command)<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I take x, validate that it is an integer,
then plug it in to zap_span_find to see if I end up with a pointer to span x<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>If I get a pointer then I start dumping
span info, else print an error message&#8230;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Let me know if that seems like a
reasonable place to start.&nbsp; Ultimately I&#8217;m trying to help Jerris with the
ISDN stuff and it would be nice to have an API cmd that lets us view the state
machine info.&nbsp; When I know my &#8216;openzap span x&#8217; command is working
then I&#8217;ll move on to the ISDN layer; I&#8217;ll also investigate dumping
information specific to analog spans and even the boost/SS7 spans if you think
that would be a useful utility.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Thanks,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>MC<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;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> Friday, March 07, 2008 6:07
AM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">freeswitch-dev@lists.freeswitch.org</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [Freeswitch-dev] OZ
Question: zap_span_find()</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3 face=Courier><span
style='font-size:12.0pt;font-family:Courier'>correct,<br>
Assuming the typo in the example was an accident.<br>
(span not my_span_pointer declared on the first line)<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>zap_span_t
*my_span_pointer = NULL;</span></font><o:p></o:p></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>uint32_t
span_id = 1;</span></font><o:p></o:p></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>zap_status_t
result;</span></font><o:p></o:p></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><font
size=3 face="Times New Roman"><span style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>result
= zap_span_find(span_id, &amp;my_span_pointer);</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=3 face=Courier><span style='font-size:12.0pt;
font-family:Courier'><br>
<br>
if it returns ZAP_SUCCESS, that indicates that the desired span exists, is in
use and that the pointer will now point to it.<o:p></o:p></span></font></p>

<div>

<p class=MsoNormal><font size=3 face=Courier><span style='font-size:12.0pt;
font-family:Courier'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face=Courier><span style='font-size:12.0pt;
font-family:Courier'>Anthony Minessale II<br>
<br>
FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
ClueCon <a href="http://www.cluecon.com/" target="_blank">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: irc.freenode.net #freeswitch<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face=Courier><span style='font-size:12.0pt;
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<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3 face=Courier><span
style='font-size:12.0pt;font-family:Courier'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>----- Original Message
----<br>
From: <st1:PersonName w:st="on">Michael Collins</st1:PersonName>
&lt;mcollins@fcnetwork.com&gt;<br>
To: <st1:PersonName w:st="on">freeswitch-dev@lists.freeswitch.org</st1:PersonName><br>
Sent: Thursday, March 6, 2008 8:27:35 PM<br>
Subject: [Freeswitch-dev] OZ Question: zap_span_find()<o:p></o:p></span></font></p>

<div>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Does this function do what I think it does? &nbsp;If I give
it a span number to look for, it returns ZAP_SUCCESS if it finds the span and
it sets the value of the pointer variable that I call it with?</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Example, what happens if I do this, assuming span 1 is a
real span?</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>zap_span_t *span = NULL;</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>uint32_t span_id = 1;</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>result = zap_span_find(span_id,
&amp;my_span_pointer);</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Does *my_span_pointer now point to span 1?&nbsp; Any caveats
that I should be aware of?</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Thanks,</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>MC</span></font><o:p></o:p></p>

</div>

<!-- kill -->

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
<br>
-----Inline Attachment Follows-----<br>
<br>
_______________________________________________<br>
Freeswitch-dev mailing list<br>
<a href="mailto:Freeswitch-dev@lists.freeswitch.org"
ymailto="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><o:p></o:p></span></font></p>

</div>

</div>

<p class=MsoNormal><font size=3 face=Courier><span style='font-size:12.0pt;
font-family:Courier'><o:p>&nbsp;</o:p></span></font></p>

</div>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=1 width="100%" align=center>

</span></font></div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Looking for last minute shopping deals? <a
href="http://us.rd.yahoo.com/evt=51734/*http:/tools.search.yahoo.com/newsearch/category.php?category=shopping">Find
them fast with Yahoo! Search.</a><o:p></o:p></span></font></p>

</div>

</div>

</body>

</html>