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: SipFarEndIsBusy doesn’t return line Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
nasmork
Intermediate
Intermediate


Joined: February 13 2007
Location: Canada
Posts: 12
Posted: February 26 2007 at 9:54am | IP Logged Quote nasmork

Hi

After intesive testing last week we've noticed that very often when SipFarEndIsBusy is received, the line is stuck and SipOnHook is not generated, even TerminateCall doesn't change LineState... We wouldn't notice it when placing single outgouing calls, but when calls are placed on multiple lines simultaneously and most of them hit "busy" line, then the system would run out of available lines in few minutes.

Thanks
Back to Top View nasmork's Profile Search for other posts by nasmork
 
support
Administrator
Administrator


Joined: January 26 2005
Location: United States
Posts: 1666
Posted: February 26 2007 at 12:58pm | IP Logged Quote support

Hi nasmork,

We would like to duplicate your test case here. To do so, we will need the test app you are using to evaluate the media engine. We will need you to ZIP up your test code and send it to us. We will look into it right away. We have no other reports such as this so it may be related to some subtle issue. Sounds like a possible thread deadlock issue but that’s only a guess.

When you ZIP up your test code, repost to this thread and we will get you an FTP support account for uploading. If you do not want to upload, please put the zipped project somewhere so we may download it.

Thanks,

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


Joined: February 13 2007
Location: Canada
Posts: 12
Posted: February 26 2007 at 2:12pm | IP Logged Quote nasmork

Unfortunately we don't have test app which would be focused on testing this behavior only. Providing you the whole project is practically impossible as it a) is very complex, contains variety of modules, and not easily understandable b) cannot be done without NDA.
We will see if we could put together a test one, but i suspect we may not have enough time for this. Is there any other way to help you investigating this?

Just to give you heads up on what we're working on: it's high-density outbound call-center utilizing predictive dialer. Multiple available lines initiating are calls, and when answered they are connected to agent. The server side is written in VS2005 C++, using async mode and is multithreaded. We consider LanScape VOIP Media Engine to be thread-safe and not protecting calls to engine. So, before initiating next call, our engine will loop through lines finding those OnHook and executing MakeCallUri. When it quickly ran out of lines we've discovered that after receiving SipFarEndIsBusy, most of the time this line won't go OnHook even if TerminateCall is called on this line.

for (CurLine = 0 ; CurLine < LinesNum ; CurLine++)
{
LineState = m_Lines[CurLine]->GetLineState ();

if (LineState == SipOnHook)
{
      //Dial
}
}

Unfortunately if all the lines would hit a busy line, then at some point all of them will have LineState = SipFarEndIsBusy. We expected they might go OnHook by some timeout, but this doesn't happen.
Back to Top View nasmork's Profile Search for other posts by nasmork
 
support
Administrator
Administrator


Joined: January 26 2005
Location: United States
Posts: 1666
Posted: February 26 2007 at 3:02pm | IP Logged Quote support

Hi nasmork,

Thanks for the good information. We understand about not being able to release your current code due to the reasons you have stated.

If you could get us a down and dirty simple Win32 C++ console app that exhibits the behavior, we can jump on this right away and investigate. We ask this of you because you really know how you want to use this product and we may end up performing testing that is not remotely related to your application. There really is no magic here. If we can get a test app that reproduces the problem faithfully, we can fix it right off.

We will see if we can code up a simple loop as you describe and run it. If you can get us that test app, that will speed things up greatly.

This does sound like a thread dead lock issue…


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: February 26 2007 at 4:36pm | IP Logged Quote support

nasmork,

Do us a favor, post your media engine startup parameters (from the START_SIP_TELEPHONY_PARAMS structure) and tell us your settings for SIP proxy, registrar and domain.

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


Joined: February 13 2007
Location: Canada
Posts: 12
Posted: February 26 2007 at 4:57pm | IP Logged Quote nasmork

Here it is

memset(&m_SIP_Params, 0, sizeof( m_SIP_Params));
m_SIP_Params.pPersonalityMicrocode = LanScapeVME_F186495C_7AFF_4742_ADB7_87EA48A42633;

m_SIP_Params.LineMode = SWITCH_LINE;
m_SIP_Params.UserNotifyCallbackProc = PhoneEventHandler;
m_SIP_Params.pUserDefinedData = this;
    
