<?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: Passthrough CallerID as paramater to SIP normalisation script in Call Control</title>
    <link>https://community.cisco.com/t5/call-control/passthrough-callerid-as-paramater-to-sip-normalisation-script/m-p/3493649#M1035</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nice tip, thanks for sharing &lt;IMG src="https://community.cisco.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Dec 2017 15:59:15 GMT</pubDate>
    <dc:creator>dstaudt</dc:creator>
    <dc:date>2017-12-04T15:59:15Z</dc:date>
    <item>
      <title>Passthrough CallerID as paramater to SIP normalisation script</title>
      <link>https://community.cisco.com/t5/call-control/passthrough-callerid-as-paramater-to-sip-normalisation-script/m-p/3493647#M1033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have been using a sip normalization script I found on this website to modify the from header&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;M={}&lt;/P&gt;
&lt;P&gt;function M.outbound_INVITE(msg)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; local from = msg:getHeader("From")&amp;nbsp; --Get FROM Header&lt;/P&gt;
&lt;P&gt;&amp;nbsp; local b = string.gsub(from, "&amp;lt;sip:.+@", "&amp;lt;sip:xxxxxxxxxx@")&amp;nbsp; --New FROM Header&lt;/P&gt;
&lt;P&gt;&amp;nbsp; msg:modifyHeader("From", b)&amp;nbsp; --Replace FROM Header&lt;/P&gt;
&lt;P&gt;end&lt;/P&gt;
&lt;P&gt;return M&lt;/P&gt;

&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however ive been trying to modify it to allow the caller ID to be passed through from the CUCM trunk configuration interface&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found an example of this online but the value being changed is not the one I'm trying to change&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;M = {}&lt;/P&gt;
&lt;P&gt;local ccaid = scriptParameters.getValue("CCA-ID")&lt;/P&gt;
&lt;P&gt;function M.outbound_INVITE(msg)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ccaid&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; then&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; local contact = msg:getHeader("Contact")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; local replace = string.format("%s;&lt;STRONG&gt;CCA-ID&lt;/STRONG&gt;=%s&amp;gt;", "%1", ccaid)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; contact = string.gsub(contact, "(&amp;lt;sip:.*)&amp;gt;", replace)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msg:modifyHeader("Contact", contact)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;/P&gt;
&lt;P&gt;end&lt;/P&gt;
&lt;P&gt;return M&lt;/P&gt;

&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone suggest how to modify this so that the x's in the from header are replaced by the value of CCA-ID ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Dec 2017 16:21:52 GMT</pubDate>
      <guid>https://community.cisco.com/t5/call-control/passthrough-callerid-as-paramater-to-sip-normalisation-script/m-p/3493647#M1033</guid>
      <dc:creator>Signups</dc:creator>
      <dc:date>2017-12-02T16:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: Passthrough CallerID as paramater to SIP normalisation script</title>
      <link>https://community.cisco.com/t5/call-control/passthrough-callerid-as-paramater-to-sip-normalisation-script/m-p/3493648#M1034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is the solution another admin suggested&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;M={}&lt;/P&gt;
&lt;P&gt;local callingnumber= scriptParameters.getValue("callingnumber")&lt;/P&gt;
&lt;P&gt;function M.outbound_INVITE(msg)&lt;/P&gt;
&lt;P&gt;if callingnumber&lt;/P&gt;
&lt;P&gt;then&lt;/P&gt;
&lt;P&gt;local replace = "&amp;lt;sip:" .. callingnumber .. "@"&lt;/P&gt;
&lt;P&gt;local from = msg:getHeader("From")&amp;nbsp; --Get FROM Header&lt;/P&gt;
&lt;P&gt;local b = string.gsub(from, "&amp;lt;sip:.+@", replace)&amp;nbsp; --New FROM Header&lt;/P&gt;
&lt;P&gt;msg:modifyHeader("From", b)&amp;nbsp; --Replace FROM Header&lt;/P&gt;
&lt;P&gt;end&lt;/P&gt;
&lt;P&gt;end&lt;/P&gt;
&lt;P&gt;return M&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tested and working hope this helps someone else in the future&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Dec 2017 20:58:22 GMT</pubDate>
      <guid>https://community.cisco.com/t5/call-control/passthrough-callerid-as-paramater-to-sip-normalisation-script/m-p/3493648#M1034</guid>
      <dc:creator>Signups</dc:creator>
      <dc:date>2017-12-03T20:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: Passthrough CallerID as paramater to SIP normalisation script</title>
      <link>https://community.cisco.com/t5/call-control/passthrough-callerid-as-paramater-to-sip-normalisation-script/m-p/3493649#M1035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nice tip, thanks for sharing &lt;IMG src="https://community.cisco.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Dec 2017 15:59:15 GMT</pubDate>
      <guid>https://community.cisco.com/t5/call-control/passthrough-callerid-as-paramater-to-sip-normalisation-script/m-p/3493649#M1035</guid>
      <dc:creator>dstaudt</dc:creator>
      <dc:date>2017-12-04T15:59:15Z</dc:date>
    </item>
  </channel>
</rss>

