[Freeswitch-dev] OZ Question: zap_span_find()

Michael Collins mcollins at fcnetwork.com
Fri Mar 7 10:59:46 EST 2008



Yep, that was a typo.  Thanks for the explanation.  I'm working on an
openzap API command.  My thought process is going something like this:

Create an openzap command, using the sofia command as a basic template.
(I have the stub functional in my working copy...)

One option is "openzap span x" where x = the span number to view.
(Think analogous to, but better than, *'s "pri show span" command)

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

If I get a pointer then I start dumping span info, else print an error


Let me know if that seems like a reasonable place to start.  Ultimately
I'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.  When I know
my 'openzap span x' command is working then I'll move on to the ISDN
layer; I'll also investigate dumping information specific to analog
spans and even the boost/SS7 spans if you think that would be a useful






From: freeswitch-dev-bounces at lists.freeswitch.org
[mailto:freeswitch-dev-bounces at lists.freeswitch.org] On Behalf Of
Anthony Minessale
Sent: Friday, March 07, 2008 6:07 AM
To: freeswitch-dev at lists.freeswitch.org
Subject: Re: [Freeswitch-dev] OZ Question: zap_span_find()


Assuming the typo in the example was an accident.
(span not my_span_pointer declared on the first line)

zap_span_t *my_span_pointer = NULL;

uint32_t span_id = 1;

zap_status_t result;


result = zap_span_find(span_id, &my_span_pointer);

if it returns ZAP_SUCCESS, that indicates that the desired span exists,
is in use and that the pointer will now point to it.


Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_minessale at hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org
iax:guest at conference.freeswitch.org/888
googletalk:conf+888 at conference.freeswitch.org


----- Original Message ----
From: Michael Collins <mcollins at fcnetwork.com>
To: freeswitch-dev at lists.freeswitch.org
Sent: Thursday, March 6, 2008 8:27:35 PM
Subject: [Freeswitch-dev] OZ Question: zap_span_find()

Does this function do what I think it does?  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?


Example, what happens if I do this, assuming span 1 is a real span?


zap_span_t *span = NULL;

uint32_t span_id = 1;

result = zap_span_find(span_id, &my_span_pointer);


Does *my_span_pointer now point to span 1?  Any caveats that I should be
aware of?




-----Inline Attachment Follows-----

Freeswitch-dev mailing list
Freeswitch-dev at lists.freeswitch.org




Looking for last minute shopping deals? Find them fast with Yahoo!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20080307/e72642dc/attachment-0001.html 

More information about the Freeswitch-dev mailing list