06-04-2019 11:45 AM
Hi Guys,
Dilemma: When Script A calls Script B and passes session variable, and they are used, I would like to kill that session without waiting for default session timeout to expire.
Why, you ask? When Script A passes caller to the trigger on script B, I use the variables to set a modify an XML doc. If someone inadvertently calls that trigger before the session timeout, I want to avoid having the script use the previous variables stored in the session. I could probably reset the variables to some defaults after being used, but was just wondering.
Solved! Go to Solution.
06-06-2019 02:22 PM
You don't need to create a new session. Just store the variables into the Triggering Contact session. It will be carried over to script B automatically. Use the Get Contact Info step on both scripts to get the session ID and store it into a variable. From there you can use the normal Get/Set Session Info steps to store and retrieve variable data. No mapping ID required and it won't have the risk of being reused by other calls.
06-05-2019 05:37 PM
06-06-2019 12:32 PM
hmm. After re-reading my OP I may not have been so clear:
In Script A, I create a session and populate 2 variables to be passed. Script A performs a call redirect to Script B. Script B does a 'getSessionInfo' from the same mapping ID created in Script1. I use the variables to do an XML write and then disconnect.
My concern is that the session timeout is 30 minutes and want to mitigate any possibility of someone directly dialing Script B trigger within that 30 minute window and having the variables of that cached session used again.
I could probably manually reset those session variables to some benign default after use, but was just wondering if there was some {clear session <MapID>} function somewhere. you're probably right -
06-06-2019 02:22 PM
You don't need to create a new session. Just store the variables into the Triggering Contact session. It will be carried over to script B automatically. Use the Get Contact Info step on both scripts to get the session ID and store it into a variable. From there you can use the normal Get/Set Session Info steps to store and retrieve variable data. No mapping ID required and it won't have the risk of being reused by other calls.
06-11-2019 08:41 AM
OK - so I presume the session info gets cleared when the associated contact is terminated in that case. I wasnt't sure, thanks.
06-11-2019 03:30 PM
The session will be destroyed 30 minutes after the call ends by default. I believe your concern is a collision where the session would be reused across unrelated calls. CUCM has us covered here with the concept of a global call ID, known as an Implementation ID within CCX. A unique session is automatically generated for the Triggering Contact with the global call ID serving conceptually the same as a Mapping ID. This is why the same call were transferred back to the CCX IVR would still have the same session - a good thing - so long as it didn't hop through a Translation Pattern. A new/unique call from CUCM would get a new session created.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide