Genesys CTI User Forum

Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: eugene on August 17, 2018, 07:47:04 AM

Title: SendEvent function call from Composer problem
Post by: eugene on August 17, 2018, 07:47:04 AM
Anyone have insight as to why URS is not liking this format of my SendEvent call from ORS?

urs/call/@00067aDDGT7TJ9QN/func/SendEvent?params=["EventQueued","thisdn:vqintenten|userdata.hello:world"]

i tried a variation thinking that URS might not like the event name and needed the enum:

urs/call/@00067aDDGT7TJ9QN/func/SendEvent?params=[58,"thisdn:vqintenten|userdata.hello:world"]

this is not an issue from my IRD test strategy where i'm calling something like:

SendEvent[EventDiverted,'thisdn:vqvirtualagent|userdata.cpa:voice']

I can't sent thru ORS the param of non string text which is why i thought my enum integer should have worked, but unfortunately i get this complaint

_I_I_04a602c64e1e8c68 [09:04] ASSIGN: v:0:_pbl_func(LOCAL) <- STRING[1,9]: "SendEvent"
_I_E_04a602c64e1e8c68 [1F:01] OP_XCALL: func SendEvent returns INTERP_ERROR, no error handling
_I_E_04a602c64e1e8c68 [09:04] error in strategy: 0006 Operation impossible (.ES_CallFuncByRef)
_I_E_04a602c64e1e8c68 [09:04] OP_XCALL: func .ES_CallFuncByRef returns INTERP_ERROR, no error handling
_I_E_04a602c64e1e8c68 [09:06] fail to interp, see above why, else stack problem
Title: Re: SendEvent function call from Composer problem
Post by: hsujdik on August 17, 2018, 04:52:45 PM
Try adding {d} before the param. I don't actually know if this works for Composer/ORS, but if you need to specify a type of data on IRD, you prefix it with the data type such as {d}, {s}...
Title: Re: SendEvent function call from Composer problem
Post by: cavagnaro on August 17, 2018, 06:01:53 PM
Also, is the VQ like that? Shouldn't it include the Switch name @switch??
Title: Re: SendEvent function call from Composer problem
Post by: eugene on August 17, 2018, 06:33:04 PM
@cav, no it doesn't need switch name.

like i mentioned i can run this exactly in IRD strategy and URS will honor it just fine

SendEvent[EventDiverted,'thisdn:vqvirtualagent|userdata.cpa:voice']

Title: Re: SendEvent function call from Composer problem
Post by: eugene on August 17, 2018, 06:35:13 PM
[quote author=hsujdik link=topic=11091.msg50458#msg50458 date=1534524765]
Try adding {d} before the param. I don't actually know if this works for Composer/ORS, but if you need to specify a type of data on IRD, you prefix it with the data type such as {d}, {s}...
[/quote]

not sure what you mean here - in the URS function block i just have the option of specifying as string or int for the params

i've logged a ticket to hopefully resolve.

this function call from ORS / URS is tricky with the params.  I had another one i did where IRD would accept true, but Composer i have to set it as 1 as that's all it'll accept.

Title: Re: SendEvent function call from Composer problem
Post by: hsujdik on August 17, 2018, 09:13:46 PM
[quote author=cavagnaro link=topic=11091.msg50459#msg50459 date=1534528913]
Also, is the VQ like that? Shouldn't it include the Switch name @switch??
[/quote]
You specify VQs with its Alias instead of DN@Switch
Title: Re: SendEvent function call from Composer problem
Post by: terry on August 17, 2018, 09:54:00 PM
Basically error 0006 Operation impossible means in this case that URS simple cannot sent trequest at all.
One of things to check: 04a602c64e1e8c68 is virtual call (not coming to URS from tserver but created by request from ORS) and in such case such call isn't "related" with any tserver so URS simply doesn't know to which tserver to send request.
if so try to add in event spec extra parameter tserver with name of tserver or switch with name of switch.

Also use number as event identification (58 instead of EventDiverted) in all cases when strategy or its fragment that URS happen to execute is not compiled first (in URS web method func it doesn't)
Title: Re: SendEvent function call from Composer problem
Post by: eugene on August 18, 2018, 04:15:20 AM
[quote author=terry link=topic=11091.msg50463#msg50463 date=1534542840]
Basically error 0006 Operation impossible means in this case that URS simple cannot sent trequest at all.
One of things to check: 04a602c64e1e8c68 is virtual call (not coming to URS from tserver but created by request from ORS) and in such case such call isn't "related" with any tserver so URS simply doesn't know to which tserver to send request.
if so try to add in event spec extra parameter tserver with name of tserver or switch with name of switch.

Also use number as event identification (58 instead of EventDiverted) in all cases when strategy or its fragment that URS happen to execute is not compiled first (in URS web method func it doesn't)
[/quote]

that's true terry, this is a chat interaction i did try 58 enum instead of eventdiverted but still had issues.  when you say put the switch name are you alluding to the vq@switch for thisdn attribute?
Title: Re: SendEvent function call from Composer problem
Post by: cavagnaro on August 18, 2018, 04:26:07 AM
No, add a parameter TServer with your TServer name
'|TServer:TServerAlcatel' for example

Enviado de meu E6633 usando o Tapatalk
Title: Re: SendEvent function call from Composer problem
Post by: terry on August 18, 2018, 06:14:44 AM
Yes, like that, just keyword name "tserver" (or switch) to be lowercase, like
|tserver:TServerAlcatel.
In other words - proovide name of tserver that URS will use for sending the event.
Title: Re: SendEvent function call from Composer problem
Post by: cavagnaro on August 19, 2018, 12:12:05 AM
Weird, I have tested with upper case and no problem at all...well...terry is our live Genesys Bible so won't argue there [emoji23]

Enviado de meu E6633 usando o Tapatalk

Title: Re: SendEvent function call from Composer problem
Post by: terry on August 19, 2018, 10:49:26 PM
Sorry, looks like you right - case sensitivity matter only for "complex" keys - userdata, extensions, reasons. 
Title: Re: SendEvent function call from Composer problem
Post by: eugene on August 20, 2018, 05:18:02 AM
[quote author=cavagnaro link=topic=11091.msg50465#msg50465 date=1534566367]
No, add a parameter TServer with your TServer name
'|TServer:TServerAlcatel' for example

Enviado de meu E6633 usando o Tapatalk
[/quote]

alright gonna try it and let you all know using the tserver name.

Genesys is swaying me to use the session:fetch tlib request type instead which i've done and can get working.

I asked him that i wanted to go the URS function route as it's much more intuitive and easier for the next developer to understand than a custom SCXML block.  I'lll keep you guys posted in case anyone is interested.

just some context to what i'm doing - just manually trying to manipulating and peg multiple VQs for reporting purposes that the customer is requesting for.
Title: Re: SendEvent function call from Composer problem
Post by: eugene on August 20, 2018, 07:05:12 AM
[quote author=terry link=topic=11091.msg50466#msg50466 date=1534572884]
Yes, like that, just keyword name "tserver" (or switch) to be lowercase, like
|tserver:TServerAlcatel.
In other words - proovide name of tserver that URS will use for sending the event.
[/quote]

Yup that did it.  you're right in the case of multimedia we do have to specify the tserver or switch name.

furthermore from Composer you have to use the event enum - it doesn't like the event name EventQueued, EventDiverted etc.

Thank you all!!
Title: Re: SendEvent function call from Composer problem
Post by: cavagnaro on August 20, 2018, 10:25:51 AM
I still think that VQ@switch should work too tho
But great you got it working :)

Enviado de meu E6633 usando o Tapatalk

Title: Re: SendEvent function call from Composer problem
Post by: eugene on August 20, 2018, 04:17:03 PM
[quote author=cavagnaro link=topic=11091.msg50474#msg50474 date=1534760751]
I still think that VQ@switch should work too tho
But great you got it working :)

Enviado de meu E6633 usando o Tapatalk
[/quote]

i didn't try it, but you're probably right