Author |
|
ian_auger Intermediate
Joined: March 09 2011 Location: United Kingdom Posts: 4
|
Posted: March 17 2011 at 2:55pm | IP Logged
|
|
|
I am looking to develop an application where multiple users dialin and listen to a live audio source. is the best way to do this by running multiple instances of the engine, each with a different audio input, or is there a clever way to route different audio sources to different conference sessions within the same instance?
|
Back to Top |
|
|
support Administrator
Joined: January 26 2005 Location: United States Posts: 1666
|
Posted: March 19 2011 at 12:54pm | IP Logged
|
|
|
Ian,
Can I will assume your VOIP application will have access to the samples of the “live audio source”?
If yes, the simplest way to allow callers to listen to the same audio source is to:
1)
Instantiate a single LME with the max number of lines you will require.
2)
When calls arrive, tell the LME to answer the call (GoOffHook()).
3)
Once the call is answered, start writing 20Ms sample blocks of audio from your audio source out to the LME phone line using the phone line’s Tx Ivr output (TransmitInCallIvrData()).
Using the above method will be very lightweight on your server host machine while not incurring the additional CPU cycles needed by enabling the conferencing capability. The only need to use conferencing capability is if callers need to hear each other’s full duplex voice at the same time in real time.
Because the LME if pretty flexible, there may be other ways to do this. It depends on the source of your audio and how much app coding you can and want to do.
Not sure if you are using native or managed code (C/C++ or C#) but the LME sample code may help you. There is a C++ “Dual Line IVR Server” sample that shows how to write sample blocks to a phone line once an incoming call is answered.
Randal
|
Back to Top |
|
|
ian_auger Intermediate
Joined: March 09 2011 Location: United Kingdom Posts: 4
|
Posted: March 21 2011 at 8:50am | IP Logged
|
|
|
thanks - i was hoping to use c# to do this. do any of your examples show to how do this?
|
Back to Top |
|
|
support Administrator
Joined: January 26 2005 Location: United States Posts: 1666
|
Posted: March 21 2011 at 9:25am | IP Logged
|
|
|
Ian,
The C# CallDialer sample app can show you how to stream sample block data to a phone line. Though not exactly like your eventual app, the CallDialer initiates an outgoing phone call and once the call is connected (the SipInCall state), sample blocks from a wave file are played out the phone lines.
The important part of the sample app is the StreamAudioToPhoneLine() proc in the CallDialerForm.cs module. Forget comments about the call being on hold. The app takes the call that is in the SipInCall state and streams wave file data to the far end.
If you pluck out the above code from the sample, you basically have to update it to playback sample blocks from your audio source instead of the stock wave file.
Randal
|
Back to Top |
|
|