[Asterisk-Dev] app_meetme and Zaptel API

Tony Mountifield tony at softins.clara.co.uk
Thu May 13 05:09:06 MST 2004


I need to make some enhancements to app_meetme.c. I've been studying it
and mostly understand now. I have a few questions about the Zaptel API.

As I understand it, all calls that are currently participating in a
conference share the same instance of struct ast_conference, and the fd
element is an fd to which uLaw audio may be written that will then be
heard by all participants. The function conf_play() does this for the
Enter and Leave sounds.

Also, each channel has its own fd to which data for just that
participant could be written. This is normally done using
ast_streamfile(chan,...), although I don't know if that can only be done
while the channel is not part of a conference.

It also appears that if the channel is a Zap channel it can get put in
the conference directly, but if it is a non-zap channel, then a pseudo
channel must be created on its behalf and joined to the conference, and
then conf_run() for(;;) loop has to pass the data back and forth between
the real channel and the pseudo channel.

Now to my questions:

- If I want to play an announcement to all participants (e.g. "This
  conference expires in N minutes"), can I just send it somehow to
  conf->fd ? I suspect not, as it needs raw uLaw data. I imagine there
  must be also be a limit to the amount that can be written without
  blocking.

- Is there an equivalent to ast_streamfile(chan) I could use? I can see
  the problem of then calling ast_waitstream(chan) would stall the main
  loop. Is ast_waitstream() need for tidying up, or just to know when
  the streaming file is finished?

- Do I need to open a new /dev/zap/pseudo and join it to the conference
  and then stream the announcement to it instead?

I'd be very grateful if anyone can correct my understanding and/or
suggest answers to my questions.

Tony

-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org



More information about the asterisk-dev mailing list