08-01-2016 12:27 PM
I'm trying to figure out if i'm doing something wrong. I'm looking to get traces for the LUA script to show in CUCM log files. I see the system referencing my LUA script by name in the logs, but my actual attempt to write logging from within the script is not happening. In order to isolate the script down to just to verifying logging is reliable, my script now looks like this. the message "LUA-TRACE: INITIALIZE LUA SCRIPT" does not appear in the CUCM SDL files on the server that is processing the call. This lua script is applied via SIP Profile to a telepresence endpoint.
M = {}
Function M.Inbound_INVITE(msg)
trace.enable()
trace.format("LUA-TRACE: INITIALIZE LUA SCRIPT")
end
return M
Thanks,
Pat.
Solved! Go to Solution.
08-03-2016 11:06 AM
Pat,
If what you posted matches what's in your script, then you might have some syntax errors.
1. the word function should be all lower case
2. the word "inbound" should be all lower case
M = {}
trace.enable()
function M.inbound_INVITE(msg)
trace.format("LUA-TRACE: INITIALIZE LUA SCRIPT")
end
return M
08-01-2016 01:29 PM
That is pretty much the minimum script. Do you have the trace enabled in Unified CM and the log level set?
Mark
08-01-2016 02:03 PM
Mark!!! Good to hear from you (Long time, hope life is treating you well!)
As near as i can tell, the prequisites should be in place. The SIP Profile is where i have enable tracing because this is from a SIP Endpoint (i'm trying to modify incoming invite from a telepresence device). I see an entry "getScriptNameFromSIPProfile" with the name of my Normalization script, but not the log entry i'm trying to write. I verified the endpoint i'm dialing from has that SIP profile assigned and has been reset. I'm only looking on the server processing the invite. I'm assuming the LUA work is done on CUCM server processing the call.
08-03-2016 11:06 AM
Pat,
If what you posted matches what's in your script, then you might have some syntax errors.
1. the word function should be all lower case
2. the word "inbound" should be all lower case
M = {}
trace.enable()
function M.inbound_INVITE(msg)
trace.format("LUA-TRACE: INITIALIZE LUA SCRIPT")
end
return M
08-03-2016 02:07 PM
How embarrasing! You'd think I'd been around long enough to know not to make notes in MS Word then copy them into the editor.
That was it my friend! Now i can move on to the next failure!
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