Author Topic: How to play announcements so that call remains routable (IRD)  (Read 372 times)

Offline Shatners_bassoon

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
How to play announcements so that call remains routable (IRD)
« on: September 08, 2024, 07:58:24 PM »
Hello guys,

after a long time creating some routing in IRD, and I cannot seem to remember how to keep the call in routable state while playing treatments. My customer wants to have a queueing annoucement setup where they can set something like this:

Music1
Announcement1
Announcement2
CallbackOffer
Music2
Announcement3
Announcement4

Trying to figure out what's the easiest way to handle going to CallbackOffer because I don't know the length of Announcement1 and Annoucement2. Call needs to be in routable state even during the announcements, so I cannot just queue the call and use Play Announcement blocks. Is there some way I can combine SuspendForDN and SuspendForTreatmentEnd so that I know when to move to next block (EventTreatmentEnd arrives), but keep the call routable while waiting?

Thanks in advance!

Kind regards,

Willian

Offline Shatners_bassoon

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: How to play announcements so that call remains routable (IRD)
« Reply #1 on: September 10, 2024, 09:25:49 AM »
Got this sorted.. For anyone interested, this approach worked for me:

Wherever I need to play an announcement and I don't know it's length, and I want the call to be routable while playing it:

1.  SelectDN
    - green port = route to agent
    - red port =goto 2
2. PlayAnnouncement (if not already started, do not check "wait for treatment end")
2. SuspendForTreatmentEnd[1] (waiting 1 sec or the announcement to finish)
5- red port = loop back to 1 to check free agents
6- green port = annoucement finished -> can move on in the strategy.

Need to check how much strain this puts on URS when checking the agent every 1 sec.

-Willian

Marked as best answer by Shatners_bassoon on September 26, 2024, 03:32:08 PM

Offline terry

  • Sr. Member
  • ****
  • Posts: 327
  • Karma: 35
Re: How to play announcements so that call remains routable (IRD)
« Reply #2 on: September 11, 2024, 06:33:05 PM »
I think there are a few different ways that can be done without frequent looping. Some of them:

1. Based on busy treatments
  Setup busy treatments outside of Target selection object - invoke AddBusyTreatment function few times
  for treatments Music1,Announcement1,Announcement2,CallbackOffer, Exit
  Use target selection object without any treatments inside and waiting time big enough to cover all involved treatments.
  Treatment Exit will make the target selection object quit through red port with error "-003 Exit"
  On this red port analyze was call back accepted or not.
  If not then reset busy treatment chain - invoke ResetBusyTreatments[], AddBusyTreatment for Music2,Announcement3,Announcement4,Exit
  and loop back to the target selection object
  If again exit happen on Exit Treatment - reset busy treatments back to the original set of busy treatments and loop back to target
  selection object, and so on.
 
  It is even possible to use single list of busy treatments (without splitting it into 2 sublists)
  But for that you need to check result of CallbackOffer from busy treatments "thread".
  Something like this:
  Use target selection object with busy treatments
      Music1,Announcement1,Announcement2,CallbackOffer,[b]PlayApplicationToCheckCallBack[/b],Music2,Announcement3,Announcement4.
  PlayApplicationToCheckCallBack here is a special busy treatment to verify whether the call back was accepted or not.
  It is PlayApplication treatment with parameters APP_ID set to URS and STRATEGY set to name of URS subroutine which check callback acceptance.
  Running such busy treatment will mean URS executes this subroutine and continues with next busy treatment,
  You must write it - check call back acceptance if yes, then it forces quitting from the target selection object by resetting busy treatments:
  ResetBusyTreatments[] followed with AddBusyTreatment Exit – it results chain of busy treatment will collapsing to single Exit treatment, which
  force quitting from the currently executed target selection object.

 
2  Use generic(combined) waiting function able to wait for different type of events
  Something like the following:
 
  - SelectDN[]
  - if exitting on red red port, then start playing Music1
  - ListRes= SuspendForAll[HowLongToWait, 'treatment,target', '']
      Function SuspendForAll will resume when whatever first happens: waiting time expires, target is found, treatment is over.
      Second paramter set which type of events to wait: here end of treatment and target selection.
      It returns the reason why exactly it happened and data associated with this reason (select target, for example)
  If it is because of treatment end, then start the next treatment and again use SuspendForAll, and so on.



Offline Shatners_bassoon

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: How to play announcements so that call remains routable (IRD)
« Reply #3 on: September 16, 2024, 12:09:06 PM »
Thanks a lot Terry! Very good examples, I'll test these.

Offline Shatners_bassoon

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: How to play announcements so that call remains routable (IRD)
« Reply #4 on: September 26, 2024, 11:34:48 AM »
Thanks once more, Terry. They key lack of knowledge on my side was not being aware of the "Exit" function, that basically was the key feature I was missing, and that solved my issue.

Br,

Willian

Offline terry

  • Sr. Member
  • ****
  • Posts: 327
  • Karma: 35
Re: How to play announcements so that call remains routable (IRD)
« Reply #5 on: September 27, 2024, 07:48:22 AM »
Treatment Exit was exactly added to synchronize treatments time and target waiting time.