" /> Request Agent Not Ready - Genesys CTI User Forum

Author Topic: Request Agent Not Ready  (Read 7384 times)

Offline genecool

  • Jr. Member
  • **
  • Posts: 59
  • Karma: 0
Request Agent Not Ready
« on: December 12, 2011, 04:46:49 PM »
Advertisement
Hi,

I would like to change the status of an agent via a routing strategy. For this, I want to use the SendRequest function with a specified reason.

However, I do not know the syntax of the message.

Following an old topic, I found this : SendRequest[RequestAgentNotReady,Cat['thisdn:',varMyDn,'|16:4,|17.','ReasonKey',':','ReasonCode']]

I tried to replace 'ReasonKey' and 'ReasonCode' with a lot of values... it does not work !


Do you have any information please?

Thanks.

Offline kubikle

  • Full Member
  • ***
  • Posts: 140
  • Karma: 7
Re: Request Agent Not Ready
« Reply #1 on: December 12, 2011, 06:48:27 PM »
Sorry, what exactly not working - AgentNotReady request is not sent at all, sent with no or empty AttributeReasons, etc?

In any case AttributeReasons has id 17 and is list of keys/values. In SendRequest finction it can be presented either by number 17 or by name reasons
which shoud be provided for every reasosns key. In mentioned sample the purpose of CAt is to create string in format "key:value|key:value|...."
If key present complex attribute (kvlist) the key should be in form name1.name2 where name1 is nameor id of atribute and name2 is key in this kvlist like

thisdn:12345|16:4|17.ReasonKey1:reasonVal1|17.ReasonKey2:reasonVal2
or (just the same)
thisdn:12345|16:4|reasons.ReasonKey1:reasonVal1|reasons.ReasonKey2:reasonVal2

Thanks

Offline genecool

  • Jr. Member
  • **
  • Posts: 59
  • Karma: 0
Re: Request Agent Not Ready
« Reply #2 on: December 14, 2011, 11:07:35 AM »
Hi,

I tried using this syntax : [i]SendRequest[RequestAgentNotReady,Cat['thisdn:',UData['RTargetAgentSelected'],'|16:4,|17.','ReasonCode',':','100']][/i]

This does not work, the status of the agent is AfterCallWork.

I can see the following logs :

[code]
request to 65201(TServer_A4400) message RequestAgentNotReady
AttributeAgentWorkMode 4 (AuxWork)
AttributeReason [20] 00 01 00 00..
'ReasonCode' '100'
AttributeReferenceID 896
AttributeThisDN '3975615'
..sent to P12-ROUT01-PR.3975.paris:3001(fd=540)
11:54:55.497_I_I_006c01fd7a197145 [07:24] pause (500 msec)
11:54:55.497_I_I_006c01fd7a197145 [09:04] <<<<<<<<<<<<suspend interpretator(WAIT_DELAY), func:Delay timers:00010
received from 65201(TServer_A4400)P12-ROUT01-PR.3975.paris:3001(fd=) message EventError
(DN is not registered)
AttributeErrorMessage 'DN is not registered'
AttributeThisDN '3975615'
AttributeReferenceID 896
AttributeErrorCode 41
AttributeTimeinSecs 1323860095 (11:54:55)
AttributeTimeinuSecs 512000
AttributeEventSequenceNumber 000000000000876b
11:54:55.512_T_E_ [14:0c] EventError is received for tserver TServer_A4400[A4400] - DN is not registered
[/code]

Do you know how to register DN ?

Offline genecool

  • Jr. Member
  • **
  • Posts: 59
  • Karma: 0
Re: Request Agent Not Ready
« Reply #3 on: December 14, 2011, 12:03:14 PM »
Hi,

I found this information about the option event_arrive :

[quote]
This option, which can be used for load balancing in an Enterprises Routing
solution as described in the Universal Routing 8.0 Deployment Guide, enables
URS to monitor DNs that it doesn’t usually monitor or to stop monitoring DNs
that it usually monitors.
[/quote]

Offline genecool

  • Jr. Member
  • **
  • Posts: 59
  • Karma: 0
Re: Request Agent Not Ready
« Reply #4 on: December 14, 2011, 02:24:10 PM »
Hi,

Upon reflection, I realized that the DN passed as a parameter was not good ... otherwise, SendRequest[RequestAgentNotReady] works perfectly!

Thanks.

Offline BenTaylor

  • Full Member
  • ***
  • Posts: 107
  • Karma: 4
Re: Request Agent Not Ready
« Reply #5 on: December 14, 2011, 03:44:25 PM »
I would double check that as I'm pretty sure you will still need event_arrive set on the DN

Offline genecool

  • Jr. Member
  • **
  • Posts: 59
  • Karma: 0
