cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4312
Views
0
Helpful
4
Replies

LUA Traces for SIP Normalization

phampson
Level 1
Level 1

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.

1 Accepted Solution

Accepted Solutions

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

View solution in original post

4 Replies 4

Mark Stover
Cisco Employee
Cisco Employee

That is pretty much the minimum script. Do you have the trace enabled in Unified CM and the log level set?

Mark

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. 

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

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!

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: