Re: [Freeswitch-dev] OZ Question: zap_span_find()
correct, 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@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org pstn:213-799-1400 ----- Original Message ---- From: Michael Collins <mcollins@fcnetwork.com> To: freeswitch-dev@lists.freeswitch.org Sent: Thursday, March 6, 2008 8:27:35 PM Subject: [Freeswitch-dev] OZ Question: zap_span_find() <!-- /* 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;} _filtered {margin:1.0in 1.25in 1.0in 1.25in;} div.Section1 {} --> 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? Thanks, MC -----Inline Attachment Follows----- _______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
Tony, 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 message... 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 utility. Thanks, MC ________________________________ From: freeswitch-dev-bounces@lists.freeswitch.org [mailto:freeswitch-dev-bounces@lists.freeswitch.org] On Behalf Of Anthony Minessale Sent: Friday, March 07, 2008 6:07 AM To: freeswitch-dev@lists.freeswitch.org Subject: Re: [Freeswitch-dev] OZ Question: zap_span_find() correct, 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@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org pstn:213-799-1400 ----- Original Message ---- From: Michael Collins <mcollins@fcnetwork.com> To: freeswitch-dev@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? Thanks, MC -----Inline Attachment Follows----- _______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org ________________________________ Looking for last minute shopping deals? Find them fast with Yahoo! Search. <http://us.rd.yahoo.com/evt=51734/*http:/tools.search.yahoo.com/newsearc h/category.php?category=shopping>
participants (2)
-
Anthony Minessale
-
Michael Collins