Return to LanScape's home page Go back a page...       Active TopicsActive Topics   Display List of Forum MembersMember List   Knowledge Base SearchSearch   HelpHelp  RegisterRegister  LoginLogin

LanScape VOIP Media Engine™ - Pre-Sales Technical Support
 LanScape Support Forum -> LanScape VOIP Media Engine™ - Pre-Sales Technical Support
Subject Topic: Microphone Problem Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
mfitzgerald
Vetran
Vetran


Joined: June 14 2006
Location: United States
Posts: 142
Posted: August 04 2006 at 5:50pm | IP Logged Quote mfitzgerald

We have been working on integrating the LanScape Media Engine and the softphone capabilities into an in-house application. Everything seems to work perfectly. With one exception, the microphone audio input.

We have tried this allowing the system to select its default device where
Code:

StartupParams.ZeroBasedAudioDeviceId = SIP_USE_PREFERED_AUDIO_DEVICE;


And also by utilizing the functions:
Code:

WAVEOUTCAPS WaveOutCaps;
WAVEINCAPS WaveInCaps;

GetNumDigitalAudioOutputDevices();
GetNumDigitalAudioInputDevices();

And

GetDigitalAudioOutputDevice(i,&WaveOutCaps);
GetDigitalAudioInputDevice(i,&WaveInCaps);


To grab a preferred audio device (ie USB). The code we have selects the device correctly and returns the to the phone setting
Code:

StartupParams.ZeroBasedAudioDeviceId


The preferred device selection function does check to be certain the audio device selected supports both in and out audio.

To make this easier I’ll explain it as the test box is the system running LandScape with out application. The client phone is a regular phone calling into the test box.

When the call comes in, the client phone can speak and the test box can hear, however the test box can speak and the client phone will not hear anything.

I’ve checked volume settings and I don’t know what the problem is exactly. It could be some small code we missed that sets the internal microphone volume, it could be some other problem.

We have tested with this application with both the onboard sound card and with the USB sound device with the same results. In addition we have tried the SingleLinePhone application to a SingleLinePhone application w/o any problems.

If you have any suggestions or ideas that could point us in the right direction that would be VERY helpful.

Thanks
Back to Top View mfitzgerald's Profile Search for other posts by mfitzgerald Visit mfitzgerald's Homepage
 
support
Administrator
Administrator


Joined: January 26 2005
Location: United States
Posts: 1666
Posted: August 04 2006 at 6:45pm | IP Logged Quote support

Hello Fitz,

We are just about to close our support office this evening. We will post a response to your questions tomorrow - Saturday morning.

Please hold on until then. Thanks very much. :)

Support
Back to Top View support's Profile Search for other posts by support Visit support's Homepage
 
support
Administrator
Administrator


Joined: January 26 2005
Location: United States
Posts: 1666
Posted: August 05 2006 at 12:46pm | IP Logged Quote support

Hi Fitz,

Hopefully it’s something simple. We have read your description and we think we understand what you are saying.

To make sure the media engine is recording and transmitting audio, we can perform a simple test.

We want to see if the media engine is recording audio from your selected multimedia audio device. To do this, we will need to use the undocumented API procedure:

Code:

// Allow the main app to request that all audio samples that are recorded 
// by the telephony engine's audio engine be written to a wav file.
//
// Note:
//
//     If an app calls this proc, the actual recording starts when this proc is
//     called and a phone call is active. Recording is stopped any time this 
//     proc is called and the enable parameter is set to FALSE.
//
//
TELEPHONY_RETURN_VALUE VOIP_API AudioSubsystemSaveRecordSamples(
            SIPHANDLE hStateMachine, 
            char *pWaveFileName,
            BOOL Enable
            );



Also we want to find out if the media engine is transmitting phone call audio. To do this, we will use another undocumented API procedure:

Code:

// Allow the main app to request that all audio samples that are transmitted
// out the specified phone line be recorded to disk using a wav file.
//
// Note:
//
//     If an app calls this proc, the actual recording will not begin until
//     a phone call is initiated. recording stops what the call is terminsted.
//
//     You should not attempt to view the recorded wave file until the
//     call has been terminated.
//
//
TELEPHONY_RETURN_VALUE VOIP_API SetPhoneLineTransmitRecordState(
            SIPHANDLE hStateMachine,
            int PhoneLine,
            char *pWaveFileName,
            BOOL Enable
            );



If you call the AudioSubsystemSaveRecordSamples() after media engine initialization, all samples that are recorded from your multimedia hardware will be written to a wave file when a phone call is active.

Likewise, if you call the SetPhoneLineTransmitRecordState() after media engine initialization, all samples that are transmitted from your phone line will be written to a wave file when a phone call is active.

Simply add these 2 procedures anywhere after successful media engine startup. Make a phone call and then exit your application. You should have 2 wave files: One of audio recorded from your multimedia hardware and the other that represents transmitted phone line audio. Note: when you make your test phone call, make sure the phone call uses a wave file friendly sample rate/format like uLaw.

After making your phone call, open the wave files in Windows Media Player and listen to the audio.

Test results:
1)
If you have recorded audio in both wave files, then we might be facing an RTP media streaming problem. We will need to see a SIP log file from your test call and a brief description (including IP addresses and ports) of your test setup.

2)
If you do not have recorded audio from your multimedia hardware, there is some other error condition we are not catching. As far as multimedia errors go, the media engine will return SipAudioOutFailure or SipAudioInFailure if it has any problems using your selected multimedia hardware or device. If you end up here, repost and we will assist further.


A few questions for you:

1)
Have you used Ethereal network sniffer to see if compatible RTP media is flowing between the 2 call endpoints?

http://www.ethereal.com/

This should be your main tool to help diagnose media streaming problems. It’s easy to use and always sheds light on media related issues.

2)
You stated the following:

“In addition we have tried the SingleLinePhone application to a SingleLinePhone application w/o any problems.”

We are assuming that you have used the SingleLinePhone app using the PC multimedia hardware and also the USB audio device. Making SingleLinePhone to SingleLinePhone calls. Is this correct?

3)
Are the call endpoints calling each other directly (peer to peer) or are they communicating via a proxy, Asterisk, or what?


Media related issues can usually be solved quickly. We just have look at the right information.

Repost as required,

Support


Notes:

This post discusses VOIP Media Engine undocumented API procedures that are used for internal test purposes. Do not use these API procedures in your VOIP applications.

Back to Top View support's Profile Search for other posts by support Visit support's Homepage
 
gcamp0730
Intermediate
Intermediate


Joined: June 12 2006
Location: United States
Posts: 35
Posted: August 08 2006 at 9:51pm | IP Logged Quote gcamp0730

We have made some progress, and it appears that we may have found a subtle bug.

Our SIP server is 10.2.2.75, but the media server for RTP is 10.2.2.73 (as you will see below in the SIP log).

I also have an Ethereal trace showing RTP traffic going from 10.2.2.73 to my IP address and RTP traffic from my IP address going to 10.2.2.75.

Let me know if you need any further data.

Code:
08-08-2006     16:33:51      Local7.Debug      172.26.254.57     
>>>> TxTxTxTxTxTxTxTxTxTxTxTxTxTxTx (25609 Ms, To: 10.2.2.75:5060) >>>>
INVITE sip:160101@10.2.2.75 SIP/2.0
Via: SIP/2.0/UDP 172.26.254.57:5060;rport;branch=z9hG4bK064f8d39
From: <sip:160101@10.2.2.75>;tag=64fa87e
To: <sip:160101@10.2.2.75>
Contact: <sip:160101@172.26.254.57:5060>
Call-Id: 22210968-589f-4a88-a124-3b88279f491a-000005b4@172.26.254.57
CSeq: 5205684 INVITE
Max-Forwards: 70
Organization: BF73E56A-76AC-40F1-B8A8-4E0B4C8641C9
x-MyCustomHeader: "This is a modified transmitted SIP message."
Content-Length: 231
User-Agent: LanScape VOIP Media Engine/5.12.0303 (www.LanScapeCorp.com - This is a trial version not for general deployment)
Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, SUBSCRIBE, NOTIFY
Content-Type: application/sdp

