cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1756
Views
36
Helpful
12
Replies

UCCX Passing Session Variables from Multipe Apps to Target App

knelson23
Level 1
Level 1

Hello, I am working on passing variables from multiple Applications to one Target Application.  I have followed a great video on this and have replicated it in my lab.  Video: Using Session Variables in UCCX - YouTube

 

I have this working where I created two scripts/applications that then both call redirect to my target script/application.  In reactive debugging my variables from App1 and App 2 are successfully going to Target App - all is great.

Next - I then call Target App directly and I am finding that the session information from my previous call is still populated in the session information?  Which is confusing because I thought the Session ID variable changes per call - so it should never overlap?  or do I have that wrong?

 

My end goal - I have 48 scripts/apps that I need to redirect to a single Target script/app that then Queues the caller.  I need the variables passed from the 48 so that when the agent answers I can display where the caller originated from.  I also have callers that hit the Target script/app directly and I need to assign those calls variables (I was thinking I could do this based on True/False of session variables empty for those calls.  Empty means call was direct vs. non empty it came from one of 48 sites)

 

I did add to the Target Script a few steps at the end of my flow to clear out the variables and set session info to these cleared values.  My fear is when I open this up to 48 scripts/apps and multiple callers are hitting at same time the data is going to overlap if its not truly based on the callers unique id.

 

Hope I made sense with all that - let me know if anyone has an answer or can tell me if I'm using this correctly.  Thanks.

1 Accepted Solution

Accepted Solutions
12 Replies 12

What are you using as the session key? Frequently people use the calling party number. If you call from the same phone and that is the key, it would make sense that you are getting the same session. If you want to limit it to a unique call instance, you can use the implementation ID which is the CUCM call ID. Even if the call gets transferred from one application to another, that key should be the same. Each unique call (even if from the same calling phone) would be different.

That makes total sense what you are saying.  Two questions on that - 1) How to I get the CUCM Call ID - I don't see it in the Get Call Contact Info.  2)  Would I use the Set Clinic_Session = Call ID in my example below?

Then in my Target Application I assume I'd need to Get Call Contact ID and use that to Get My Session Info - correct?

 

Session-Example.JPG

You don’t even need a session mapping key if you’re correctly handing off from one app to another; the triggering contact session will automatically be the same on both apps. Just get the triggering contact’s session ID and use that to set/get session variables.

Correctly means a Call Redirect directly to the Trigger of the other app. No CUCM Translation Patterns messing with the called party number, no side adventure through CUC, etc.

Do you mean that there is a session created by default for every contact? I see the Session option in the Get Contact Info step, but I had never connected the dots on it. Whoa!!

Yep. CCX creates a session per-triggering contact, at least for JTAPI; I haven't tested HTTP contacts. It will follow the contact across Applications, including if Select Resource hands the call to an agent and they transfer it back to an Application Trigger. The call just has to stay within the purview of CCX (i.e. Triggers and IPCC Extension DNs).

The one piece that I don't remember is whether the Default Session Timeout CCX Service Parameter starts counting down when the contact leaves the Application (e.g. Select Resource handed the call to an agent) or after the call actually ends. That may be worth testing if the OP anticipates call handle times greater than the default 30 minutes and expect agents to transfer back to an Application Trigger.

Interesting! I'll have to check that out. That said, I have had good success using the implementation ID as a key. Thanks for the tip, I didn't know that.

Are you referring to the implementation ID that Elliot has shown in his screenshot?  If not, can you show us a screenshot of the variable you are referring to?

Disregard that - I see after re-reading the chain it's the Session variable.

 

Thank you.

CCX-Impl-ID.PNG

See above.

I was able to lab this up and it worked perfectly - thank you.

 

One last question for you - when redirecting the call to another application I have under Success - Goto End.  Is this sufficient to close out the first script or do I need to add something else?

Once the initial application has completed a successful call redirect, it is out of the picture for that contact. An end step at that point is what I do. Sorry, that was a long winded "yes".

One other detail that seems worth mentioning. The Session is a bucket that is empty when created. You have to put the information that you want to carry from one application to another in there to make it useful. Look at the line in the screen shot that says "Lang = Get Session Info(CallerSession, "Language")". The first application to interact with the caller prompted them for a language select. It did a Set Session Info step to put that in there. If you don't do something like that, your contact is carrying around an empty bucket.

See below.

CCX-Set Session-Info.PNG