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
I found this information about the option event_arrive :
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.
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”
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:
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.
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?
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.