pConfigParams->GetSipHostIp(m_SIP_Params.IpAddressOfThisH ost);
    
m_SIP_Params.SipPort = 5060;
m_SIP_Params.MaxSipMesageLength = 4196;
m_SIP_Params.pPhoneName = pConfigParams->m_SipUserName;   
m_SIP_Params.pPhoneDisplayName = pConfigParams->m_PhoneDisplayName;
m_SIP_Params.CallConferenceEnabled = TRUE;
m_SIP_Params.FarEndCallTransferEnabled = TRUE;
m_SIP_Params.MinLocalRtpPort = 8000;
m_SIP_Params.MaxLocalRtpPort = 8000 + 64 * 2;
m_SIP_Params.ZeroBasedAudioInDeviceId = SIP_AUDIO_DEVICE_NOT_USED;
m_SIP_Params.ZeroBasedAudioOutDeviceId = SIP_AUDIO_DEVICE_NOT_USED;
m_SIP_Params.AudioRecordBandWidth = AUDIO_BW_UNDEFINED;
m_SIP_Params.AudioPlaybackBandWidth = AUDIO_BW_UNDEFINED;
m_SIP_Params.PlaybackBufferingDefault = 2;     m_SIP_Params.PlaybackBufferi ngDuringSounds = 4;      m_SIP_Params.PhoneLine TransmitBuffering = 2;   

m_SIP_Params.LogSipMessages = TRUE;
m_SIP_Params.pSipLogFileName = "c:\\SIPLOG.TXT";

m_SIP_Params.EnableEventLogServer = FALSE;
m_SIP_Params.EventLogServerPort = 514;
m_SIP_Params.pEventLogServer = "127.0.0.1";
    
     
m_SIP_Params.EnablePhoneLineRecording = TRUE;
m_SIP_Params.PhoneLineRecordBuffering = 0;
m_SIP_Params.StartupFlags = 0;
m_SIP_Params.MaxRtpPacketLength = 0;
m_SIP_Params.MaxMixerLinebuffers = 0;
    
m_SIP_Params.NumPhoneLinesRequested = 6;
m_EnableOutgoingRingTone = FALSE; //This will be enabled later by calling EnableOutgoingPhoneRing

Provider is sip.voipstunt.com
Back to Top View nasmork's Profile Search for other posts by nasmork
 
nasmork
Intermediate
Intermediate


Joined: February 13 2007
Location: Canada
Posts: 12
Posted: February 26 2007 at 4:59pm | IP Logged Quote nasmork

You can register with voipstunt.com by downloading their softphone. Calling across USA is free.

SIP port : 5060
Registrar : sip.VoipStunt.com
Proxy server : sip.VoipStunt.com
Outbound proxy server : leave empty
Account name : your VoipStunt username
Password : your VoipStunt password
Display name/number : your VoipStunt username or voipnumber
Stunserver (option) : stun.VoipStunt.com
Back to Top View nasmork's Profile Search for other posts by nasmork
 
support
Administrator
Administrator


Joined: January 26 2005
Location: United States
Posts: 1666
Posted: February 26 2007 at 5:27pm | IP Logged Quote support

nasmork,

Please post your code fragment that dials the ougoing call. It will use either the MakeCall() or the MakeCallUri() API proc.

Thanks,

Support

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


Joined: February 13 2007
Location: Canada
Posts: 12
Posted: February 26 2007 at 9:35pm | IP Logged Quote nasmork

Here it is:

for (CurLine = 0 ; CurLine < LinesNum ; CurLine++)
{
           LineState = m_Lines[CurLine]->GetLineState ();

           if (LineState == SipOnHook)
           {
                *pLine = m_Lines[CurLine];
                m_Lines [CurLine]->SetActive (true);
                m_Lines [CurLine]->SetCallData (pCallData);
                
                ret = MakeCallUri(m_hEngine, PhoneNum, TRUE, (*pLine)->GetLineId (), FALSE, 10000 );
                
                 if (ret == SipSuccess)
                 {
                      m_DialingLines.Add (*pLine);
                      (*pLine)->SetDialingTimeOutCnt (m_CallAnswerTimeOut);
                }

                ret urn e_StOK;
           }
}
Back to Top View nasmork's Profile Search for other posts by nasmork
 
support
Administrator
Administrator


Joined: January 26 2005
Location: United States
Posts: 1666
Posted: February 27 2007 at 6:47am | IP Logged Quote support