v=0
o=160101 105852000 105852000 IN IP4 172.26.254.57
s=LanScape
c=IN IP4 172.26.254.57
t=0 0
m=audio 8170 RTP/AVP 18 101
a=rtpmap:18 G729/8000/1
a=rtpmap:101 telephone-event/8000/1
a=sendrecv
a=ptime:20
a=fmtp:101 0-15

08-08-2006     16:33:51      Local7.Debug      172.26.254.57     
<<<< RxRxRxRxRxRxRxRxRxRxRxRxRxRx (25593 Ms, From: 10.2.2.75:5060) <<<<
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 172.26.254.57:5060;rport;branch=z9hG4bK064f8d39
To: <sip:160101@10.2.2.75>
From: <sip:160101@10.2.2.75>;tag=64fa87e
Call-ID: 22210968-589f-4a88-a124-3b88279f491a-000005b4@172.26.254.57
CSeq: 5205684 INVITE
User-Agent: Entice_2.2__Build_95-INST1-RMRG0-RG4-EP5371-CO1885-CPO00000
Content-Length: 0

08-08-2006     16:33:51      Local7.Debug      172.26.254.57     
<<<< RxRxRxRxRxRxRxRxRxRxRxRxRxRx (94 Ms, From: 10.2.2.75:5060) <<<<
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 172.26.254.57:5060;rport;branch=z9hG4bK064f8d39
To: <sip:160101@10.2.2.75>;tag=t1155072831-co1885
From: <sip:160101@10.2.2.75>;tag=64fa87e
Call-ID: 22210968-589f-4a88-a124-3b88279f491a-000005b4@172.26.254.57
CSeq: 5205684 INVITE
Contact: <sip:160101@10.2.2.75:5060>
User-Agent: Entice_2.2__Build_95-INST1-RMRG101-RG4-EP5371-CO1885-CPO0055 7
Content-Type: application/sdp
Content-Length: 207

v=0
o=- 4284182200 4284182200 IN IP4 10.2.2.75
s=ENS Session
c=IN IP4 10.2.2.73
t=0 0
m=audio 7524 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv

08-08-2006     16:33:51      Local7.Debug      172.26.254.57     
<<<< RxRxRxRxRxRxRxRxRxRxRxRxRxRx (0 Ms, From: 10.2.2.75:5060) <<<<
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.26.254.57:5060;rport;branch=z9hG4bK064f8d39
To: <sip:160101@10.2.2.75>;tag=t1155072831-co1885
From: <sip:160101@10.2.2.75>;tag=64fa87e
Call-ID: 22210968-589f-4a88-a124-3b88279f491a-000005b4@172.26.254.57
CSeq: 5205684 INVITE
Contact: <sip:160101@10.2.2.75:5060>
User-Agent: Entice_2.2__Build_95-INST1-RMRG101-RG4-EP5371-CO1885-CPO0055 7
Content-Type: application/sdp
Content-Length: 207

v=0
o=- 4284182200 4284182200 IN IP4 10.2.2.75
s=ENS Session
c=IN IP4 10.2.2.73
t=0 0
m=audio 7524 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv

08-08-2006     16:33:51      Local7.Debug      172.26.254.57     
>>>> TxTxTxTxTxTxTxTxTxTxTxTxTxTxTx (125 Ms, To: 10.2.2.75:5060) >>>>
ACK sip:160101@10.2.2.75 SIP/2.0
Via: SIP/2.0/UDP 172.26.254.57:5060;rport;branch=z9hG4bK064f8d39
From: <sip:160101@10.2.2.75>;tag=64fa87e
To: <sip:160101@10.2.2.75>;tag=t1155072831-co1885
Call-Id: 22210968-589f-4a88-a124-3b88279f491a-000005b4@172.26.254.57
CSeq: 5205684 ACK
Max-Forwards: 70
Route: <sip:160101@10.2.2.75>
User-Agent: LanScape VOIP Media Engine/5.12.0303 (www.LanScapeCorp.com - This is a trial version not for general deployment)
x-MyCustomHeader: "This is a modified transmitted SIP message."
Content-Length: 0
Back to Top View gcamp0730's Profile Search for other posts by gcamp0730
 
