This document was generated from CDN thread
Created by: Syed Husain WMA on 08-12-2009 02:52:12 AM
Hi,
I've found that my custom application works (2-way audio, able to call) only if the cisco softphone runs in the background.
Any idea on this?
My hunch is there's something wrong in my initialization and open line part.
Here's my code.
lRet = lineInitializeEx (
&hLineApp,
NULL,
NULL,
"TAPI",
&dwNumDevs,
&dwAPIVersion,
&lineInitializeExParams);
dwMediaMode = LINEMEDIAMODE_INTERACTIVEVOICE | LINEMEDIAMODE_AUTOMATEDVOICE;
lRet = lineOpen(hLineApp,dwDeviceID,&hLine,dwAPIVersion,0x00000000,1,LINECALLPRIVILEGE_OWNER | LINECALLPRIVILEGE_MONITOR,dwMediaMode,NULL);
Is there something must be done after lineOpen?
Thanks in advance.
Subject: RE: Custom application works ONLY if cisco softphone is running
Replied by: David Staudt on 08-12-2009 09:11:44 PM
Can you elaborate more on what you are trying to accomplish? It sounds like your are using TAPI to automate the softphone in 3rd party call-control mode, in which case the IPC implementation handles all the actuall call signaling with UCM, as well as windows media functions to get audio going.
If IPC is not running, and your app tries to control it, nothing is going to happen. If you are trying to build a softphone-type application based on a CTI port, then you will need to handle the windows media functionality in your own custom code: the Cisco TSP will get you as far as telling you what RTP codec/IP/port to use - you will need to handle all the code that grabs windows media output, converts it to the right codec, and ships it out to the target IP/port. Windows media programming is beyond the scope of this forum.
Of help may be the Cisco TSP wave driver, which is a virtual audio device that handles UDP transport for you, and is accessible via windows MMIO APIs - see the Developer Guide for more details. There is also a small sample app available on the Documentation page that shows how to use this feature for media playback/record functionality. Again, if building softphone-like functionality, you will still need to write significant code to read/write from the PC's audio devices, and ship the audio buffers to/from the Cisco wave driver in real-time.
Subject: RE: Custom application works ONLY if cisco softphone is running
Replied by: Syed Husain WMA on 16-12-2009 02:43:57 AM
David,
Thanks for the reply.
Yes, I'm building an application which have softphone functionality. It's a 1st party call-control mode, because i'm using the wave driver for the media termination.
Does this mean that i have to use the LINE_DEVSPECIFIC > SLDSMT_START_TRANSMISION & SLDSMT_START_RECEPTION ? I've tried it before, and able to capture the event. The problem is I can't find a way to continue from there. From what you have suggested, I must manipulate the data that i've received from SLDSMT_START_TRANSMISION/SLDSMT_START_RECEPTION to terminate the audio, am i right?
Subject: RE: Custom application works ONLY if cisco softphone is running
Replied by: David Staudt on 16-12-2009 04:21:38 PM
I think you are getting close to the right concepts. Once you receive the RTP start reception event, your app can start using the window mmio API to poll for available data buffers from the TSP wave driver as audio comes in from the far end. Once you start receive buffers full of wave audio data, your app needs to do something with it: store it raw to disk, convert/compress it and store it to disk, stream it across the net, play it out over a windows sound device (speaker/headset,) etc. Analogously, the same type of operations should occur for RTP start transmission: obtain wave data from somewhere (a disk file, an internet stream, a windows sound device, etc.) and start using the mmio APIs to send data buffers to the wave driver.