12-10-2020 09:39 AM
I'm needing to log the UCCX server a call is active on in our logs. Anyone know how to get the servername or IP address where the script is currently running from the script.
Solved! Go to Solution.
12-15-2020 12:17 PM
Looks like I can use a SET command with the value of java.net.InetAddress.getLocalHost().getHostName() and get the host name of the server. Thank you again for trying to assist me. I should have just did a little more searching.
12-14-2020 05:04 AM
I would think any script would almost always be running on the publisher for CCX. Do you have more details about this need? Have you attempted to pull a variable like path or something along those lines and save it as an enterprise variable in the script?
12-15-2020 09:39 AM
You're aware that a call is only active on a UCCX server while it's queued? Once a call is delivered to an agent UCCX is out of the picture.
12-15-2020 11:56 AM
@Nathan Gageby You can run scripts from both, the primary and the secondary. This is especially helpful when trigger auto calls out by HTTP triggers. I've just hard coded my primaries dns name into our application logs. Been nice to have been able to have gotten the server, likely a Java command to do so.
@jim-j Actually no, you can create triggers that your agents can use to send a call back into a script and it keep it's identity. Use the enterprise variables to store data when going between the two. Been doing it for years. I was just trying to get the server for logging purposes, nothing else.
Thank you both for offering your solutions. When this becomes more important to me I will dive into the Java websites to find some code to put into a SET command to get either the IP or DNS name of the server.
12-15-2020 12:17 PM
Looks like I can use a SET command with the value of java.net.InetAddress.getLocalHost().getHostName() and get the host name of the server. Thank you again for trying to assist me. I should have just did a little more searching.
12-15-2020 12:20 PM
@Bill Brown wrote:Looks like I can use a SET command with the value of java.net.InetAddress.getLocalHost().getHostName() and get the host name of the server. Thank you again for trying to assist me. I should have just did a little more searching.
Thanks for sharing your solution, I was curious how you could get this info. I always forget that you can access plain Java functions which opens up a lot of possibilities.
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