support
Administrator
Administrator


Joined: January 26 2005
Location: United States
Posts: 1666
Posted: August 09 2006 at 9:26am | IP Logged Quote support

gcamp,

Good job in obtaining and posting this information. This is exactly the type of information we need to get to the bottom of the problem.

The SIP log looks as expected for your call except for one small discrepancy.

In the "200 OK" that is being returned to your application/VOIP Media Engine, the SDP content shows that the originating session (SIP) host is 10.2.2.75. This is expressed by the "o=" header.

The connection data expressed by the "c=" header however uses the RTP media address of 10.2.2.73.

According to the RFC2327 for SDP, these values are correct for your deployment scenario.

See the bold IP addresses specified in the "200 OK" SIP message below

Code:

SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.26.254.57:5060;rport;branch=z9hG4bK064f8d39
To: <sip:160101@10.2.2.75>;tag=t1155072831-co1885
From: <sip:160101@10.2.2.75>;tag=64fa87e
Call-ID: 22210968-589f-4a88-a124-3b88279f491a-000005b4@172.26.254.57
CSeq: 5205684 INVITE
Contact: <sip:160101@10.2.2.75:5060>
User-Agent: Entice_2.2__Build_95-INST1-RMRG101-RG4-EP5371-CO1885-CPO0055 7
Content-Type: application/sdp
Content-Length: 207

v=0
o=- 4284182200 4284182200 IN IP4 10.2.2.75
s=ENS Session
c=IN IP4 10.2.2.73
t=0 0
m=audio 7524 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv



We think that you are correct in that you have identified a subtle bug in the media engine. We checked with our software developers and verified that the media engine is getting its RTP media IP address from the “o=” header and not from the “c=” header. This appears to be causing our grief.

After reviewing the SDP RFC, the media engine should be getting its “far end” RTP connection address info from the “c=” header. You have uncovered a valid subtle bug.

We will build a test DLL image for you with the proper changes. Repost to this thread with an email address so we can send you a ZIP file. Zip file size is approximately 1.8 Meg bytes.

After we verify that calls work in both directions using your deployment model, we can get you a new trial image and license with the official changes.


Also, please answer the following question:
Is your session and media traffic on the IP network side being terminated by an ENTICE VoIP Gateway?


Good job. Repost as needed,

Support
Back to Top View support's Profile Search for other posts by support Visit support's Homepage
 
gcamp0730
Intermediate
Intermediate


Joined: June 12 2006
Location: United States
Posts: 35
Posted: August 09 2006 at 9:36am | IP Logged Quote gcamp0730

You can send the test dll to gcamp0730@gmail.com.

And yes, we are using an ENTICE VoIP Gateway setup. We will soon be using their softswitch product as well. That testing will begin as soon as we workout the remaining issues with TDM termination.

Thanks,
Greg
Back to Top View gcamp0730's Profile Search for other posts by gcamp0730
 
support
Administrator
Administrator


Joined: January 26 2005
Location: United States
Posts: 1666
Posted: August 09 2006 at 11:23am | IP Logged Quote support

Hi Greg,

We have emailed you instructions on how to proceed.

Support
Back to Top View support's Profile Search for other posts by support Visit support's Homepage
 
gcamp0730
Intermediate
Intermediate


Joined: June 12 2006
Location: United States
Posts: 35
Posted: August 09 2006 at 2:27pm | IP Logged Quote gcamp0730

I have tested the new code and all is working!

Thanks for the quick comments and updates.

Greg
Back to Top View gcamp0730's Profile Search for other posts by gcamp0730
 
support
Administrator
Administrator


Joined: January 26 2005
Location: United States
Posts: 1666
Posted: August 09 2006 at 2:46pm | IP Logged Quote support

Greg,

Thanks for the response. That's what we like to hear.

The changes will be made available in the next product maintenance release (v5.12.3.4).

The new trial image you have was created earlier today. You should be able to continue your development for another 30 days until the trial expires.

Good work,

Support
Back to Top View support's Profile Search for other posts by support Visit support's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum






Contact LanScape Hear what the Lawyers have to say How youm may use this site Read your privacy rights