Author |
|
chav Intermediate
Joined: April 19 2005 Location: Canada Posts: 6
|
Posted: April 20 2005 at 12:42pm | IP Logged
|
|
|
thanks to your response,
so I put it in a more specific way:
What we want to do is to mute the microphone just like what the telephone users often do on their telephone sets. To Mute the microphone here means after a call has been set up(connected), when the user1 clicks on a certain button on the softphone, the user2 on the other side of the phoneline could not hear the voice from the user1, and the user1 can also release the Mute to let the user2 hear user1's voice again. I guess it fits your "Do you want to mute outgoing audio to phone lines when a call is active?" in your response.
And now that it seems the SDk also supports "Do you want to mute local audio playback?", we will appreciate it if you could also tell us how to do this one.
regards,
chev
|
Back to Top |
|
|
support Administrator
Joined: January 26 2005 Location: United States Posts: 1666
|
Posted: April 20 2005 at 2:59pm | IP Logged
|
|
|
Hi Chav,
We will be including more signal handling/procesing capabilities in upcoming releases of the VOIP Media Engine. For the version 5.10 Media Engine that you have, you will have to use 2 undocumented API procedures to implement dynamic "microphone mute" and "far end mute".
The following tech note will help you add this capability to your application. Right mouse click on the link below and select "Save Target As" when the IE menu pops up.
http://www.lanscapecorp.com/technotes/VoipMediaEngine510/TN2 730.txt
Best regards,
LanScape Support
|
Back to Top |
|
|
chav Intermediate
Joined: April 19 2005 Location: Canada Posts: 6
|
Posted: April 20 2005 at 7:04pm | IP Logged
|
|
|
thanks to the link to the file with the apis.
we exactly followed those steps described in the technical note file to integrate the Mute functionality. But when compiling, the following errors occured. it seems the linker could not find the concreate body of the api:SetAudioRecordCallback and SetPlaybackMixerCallback, are they in the same engine dll as the other apis such as HoldLine etc? we have spent quite some time to solve this error but no achivement..
I copied the errors below for your reference.
regards,
chav
===========================error message================
error LNK2001: unresolved external symbol "enum TELEPHONY_RETURN_VALUE __cdecl SetAudioRecordCallback(void *,enum AUDIO_BANDWIDTH,int (__cdecl*)(struct AUDIO_RECORD_DATA *),void *)" (?SetAudioRecordCallback@@YA?AW4TELEPHONY
_RETURN_VALUE@@PAXW4AUDIO_BANDWIDTH@@P6AHPAUAUDIO_RECORD_DAT A@@@Z0@Z)
error LNK2001: unresolved external symbol "enum TELEPHONY_RETURN_VALUE __cdecl SetPlaybackMixerCallback(void *,enum AUDIO_BANDWIDTH,int (__cdecl*)(struct PLAYBACK_MIXER_DATA *),void *)" (?SetPlaybackMixerCallback@@YA?AW4TEL
EPHONY_RETURN_VALUE@@PAXW4AUDIO_BANDWIDTH@@P6AHPAUPLAYBACK_M IXER_DATA@@@Z0@Z)
|
Back to Top |
|
|
support Administrator
Joined: January 26 2005 Location: United States Posts: 1666
|
Posted: April 21 2005 at 8:04am | IP Logged
|
|
|
Chav,
In the SipTelephonyApi.h header file you modified, make sure the function prototypes you added are inside the extern "C" block. This will fix your "unresolved symbol" link errors.
Also: When you call the SetPlaybackMixerCallback() and SetAudioRecordCallback() APIs, make sure the values you specify for the "pUserData" parameters are not NULL. If you do not need instance data specified, just set the "pUserData" parameter values to (void *)1.
We will update the tech note to specify this more clearly.
|
Back to Top |
|
|
chav Intermediate
Joined: April 19 2005 Location: Canada Posts: 6
|
Posted: April 21 2005 at 3:39pm | IP Logged
|
|
|
Thanks to your last reply, the compiling error has been cleared.
But now the problem is after we even forced to make the function "BOOL MediaEngineRecordComplete(AUDIO_RECORD_DATA *pAudioRecordData)" to return FALSE, the far end side of the phone line can still hear the voice from the near side. That means the audio recorded on the near side is still played to the output phonelines
The senario is the call is initiated by the near side, so the near side is the caller and the far end side is the callee, and the "Mute" action hereby is activated by caller.
We also tried the function:BOOL MediaEngineMasterPlaybackMixerComplete(PLAYBACK_MIXER_DATA *pPlaybackMixerData); it works, because after we forced it to return FALSE, the audio from far end side could not be played back on the near side, so the person on the near side could not hear the far end side.
regards,
Chav
|
Back to Top |
|
|
support Administrator
Joined: January 26 2005 Location: United States Posts: 1666
|
Posted: April 22 2005 at 7:19am | IP Logged
|
|
|
Chav,
I see there is a type-o in the tech note. Just return a non zero value in your MediaEngineRecordComplete() callback to mute your microphone audio that goes to all phone lines.
Something just occurred to me, why don't you just put your phone lines on hold by calling the HoldLine() API procedure? Use the HoldLine() API procedure instead of the undocumented APIs if you can.
Lanscape Support
|
Back to Top |
|
|
chav Intermediate
Joined: April 19 2005 Location: Canada Posts: 6
|
Posted: April 22 2005 at 7:09pm | IP Logged
|
|
|
Thanks to your reply, but it still does not work, the reason that we don't use the Hold to fake the Mute is we want to make the caller who initiates the "Mute" still be able to hear the other side.
It seems the call back MediaEngineRecordComplete() is never called by the engine, is there any other possibility that causes this problem?
regards,
Chav
|
Back to Top |
|
|
support Administrator
Joined: January 26 2005 Location: United States Posts: 1666
|
Posted: April 25 2005 at 7:35am | IP Logged
|
|
|
When you call the SetPlaybackMixerCallback() and SetAudioRecordCallback() APIs, make
sure the values you specify for the "pUserData" parameters are not NULL. If you do not
need instance data specified, just set the "pUserData" parameter values to (void *)1.
The tech note from the link above has been updated. It may help to download it and read it again.
We use these two API procedures in our own applications. They do work.
|
Back to Top |
|
|