Re: Request Agent Not Ready
« Reply #6 on: December 14, 2011, 03:47:32 PM »
Of course, you still need the event_arrive option on the DN

Offline bjland4

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Re: Request Agent Not Ready
« Reply #7 on: December 22, 2011, 08:16:52 AM »
YES!I agree this :"In any case AttributeReasons has id 17 and is list of keys/values. In SendRequest finction it can be presented either by number 17 or by name reasons
which shoud be provided for every reasosns key. In mentioned sample the purpose of CAt is to create string in format "key:value|key:value|...."
If key present complex attribute (kvlist) the key should be in form name1.name2 where name1 is nameor id of atribute and name2 is key in this kvlist like :)>
thisdn:12345|16:4|17.ReasonKey1:reasonVal1|17.ReasonKey2:reasonVal2
or (just the same)
thisdn:12345|16:4|reasons.ReasonKey1:reasonVal1|reasons.ReasonKey2:reasonVal2"

Offline Padawan

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: Request Agent Not Ready
« Reply #8 on: April 11, 2013, 03:08:03 PM »
Hi everyone! Nice post! Is helping me out of a situation but i came up with an obstacle.

The actual problem im facing is to do this SendRequest[...] work.

I have a strategy that define a target currently busy. An EventError is generated by SIP Server, with Error Info "DN is busy". When the call leaves the target block from red port, the strategy check if this is the cause, and send a request to the DN:

[i]v_dn = '90000'
SendRequest[RequestAgentNotReady, Cat['thisdn:',v_dn,'|16:4,|17.','ReasonCode',':','10']][/i]

and in DN 90000 i have the configured option inside Annex tab:

[i][urs_p]
event_arrive = ringing[/i]

I have all connections between SIP Server, URS, StatServer. The fact is that it isnt working. I keep getting the message:

[code]12:45:35.937 Trc 04541 RequestAgentNotReady received from [572] (0000001f urs_p x.x.x.x:yyyyy)
message RequestAgentNotReady
AttributeThisDN '90000'
AttributeReferenceID 80
AttributeReason [20] 00 01 00 00..
'ReasonCode' '10'
AttributeAgentWorkMode 4 (AuxWork)
@12:45:35.9370 [0] 8.1.000.59 send_to_client: message EventError
(DN is not registered)
AttributeEventSequenceNumber 000000000000075f
AttributeTimeinuSecs 937000
AttributeTimeinSecs 1302450335 (12:45:35)
AttributeErrorCode 41
AttributeReferenceID 80
AttributeThisDN '90000'[/code]


Is the SendRequest built in a wrong way or the DN?  Help!

Offline kubikle

  • Full Member
  • ***
  • Posts: 140
  • Karma: 7
Re: Request Agent Not Ready
« Reply #9 on: April 11, 2013, 05:02:33 PM »
Request irtself looks like right. EventError indicated that URS is not registered on 90000 i.e. option event_arrive for some reasons hasn't worked.
I would re-check setting of this option - is type of DN 90000 - extension? Or may be some leading or trailed space is in nmae of the option or name of its value, etc:
Every time you correctly set this option in URS log should be registering request for this DN and every time you un- set it  - corresponding unregistering request.

Offline Padawan

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: Request Agent Not Ready
« Reply #10 on: April 11, 2013, 11:28:05 PM »
Kubikle, i checked that many times  :-\

Yes, DN 90000 is an Extension

Each time i tried i searched for any sign of URS registering in the DN. Never found any.

I decided to redo all configuration since was difficult to find out what was going wrong. And now it is working!

Thank you guys!!! Now i know this works and do a fine job. Im going to test it within a multisite routing and see if it works too.

One only thing im wondering, i think it would not be wise to do this in a bigger environment, like having more than 1000 positions logged in at the same time. Wouldnt it consume too much of the router with not important event processing?

Offline kubikle

  • Full Member
  • ***
  • Posts: 140
  • Karma: 7
Re: Request Agent Not Ready
« Reply #11 on: April 12, 2013, 04:27:34 PM »
Unlikely extra events will significantly affect URS compared to loading it already has (no matter how many extensions will be).
Even without any registering URS already got events every time about what happen on every single extension (dialing, ringing, answering, etc) from statserver.

Still extra ways to reduce this extra loading on URS:
Instead of event_arrive on extension DN use option transit_dn=true. It makes URS register on this DN but not trying to process calls on it. Or if no answer situation is rare it is possible to consider sending every time registering request first  (SendRequest[3, 'thisdn:90000']) before sending request "make agent not ready" and may be unregistering after.

For multisite such keys in request body for SendRequest as tserver or switch might be useful.