Hello,

Sorry for long delay, I'm only recently back from a long New Year
vacation. :)

On Wed, Jan 7, 2009 at 4:32 PM, Mert Kır <[email protected]> wrote:
> We are developing an IVR solution and using sipxTapi. We have a problem
> while implementing some part of it. We want to get audio stream of the
> speaker and use it. Current version of sipxTapi provides
> sipxConfigSetSpkrAudioHook function for this purpose.
> sipxConfigSetSpkrAudioHook  function takes fnSpkrAudioHook typedef as a
> parameter.
>
> typedef void(*)               fnSpkrAudioHook (const int nSamples, short
> *pSamples)
>
> This typedef is a function pointer so we can use it as a observer function.
> However since fnSpkrAudioHook does not have any "call handle"
> information(SIPX_CALL) as parameter, it causes some problem.  When there is
> call on multiple lines there is no chance to differentiate which call is
> sending the buffer. We need to know which channel is sending the buffer.
> fnSpkrAudioHook provides only number of samples information and a pointer to
> the samples. We don't have any info about which call is sending this buffer
> so we couldn't apply any call-specific operations.

This function should be removed or marked as very much not recommended
to use actually. :) If you describe what do you want to do with this buffers,
I'll be able to tell you the best way yo implement what you want. Generic
solution is following...

> Could you give some clue to solve this problem? Is there any way to get the
> call-specific buffer?

Basically, you can't get call-specific audio data with this hook for following
reasons:
1) It is hooked right before an output device. At any point of time you can
have only one call active and forwarded to the output device, i.e. only
one call may be "in focus". So you're not able to get data for calls out
of focus.
2) It is hooked into old version of our audio I/O system (so called dmaTask).
With recent version of sipXtapi it is highly recommended to use
so called "Topology flowgraph" and new audio I/O system. In main branch
topology is enabled by default in most of Windows builds.
3) I guess you don't actually need audio output, as IVR should be a server
application.

Taking this, if you need to do something with audio, you need to do this
in sipXmediaLib. You need to create a processing resource which will
do what you need and chain it into generic processing graph. If you better
describe what you want, I help you understand where to look and what
to change.

--
Regards,
Alexander Chemeris.

SIPez LLC.
SIP VoIP, IM and Presence Consulting
http://www.SIPez.com
tel: +1 (617) 273-4000
_______________________________________________
sipxtapi-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/

Reply via email to