" /> AddBusyTreatment [SOLVED] - Genesys CTI User Forum

Author Topic: AddBusyTreatment [SOLVED]  (Read 2089 times)

Offline GregorV

  • Newbie
  • *
  • Posts: 24
  • Karma: 0
AddBusyTreatment [SOLVED]
« on: January 17, 2018, 04:41:45 PM »
Advertisement
I want to add two music treatments but the funktin AddBusyTreatments removes the prevoiusly specified treatment if it is called twice.
Is there a way to make the function do what it sounds like "adding" a tretment insted of replacing one ?
Thanks
Gregor
« Last Edit: January 17, 2018, 10:34:18 PM by GregorV »

Offline terry

  • Sr. Member
  • ****
  • Posts: 328
  • Karma: 35
Re: AddBusyTreatment
« Reply #1 on: January 17, 2018, 05:43:37 PM »
Basically AddBusyTreatment (or SetBusyTreatment, it is the same function) by themselves cannot overwrite/replace treatment.
If treatment is replaced it is probably something else (other function/object) that clears old treatment - may be check strategy/logs what it might be.

Offline GregorV

  • Newbie
  • *
  • Posts: 24
  • Karma: 0
Re: AddBusyTreatment
« Reply #2 on: January 17, 2018, 07:14:02 PM »
Here the log for the using AddBusyTreatment (before calling SuspendForDN):
[code]
AddBusyTreatment[TreatmentMusic,'MUSIC_DN:sPlay1|DURATION:iDur1',iTio1]
AddBusyTreatment[TreatmentMusic,'MUSIC_DN:sPlay2|DURATION:iDur2',iTio2]
[/code]

    _I_I_001402b562f82042 [01:07] treatment added: type=Music, par1=MUSIC_DN:sPlay1|DURATION:iDur1, par2=, tout=5
    _I_I_001402b562f82042 [01:06] [color=red]treatment deleted[/color]: type=Music, par1=MUSIC_DN:/audio/GutenTag_R2_pcma.wav|DURATION:999, par2=##3511##, tout=5
    _I_I_001402b562f82042 [01:07] treatment added: type=Music, par1=MUSIC_DN:sPlay2|DURATION:iDur2, par2=, tout=5
19:54:59.864_I_I_001402b562f82042 [07:26] HERE IS TARGETS
...
and here, if I use the TargetBlock (with the same two tratments):
    _I_I_001402b562f82043 [01:07] treatment added: type=Music, par1=MUSIC_DN:sPlay1|DURATION:iDur1, par2=, tout=5
    _I_I_001402b562f82043 [01:07] treatment added: type=Music, par1=MUSIC_DN:sPlay2|DURATION:iDur2, par2=, tout=5
20:09:08.957_I_I_001402b562f82043 [07:07] HERE IS TARGETS
...
URS version: Universal Routing Server: 8.1.400.32

Any idea ?
« Last Edit: January 17, 2018, 07:16:02 PM by GregorV »

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: AddBusyTreatment
« Reply #3 on: January 17, 2018, 08:08:10 PM »
Maybe because it doesn't detect a busy event but a new treatment?


Enviado de meu E6633 usando Tapatalk


Offline terry

  • Sr. Member
  • ****
  • Posts: 328
  • Karma: 35
Re: AddBusyTreatment
« Reply #4 on: January 17, 2018, 09:04:13 PM »
Most likely it is defect in IRD - somehow on compiling it might generate wrong code when it "see" in strategy AddBusyTreatment function.
May be good to contact Genesys in this regards.

Would propose for now to trick IRD to hide/mask using of this function. There are few ways possible I think, one of them with using SetBusyTreatment function instead of AddBusyTreatment. SetBusyTreatment it just the same but require 4 parameters - you need to insert empty string as extra "third" parameter:

SetBusyTreatment[TreatmentMusic,'MUSIC_DN:sPlay1|DURATION:iDur1'[color=red],''[/color],iTio1]
SetBusyTreatment[TreatmentMusic,'MUSIC_DN:sPlay2|DURATION:iDur2'[color=red],''[/color],iTio2]




Offline GregorV

  • Newbie
  • *
  • Posts: 24
  • Karma: 0
Re: AddBusyTreatment [SOLVED]
« Reply #5 on: January 17, 2018, 10:33:54 PM »
Yes, that was the trick!
Thanks terry
btw. IRD release is 8.1.400.23