cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
821
Views
1
Helpful
1
Replies

LUA script to remove "lr" in record-route header

ericlinji
Level 1
Level 1

Dear all,

Did anyone know how to remote "lr" in Record-route header to solve the bug CSCux82917?

CSCux82917, it describes:

CUCM cored - SIP Incoming message without Contact Header

  

CCM service crashing because Message does not contain the contact header on the SIP message, as per RFC 3261:
The Contact header field provides a SIP or SIPS URI that can be used to contact that specific instance of the UA for subsequent requests.
The Contact header field MUST be present and contain exactly one SIP or SIPS URI in any request that can result in the establishment of a dialog.

  

Workaround:
Disable loose routing from the Server who sends the response Or Use a LUA script to remove 'lr' from the record-route header



We need this LUA script to remove "lr" urgently.  Please help.


Thank you.


Henry


1 Reply 1

Mark Stover
Cisco Employee
Cisco Employee

Hi Henry,

This forum doesn't supply LUA scripts for Unified CM, just provides support and information for developers of those scripts.

I would start with the Developer Guide, which has excellent examples of how getHeader() & modifyHeader() are used, which is what you would have to use here.

https://developer.cisco.com/fileMedia/download/7e805b95-8bd1-46ea-a759-89797326f58b

In general, your script will have to:

1. getHeader for record-route

2. extract the URI

3. manipulate the URI to remove any ";lr" from it

4. modifyHeader to replace the record-route

You will also have to take into account if there is more than one record-route header, so you can manipulate all of them.

HTH,

Mark