nasmork,

Are you calling the code above from a single thread or from multiple threads?

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


Joined: February 13 2007
Location: Canada
Posts: 12
Posted: February 27 2007 at 9:35am | IP Logged Quote nasmork

No, this method is being called from single thread.
Back to Top View nasmork's Profile Search for other posts by nasmork
 
support
Administrator
Administrator


Joined: January 26 2005
Location: United States
Posts: 1666
Posted: February 27 2007 at 7:22pm | IP Logged Quote support

Hi nasmork,

We put together a Win32 console test app to asynchronously hammer on the media engine. We detected a possible asynchronous deadlock situation during testing. This may be what you have reported.

We have a test setup that will run in our labs all night. The test app is polling a 6 line media engine for phone line status. When a line status of “on hook” is detected, the app calls out.

We will leave it run all night. It’s executing on a vanilla AMD machine (Athlon 64 bit, 3200+ processor at 2.2.GigHz) with Windows XP Pro SP2. It is placing asynchronous calls and is connecting at a rate of about 28 calls per second (1,680 calls per minute). The domain test setup is using a single LanScape Centrex SIP Proxy Server and a single LanScape VOIP Media Proxy Server.

If all looks ok in the morning, we would like to get you an updated trial product image. We will give you source code access to the “Test Dialer” example app we talked about above. We will make the test dialer app part of the example software apps in the next release. Let us know if you want an updated product trial.

Thanks for waiting as we investigated this.

Repost as needed,


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: February 28 2007 at 6:49am | IP Logged Quote support

nasmork,

OK. The tests we ran all night looked good. The test setup completed about 1.2 million calls overnight and averaged 1,680 calls per minute.

If you want to get an updated product trial, repost to this forum thread. We will get you a new trial product image ready for FTP download.

If you can do us a favor, in your support forum user account, go into your account profile and specify what country you are from. See the “Location” drop down list box in the “Edit Profile” forum page. This helps us prioritize our responses.

Repost as needed,

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


Joined: February 13 2007
Location: Canada
Posts: 12
Posted: February 28 2007 at 7:31am | IP Logged Quote nasmork

Yes, please let me download this update.
Back to Top View nasmork's Profile Search for other posts by nasmork
 
nasmork
Intermediate
Intermediate


Joined: February 13 2007
Location: Canada
Posts: 12
Posted: February 28 2007 at 7:33am | IP Logged Quote nasmork

Just to clarify, in your test, would your test app hit a busy line, i.e. SipFarEndIsBusy? or it doesn't matter?
Back to Top View nasmork's Profile Search for other posts by nasmork
 
support
Administrator
Administrator


Joined: January 26 2005
Location: United States
Posts: 1666
Posted: February 28 2007 at 8:57am | IP Logged Quote support

Hi nasmork,

Yes, the test app tested for far end busy cases.

Test Summary:
The testing consisted of a mix of calls that would fully connect (200 OK responses), calls that experienced authentication challenges (407 Proxy Authentication Required), calls that experienced far end busy responses (486 Busy Here) and calls that experienced other random far end errors (other 4xx-699 responses not discussed above).

We will send you an email when your new trial image is ready.

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: February 28 2007 at 12:05pm | IP Logged Quote support

nasmork,

The new trial product images are ready. Use the license manage app to request a new trial. We will process it as soon as we receive the request.

We added a new sample Win32 console app you may want to look at. Its the same app we used for testing last night. Its called "DialerTest" and is located with the other sample "Consol Applications".

Note: Completely uninstall your current media engine version.

Repost as needed,

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


Joined: February 13 2007
Location: Canada
Posts: 12
Posted: February 28 2007 at 12:15pm | IP Logged Quote nasmork

Is it possible to get 32 or 64 line trial? As if the problem is resolved we would like to test it in environment similar to production.
Back to Top View nasmork's Profile Search for other posts by nasmork
 
support
Administrator
Administrator


Joined: January 26 2005
Location: United States
Posts: 1666
Posted: February 28 2007 at 1:46pm | IP Logged Quote support

nasmork,

No problem. Please send an email to our support group and we will be able to get you a 32 line trial version.

In the email, please state the following:

company name
your real name
phone number
your company email address (no free email accounts please).

We will create a support FTP account for you so you can download. We must have this info before we can create FTP accounts.

Thanks,

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