cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1062
Views
0
Helpful
7
Replies

UCCX 11.6 - passing session info via Place Call

SAN J
Level 2
Level 2

I have 3 CCX scripts I'm working with. I need to be able to pass the sessionID to all the scripts successfully. The session info/ID shows up properly on the 1st script when I run debug but I am unable to get this to the 3rd script. 

 

1st script- main script.

2nd script - triggered via Call Subflow from 1st script and I pass the session info/ID via Input mappings

3rd script - triggered by Place Call from 2nd script. 

 

Script details:

1st Script:

- Get Contact Info

- Get Session Info

-Call Subflow with Input mappings

 

2nd Script:

- Set Session Info

- Place Call

 

3rd Script:

- Get Session

- Get Session Info

 

Looked through some docs and posts but can't get it to work still. Suggestions? TIA.

7 Replies 7

Anthony Holloway
Cisco Employee
Cisco Employee

You can create a session mapping before placing the call to script 3, then in script 2, under the successful branch of the place call, use the Set Enterprise Call Info step to pass the mapping ID to script 3 as an ECC variable (second tab).  Should be something like "user.mappingID", but really, you can name it whatever you want.  Then in script 3, use the Get Enterprise Call Info step to read that mapping ID out, and use the Get Session step to retrieve the original Session object.

The Mapping ID can be anything, to include the Session ID itself, or a time stamp like this:

"" + (new Date()).getTime()

It just needs to be unique so no two calls end up with the same mapping ID.

The reason this works is because the Contact resulting from the Place Call step is the same Contact as the Triggering Contact in script 3, and thus they share the Contact's ECC variables.

As I write this, I am wondering if you could just pass the Session variable from Script 2 to Script 3 in the Enterprise Info steps, but I think they only accept Strings.  I don't know.  I'd have to test that later, but my gut tells me they do not.  If they did, then just skip the mapping part, and pass the Session variable itself.

Every time I use the Place Call step, the Contact ID is different between scripts 2 and 3, usually the integer is off by 1. Is there a configuration or setting that is required to make the Place Call contact the same as the resulting Triggering Contact?

What are you trying to accomplish from a business perspective? Perhaps there is another way to accomplish it, but it would help to understand exactly what it is you are trying to do.

joshua.liberman
Level 1
Level 1

In our case it is a callback system for our service desk, with one recurring script (script 2) to query the DB on a timer, and subsequent sessions (script 3s) created by the Place Call step to manage the individual user interactions.

What triggers the recurring script 2? Do you have an external DB that the script is querying?

We do have an external MS SQL Server DB that is connected. The recurring script 2 will trigger itself using a Place Call step, but thus far I have just been remote debugging.

I don't see how script 2 could trigger itself unless you place a call from script 1 to script 2, and it sleeps without allowing the loss of triggering contact to end the script. That said, are you creating a session in script 1? That would be the first thing I would look at. I like to use Implementation ID as the session key. This is CUCM call leg identifier. You could store that value in the database with a key of the DATETIME of when the call back should occur. The script doing the callback could search for call back requests less then current DATETIME. It would then have the session key which it could pass to script 3. There are a couple ways to do that. You could have script 2 send the session key via DTMF to script 3. You could also get the implementation ID for the new call to script 3, and put the contact information in there. You would need a delay in script 3 in either case for script 2 to pass DTMF or have time to create the appropriate session.