<?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 SIP normalization script in Call Control</title>
    <link>https://community.cisco.com/t5/call-control/sip-normalization-script/m-p/4044856#M2876</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need a SIP normatlization script which change "Unavailable" into "anonymos" and set "Privacy=none" to "Privacy=on"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How the SIP normalization script should look like for this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OLD:&lt;/P&gt;&lt;P&gt;From: “Anonymous “ &amp;lt;sip:Unavailable@93.122.123.101&amp;gt;&lt;BR /&gt;P-Asserted-Identity: &amp;lt;sip:&amp;lt;phonenumber&amp;gt;@domain_1.com:5060;user=phone?Privacy=none&amp;gt;&lt;BR /&gt;Diversion: &amp;lt;sip:&amp;lt;phonenumber&amp;gt;@domain_2.com:5060;user=phone&amp;gt;;reason=unknown;counter=1;privacy=off&lt;/P&gt;&lt;P&gt;NEW:&lt;/P&gt;&lt;P&gt;From: “Anonymous “ &amp;lt;sip:anonymos@93.122.123.101&amp;gt;&lt;BR /&gt;P-Asserted-Identity: &amp;lt;sip:&amp;lt;phonenumber&amp;gt;@domain_1.com:5060;user=phone?Privacy=on&amp;gt;&lt;BR /&gt;Diversion: &amp;lt;sip:&amp;lt;phonenumber&amp;gt;@domain_2.com:5060;user=phone&amp;gt;;reason=unknown;counter=1;privacy=off&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The "problem" also is that there already is on existing SIP normalization script which should be combined with the first one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Existing script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;M = {}&lt;BR /&gt;function M.inbound_200_INVITE(msg)&lt;BR /&gt;local contact = msg:getHeader("Contact")&lt;BR /&gt;local pai = msg:getHeader("P-Asserted-Identity")&lt;BR /&gt;local contact2 = string.match(contact, "&amp;lt;.*@")&lt;BR /&gt;contact2 = contact2:gsub("@", "")&lt;BR /&gt;local pai2 = string.match(pai, "@.*")&lt;BR /&gt;local newpai = contact2 .. pai2&lt;BR /&gt;msg:modifyHeader("P-Asserted-Identity", newpai)&lt;BR /&gt;end&lt;BR /&gt;return M&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;</description>
    <pubDate>Thu, 12 Mar 2020 10:53:45 GMT</pubDate>
    <dc:creator>Michael Schmidt</dc:creator>
    <dc:date>2020-03-12T10:53:45Z</dc:date>
    <item>
      <title>SIP normalization script</title>
      <link>https://community.cisco.com/t5/call-control/sip-normalization-script/m-p/4044856#M2876</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need a SIP normatlization script which change "Unavailable" into "anonymos" and set "Privacy=none" to "Privacy=on"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How the SIP normalization script should look like for this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OLD:&lt;/P&gt;&lt;P&gt;From: “Anonymous “ &amp;lt;sip:Unavailable@93.122.123.101&amp;gt;&lt;BR /&gt;P-Asserted-Identity: &amp;lt;sip:&amp;lt;phonenumber&amp;gt;@domain_1.com:5060;user=phone?Privacy=none&amp;gt;&lt;BR /&gt;Diversion: &amp;lt;sip:&amp;lt;phonenumber&amp;gt;@domain_2.com:5060;user=phone&amp;gt;;reason=unknown;counter=1;privacy=off&lt;/P&gt;&lt;P&gt;NEW:&lt;/P&gt;&lt;P&gt;From: “Anonymous “ &amp;lt;sip:anonymos@93.122.123.101&amp;gt;&lt;BR /&gt;P-Asserted-Identity: &amp;lt;sip:&amp;lt;phonenumber&amp;gt;@domain_1.com:5060;user=phone?Privacy=on&amp;gt;&lt;BR /&gt;Diversion: &amp;lt;sip:&amp;lt;phonenumber&amp;gt;@domain_2.com:5060;user=phone&amp;gt;;reason=unknown;counter=1;privacy=off&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The "problem" also is that there already is on existing SIP normalization script which should be combined with the first one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Existing script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;M = {}&lt;BR /&gt;function M.inbound_200_INVITE(msg)&lt;BR /&gt;local contact = msg:getHeader("Contact")&lt;BR /&gt;local pai = msg:getHeader("P-Asserted-Identity")&lt;BR /&gt;local contact2 = string.match(contact, "&amp;lt;.*@")&lt;BR /&gt;contact2 = contact2:gsub("@", "")&lt;BR /&gt;local pai2 = string.match(pai, "@.*")&lt;BR /&gt;local newpai = contact2 .. pai2&lt;BR /&gt;msg:modifyHeader("P-Asserted-Identity", newpai)&lt;BR /&gt;end&lt;BR /&gt;return M&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 10:53:45 GMT</pubDate>
      <guid>https://community.cisco.com/t5/call-control/sip-normalization-script/m-p/4044856#M2876</guid>
      <dc:creator>Michael Schmidt</dc:creator>
      <dc:date>2020-03-12T10:53:45Z</dc:date>
    </item>
  </channel>
</rss>

