Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

Script to collect session integer.

Dear All,

We are attempting to extract the  session ID from a phone call and convert the session format to integer. As we know, we have to extract

the hexadecimal session id and convert by using set step to convert as int.valueOf(SessionID.toString().substring(17,25), 16).

However, We're getting error when call come to this step. The error states: For input string: "ee6b2845"; nested exception is :java.lang.NumberFormatException: For input string:"ee6b2845" (line:1, col: 1) as capture. Any idea for solve it, would much appreciated.

Everyone's tags (3)
3 REPLIES
VIP Super Bronze

Script to collect session integer.

Two thoughts:

  • I think you want Long.parseLong(SessionID, 16);
    http://stackoverflow.com/questions/11194513/convert-hex-string-to-int
  • Session, Document, and Contact variables seem to have special significance. I haven't had luck manipulating or carrying their values directly from one script to another. When it comes to sessions you can add a mapping ID which can be used to find the session later. The easiest one I have found that is reasonably unique to generate automatically is T[now].getTime()

Please remember to rate helpful responses and identify helpful or correct answers.

Script to collect session integer.

Hi,

the ID of a session is of type... well, session. You cannot just cast it into Integer or int.

What are you trying to achieve, can you please give us more details.

G.

Script to collect session integer.

Just throwing one more dart at the board here, but have you tried getting the Session Identifier from the Get Session Info Step?

Existing post where this was discussed:

https://supportforums.cisco.com/message/3326195#3326195

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
347
Views
0
Helpful
3
Replies
CreatePlease to create content