" /> Calculate MD5 from IRD strategy - Genesys CTI User Forum

Author Topic: Calculate MD5 from IRD strategy  (Read 2954 times)

Offline masgar

  • Newbie
  • *
  • Posts: 16
  • Karma: 0
Calculate MD5 from IRD strategy
« on: June 09, 2017, 01:55:48 PM »
Advertisement
Hi, I'm a beginner with Genesys and I have to build a a strategy that call a http web service passing some parameters (collected digits). My problem is that the WS expects the MD5 of the collected digits and I don't know how to calculate MD5 of a string from an IRD strategy. I suppose I should use script in IRD and call it from strategy but I have no idea how to write the script to calculate md5.

Any help is much appreciated.

Thanks,
Max

Offline terry

  • Sr. Member
  • ****
  • Posts: 328
  • Karma: 35
Re: Calculate MD5 from IRD strategy
« Reply #1 on: June 09, 2017, 09:02:37 PM »
Assuming more or less up to date URS/IRD you can try md5 console command to URS: md5 some text.
Like RequestRouter['##SELF','urs/console?md5 abc','','',''] (RouterServer=##SELF, Method=urs/console, Params=md5 some text, all other parameters empty)

Back will be returned string in format md5("sometext")=..... so result had to be parsed to cut md5(...)= prefix.

[code]13:56:04.353_I_I_033902a3485fa00c [07:4e] HERE IS RDATA
    _R_I_ [07:4e] request 3 to server ##SELF sent: urs/console?md5 abc
13:56:04.367_I_I_033902a3485fa00c [09:04] <<<<<<<<<<<<suspend interp(RDATA), func:RequestRouter timers:00000
...
13:56:04.538_I_I_033902a3485fa00c [09:05] >>>>>>>>>>>>resume interp(0), func:RequestRouter
    _I_I_033902a3485fa00c [09:04] ASSIGN: out(LOCAL) <- STRING[1,44]: "md5("abc")=900150983cd24fb0d6963f7d28e17f72"


[/code]

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Calculate MD5 from IRD strategy
« Reply #2 on: June 09, 2017, 10:37:06 PM »
Where on earth is that documented or where you get this kind of info? O.o

Enviado de meu E6633 usando Tapatalk


Offline terry

  • Sr. Member
  • ****
  • Posts: 328
  • Karma: 35
Re: Calculate MD5 from IRD strategy
« Reply #3 on: June 10, 2017, 01:59:00 AM »
Function RequestRouter send "web request" (= invoke URS WEB API)  to some other router or to itself.
More or less WEB API description can be taken from running URS instance itself (if enable http port and ask with web browser urs/help).

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Calculate MD5 from IRD strategy
« Reply #4 on: June 10, 2017, 02:03:54 AM »
And that md5? Is that described on that API help?

Offline terry

  • Sr. Member
  • ****
  • Posts: 328
  • Karma: 35
Re: Calculate MD5 from IRD strategy
« Reply #5 on: June 10, 2017, 05:34:16 AM »
Only that console command named md5 exists (without any details).

Offline masgar

  • Newbie
  • *
  • Posts: 16
  • Karma: 0
Re: Calculate MD5 from IRD strategy
« Reply #6 on: June 12, 2017, 02:35:09 PM »
Thanks for suggestion. I had temporarily solved using a stupid php web page that returns the MD5 of any string I pass to it.

Max