Author Message
AbdulKA
Joined: Nov 6, 2013
Messages: 35
Offline
Hello,

we have a recording application which uses service observe mode. While testing i registered 40 DMCC stations and in the response we are using pressbutton to activate serice observe feature button and dial the phone to be recorded. The application is a windows service. It was noticed that ,in the response of registrations, all the registrations were succesful without any errors. But when we checked DMCC_DMC license consumption and registrered stations from CM ,only very few stations got registered. When we restart the service, again the registrations of another number of stations happened. When the session details is checked from AES, it is shown that 40 associated devices with that session. i am really confused what is happening. Is there any way to monitor the flow of registration through this applicaiton and what is happening during this registration process.


Regards
Rasheed
JohnBiggs
Joined: Jun 20, 2005
Messages: 1139
Location: Rural, Virginia
Offline
Define successful without error more precisely. You got a response to your request, or the response indicated a successful registration?

Is the AES returning a "code" of 1 to your register terminal request?

You may want to either configure the DMCC .NET SDK to log XML events, or enable XML tracing on DMCC to see more clearly what is happening. There is a FAQ on enabling DMCC tracing.

Incoming XML 3 32004:greenwitch:0.0.0.0:0
<?xml version="1.0" encoding="UTF-8"?>
<RegisterTerminalResponse xmlns="http://www.avaya.com/csta">
<device>
<deviceIdentifier xmlns:ns1="http://www.ecma-international.org/standards/ecma-323/csta/ed3" typeOfNumber="other" mediaClass="voice" bitRate="constant">32004:greenwitch:0.0.0.0:0</deviceIdentifier>
</device>
<signalingEncryption>challenge</signalingEncryption>
<code>1</code>
</RegisterTerminalResponse>

Are you pacing your registrations?
(From the AE Services Overview Document)

AE Services and Communication
Manager can support up to 100 maximum
registration requests by an application in
a 10-second interval. Based on a
recommendation of 20 registrations per
CLAN, this can be reached by having 5
CLANs, which are able to process 20
unencrypted registrations each per 10-
second interval. Note that the same limit
of 100 registrations in a 10-second
interval applies for Processor Ethernet
also.
Developers need to consider this limit
when designing applications (that is, a
gap of 10 seconds is required between
each set of 100 registrations if 5 CLANs
are being utilized; a gap of 10 seconds is
required between each set of 80
registrations if 4 CLANs are being utilized;
and so forth).
AbdulKA
Joined: Nov 6, 2013
Messages: 35
Offline
Dear John,

i tested again today and found that i am able to do all the registrations succesfully if i comment the service observe initialization code in my application. i am calling the following code to start service observing a phone to be recorded. I am registering softphone and then on the reponse of register terminal i am doing the following code.

e.getPhone.SetHookswitchStatus(True, Nothing)
e.getPhone.PressButton(Phone.ButtonIDConstants.BUTTON_1 + (PushButtonVal - 1), Nothing)
'e.getPhone.SetHookswitchStatus(False, Nothing)

RecordingDevice.getPhone.SetHookswitchStatus(False, Nothing)
'make changes here for extension
For i As Integer = 0 To OwnerDeviceExt.Length - 1
Dim buttonNumber As Integer = setButtonIDConstants(OwnerDeviceExt.Substring(i, 1))
e.getPhone.PressButton(buttonNumber, Nothing)
Next



First make the softphone onhook , then press the service observe feature button (button number 8 configured), then i make softphone offhook , then i dial the number of the extension to be recorded.

if i comment the above code , registration is working fine. For the registration of softphone 12002 , i have pasted the errors i got in to the link http://pastebin.com/G96wLjE8

It was noticed from the above log that , once the service observe code is called, it is unregistering the softphone with the error "CM Connection lost - protocol timeout: MISC timer, tried 3 times.Possible problem(s) include:
1. Network connection is not working or is congested" , please refer the above link for the full error logs of softphone 12002.


Thanks and Regards
Abdul Rasheed
JohnBiggs
Joined: Jun 20, 2005
Messages: 1139
Location: Rural, Virginia
Offline
Are you pacing your registrations?

If you want us to start unraveling a log file, please open a DevConnect Technical Support request.

My guess is you are overwhelming the CLAN with the speed at which you are making requests.. By all appearances you have zero delays built in to allow the system to react to your requests. Please keep in mind things are built to work a human speed which are the assumed operators of telephones in the Communication Manager software.
AbdulKA
Joined: Nov 6, 2013
Messages: 35
Offline
Dear John,

The registrations were ok . i even given 10 seconds sleep after 20 registrations as per the AES overview document as i have 40 stations to be registered. But i havent given any delay in the code section for service observe from registered soft phones and this is called on the response of registration , Do you think that this will require delays in between onhook, pressing service observe button, offhook, dial extension etc. ?

Regards
Rasheed
JohnBiggs
Joined: Jun 20, 2005
Messages: 1139
Location: Rural, Virginia
Offline
From an on hook state. if you push the Service Observe button, the station is forced off hook to begin collection of the digits for the observed station. Thus you have an extraneous off hook in your sequence.

I assume you are following the guidelines related to AE Services and CLANS and the CLAN you are using is dedicated to your device registrations. There is not traffic from some other source consuming the capacity of the CLAN.

I forget the context, and can not find the thread to point you at. There was an application that had no pacing to its activities. At some level (I forget where) the application would just beat out requests as fast as its processor could send them. The results were indeterministic. The development team made a recommendation to insert delay between the requests... once that was done, things with that application got much better.

I fall back on generalizations.. A human takes a minimum of ~50ms to push a button and move to the next button when dialing a call... how fast can YOU dial 4 or 5 digits on a stop watch? After doing something where you expect to hear dial tone in response.. do you just start dialing immediately or do you wait to hear the tone?

Hopefully your application is multithreaded, and inserting some wait states between the SO button push and in between each digit is a relatively simple test to make to see if it impacts the problem you are presenting. Additionally you will have to constrain things by keeping the thread count for this activity 'low'.
AbdulKA
Joined: Nov 6, 2013
Messages: 35
Offline
Thanks John,i will try adding delays to the press button activities. Going through some of the DMCC.NET FAQs i could see some suggested delays also in this regard. I also went through the AES Over view document regarding the capacities of AES and expected traffic from applications. After that i have few more concerns .

1. In the document ,for client media without encryption it is given as "100 simultaneous registrations with 20
simultaneous registrations per CLAN for a total of 5
CLANs. A gap of 10 seconds between each set of
100 registrations."
Does this mean that , there should be a gap of 10 seconds after registering 100 stations using 5 CLANS , 20 at a time in one CLAN , ?


2. I have 40 stations and 2 CLANs , Should i add these 2 CLANs in h323 gatekeeper list to provision the above distribution mentioned in query1?

3. Do i need to add a delay of 100ms between registerterminals of these 40 stations ?

Thanks and Regards
Abdul
JohnBiggs
Joined: Jun 20, 2005
Messages: 1139
Location: Rural, Virginia
Offline
1) yes. No more than 20 registration requests per CLAN each 10 seconds. Now how do you achieve that when you are using H.323 gatekeeper based registrations with multiple CLANs is something I would have to research. I don't know if AE Services does that load balancing for you.

2) if you are using static IPs for the CLANs in your getDeviceID request, then the onus is on your application to distribute the registration requests in time. If you are using H.323 Gatekeeper and expecting AE Services to spread things out, we need to research that.

3) after the 20th registration request to one CLAN it seems clear you need a 10,000ms delay before sending another registration request to that same CLAN.

The capacity numbers assume that the CLAN is dedicated to AE Services.. that no other services use it.
AbdulKA
Joined: Nov 6, 2013
Messages: 35
Offline
Dear John.

Thanks a lot . After adding delays prior to pressing buttons it seems to be working fine now.
In the StartApplicationSession initially i give 60 seconds as session timeout. But After calling Startapplicationsession it took more that 1 minute for getting device id , registering devices etc. I noticed that by this time ,session is cleared out. When i increased the delay it seems to be working fine .. Is this normal? initially i expected that on calling start application session, and getting its response the timeout duration will start. But here i think it is not. It seems to be waiting for the device registrations finish and start the timer. Maybe i need to analyze the call flow once again from my application to come to a conclusion. But if you have any thoughts please let me know.

Thanks and Regards
Abdul
JohnBiggs
Joined: Jun 20, 2005
Messages: 1139
Location: Rural, Virginia
Offline
each message you send should reset the Session timeout. If > 60 sedonds pass between two requests I can see how the timeout could occur, however your application should be resetting teh session timer approximly every 19 seconds .. you should not be dependant on sending other requests to keept the session alive. The session timer starts as soon as AE services creates the session. You should be able to observe the AE Services DMCC logs and get a better idea of what is/isnt happening.

taking 60 seconds to respond to getting a deviceId indicates something is wrong somewhere. that request is handled locally on AE Services. The response should be within 1 second.
AbdulKA
Joined: Nov 6, 2013
Messages: 35
Offline
Dear John,

I am intiating StartApplicationSession with KeepAlive as true. I expected that this will be sufficient to take care of sending Keep Alive messages automatically from the application . My application call flow is as following

1. Start Application session
2. In the response of start application session ,it will call Getdeviceid of 40 stations

3. In the response handler of getdevice id it will register each device.

Start Application session is initiated in a windows service startup. The other steps are done sequentially one by one after the windows service is started.

I connected to the avaya devconnect remote lab for testing the applicaiton and i noticed that if i disable the VPN adapter , server down event is triggered and after enabling the VPN adapter again ,even if i reconnect in server down handler before the session duration is over, the reconnection is not succesful. So i am really confused now how is the recovery machanism work. i think i followed exact steps as given in programmers manual of DMCC .NET


Regards

Abdul
JohnBiggs
Joined: Jun 20, 2005
Messages: 1139
Location: Rural, Virginia
Offline
yes the .NET sdk will send the keep alives (resetApplicationSessionTimer) for you.

"if i disable the VPN adapter , server down event is triggered and after enabling the VPN adapter again ,even if i reconnect in server down handler before the session duration is over, the reconnection is not succesful."

Are you using the AE Services side logs to help you understand what is happening? The reports there will tell you why the reconnect is unsuccessful and show you the intervals that AE Services thinks has passed. 'Standing' on one side of the interface and trying to second guess what the other side is thinking is very difficult. The logs are on AE Services for a reason. Please make use of them.
AbdulKA
Joined: Nov 6, 2013
Messages: 35
Offline
Hello John,

I checked logs and the call flow in detail and found the following things.

1. My application which does the applicaiton session start, get device id, start monitors and registrations of devices in the same main thread and the resetapplicationsession messages will be start sending only after all the registrations are completed, if the time required to do all these registrations are higher than the session duration, it will get time out. I feel that the reset application sessions will start only after completing applications sessions and its responses and whatever calls coming from applicaiton sessions responses and those calls responses. SHould i think of doing registrations in multi threads to over come the above situation?

2. From the server down event handler , even if i call a reconnect , or if i invoke a statapplication session , it is failing. (Even if connection is recovered state) . But if i stop my application service and restart it , then a new session is created. So i doubt if there is something to do with the object memory or something like that.

Anyway I will do more testing to find it out.

Thanks and Regards
Abdul Rasheed
JohnBiggs
Joined: Jun 20, 2005
Messages: 1139
Location: Rural, Virginia
Offline
1) as long as the application sends any message that AE Services receives before the resetApplicationSessionTimer timer expires (about 19 seconds in your case where the SessionTimer is 60 seconds), the SDK does not need to send a resetApplicationSessionTimer message. That is most likely why you see the resetApplicationSessionTimer messages start AFTER registration activity ends; that is the first pause the application takes that is longer than 19 seconds. If the SessionTimer is timing out, look at the AE Services side logs and figure out what isn't happing for 60 seconds.

2) what do the AE Services /opt/mvap/logs/mvap-trace.log.X logs tell you is happening with your reconnect attempt?
AbdulKA
Joined: Nov 6, 2013
Messages: 35
Offline
Dear John,

I tested today the whole day and could resolve the first issue. When i use Service provider DLL 4.2 with protocol version 4.2 negotiated it is working perfectly and registrations were not timing out as mentioned in point 1. When i use 6.2 DLL with 6.2 version negotiated also, it was working perfect. If i use 6.2 DLL and negotiate 4.2 version the problem is happening. so i think it is something to do with the versions. Regarding the second issue it is still pending. But i changed the recovery machanism as if the server down event is recieved, i will restart the service automatically and everything will be perfect.


Thanks and Regards
Abdul
Go to:   
Mobile view