<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: LUA script to remove &amp;quot;lr&amp;quot; in record-route header in Call Control</title>
    <link>https://community.cisco.com/t5/call-control/lua-script-to-remove-quot-lr-quot-in-record-route-header/m-p/3510828#M1206</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Henry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This forum doesn't supply LUA scripts for Unified CM, just provides support and information for developers of those scripts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would start with the Developer Guide, which has excellent examples of how getHeader() &amp;amp; modifyHeader() are used, which is what you would have to use here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.cisco.com/fileMedia/download/7e805b95-8bd1-46ea-a759-89797326f58b" title="https://developer.cisco.com/fileMedia/download/7e805b95-8bd1-46ea-a759-89797326f58b"&gt;https://developer.cisco.com/fileMedia/download/7e805b95-8bd1-46ea-a759-89797326f58b&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general, your script will have to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. getHeader for record-route&lt;/P&gt;&lt;P&gt;2. extract the URI&lt;/P&gt;&lt;P&gt;3. manipulate the URI to remove any ";lr" from it&lt;/P&gt;&lt;P&gt;4. modifyHeader to replace the record-route&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will also have to take into account if there is more than one record-route header, so you can manipulate all of them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Sep 2016 15:21:54 GMT</pubDate>
    <dc:creator>Mark Stover</dc:creator>
    <dc:date>2016-09-20T15:21:54Z</dc:date>
    <item>
      <title>LUA script to remove "lr" in record-route header</title>
      <link>https://community.cisco.com/t5/call-control/lua-script-to-remove-quot-lr-quot-in-record-route-header/m-p/3510827#M1205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;Dear all,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;Did anyone know how to remote "lr" in Record-route header to solve the bug CSCux82917?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;CSCux82917, it describes:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: #575757; font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;CUCM cored - SIP Incoming message without Contact Header&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: #575757; font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;CCM service crashing because Message does not contain the contact header on the SIP message, as per RFC 3261:&lt;BR /&gt;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.&lt;BR /&gt;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.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US"&gt;Workaround:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US"&gt;&lt;BR /&gt; Disable loose routing from the Server who sends the response Or Use a LUA script to remove 'lr' from the record-route header&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;We need this LUA script to remove "lr" urgently.&amp;nbsp; Please help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;Henry&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 宋体;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2016 14:03:55 GMT</pubDate>
      <guid>https://community.cisco.com/t5/call-control/lua-script-to-remove-quot-lr-quot-in-record-route-header/m-p/3510827#M1205</guid>
      <dc:creator>ericlinji</dc:creator>
      <dc:date>2016-09-20T14:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: LUA script to remove "lr" in record-route header</title>
      <link>https://community.cisco.com/t5/call-control/lua-script-to-remove-quot-lr-quot-in-record-route-header/m-p/3510828#M1206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Henry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This forum doesn't supply LUA scripts for Unified CM, just provides support and information for developers of those scripts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would start with the Developer Guide, which has excellent examples of how getHeader() &amp;amp; modifyHeader() are used, which is what you would have to use here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.cisco.com/fileMedia/download/7e805b95-8bd1-46ea-a759-89797326f58b" title="https://developer.cisco.com/fileMedia/download/7e805b95-8bd1-46ea-a759-89797326f58b"&gt;https://developer.cisco.com/fileMedia/download/7e805b95-8bd1-46ea-a759-89797326f58b&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general, your script will have to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. getHeader for record-route&lt;/P&gt;&lt;P&gt;2. extract the URI&lt;/P&gt;&lt;P&gt;3. manipulate the URI to remove any ";lr" from it&lt;/P&gt;&lt;P&gt;4. modifyHeader to replace the record-route&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will also have to take into account if there is more than one record-route header, so you can manipulate all of them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2016 15:21:54 GMT</pubDate>
      <guid>https://community.cisco.com/t5/call-control/lua-script-to-remove-quot-lr-quot-in-record-route-header/m-p/3510828#M1206</guid>
      <dc:creator>Mark Stover</dc:creator>
      <dc:date>2016-09-20T15:21:54Z</dc:date>
    </item>
  </channel>
</rss>

