<?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: Replace domain in TO invite message in Call Control</title>
    <link>https://community.cisco.com/t5/call-control/replace-domain-in-to-invite-message/m-p/3541197#M1657</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought that might be the case. You have to use the getRequestLine() and setRequestUri() functions to change that. Have a look at the below, it should get you started. You could also input the domain through a Normalization Script parameter, so you don't have to edit the script to change the domain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;local method, ruri, ver = msg:getRequestLine()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;local nuri = sipUtils.parseUri(ruri)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;if nuri&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; local nUser = nuri:getUser()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; local nHost = nuri:getHost()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; local newHost = "domain.com"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --create new Request URI&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; newRuri = string.format("sip:%s@%s", nUser, newHost)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; msg:setRequestUri(newRuri)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;end&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Jul 2017 14:52:08 GMT</pubDate>
    <dc:creator>Mark Stover</dc:creator>
    <dc:date>2017-07-10T14:52:08Z</dc:date>
    <item>
      <title>Replace domain in TO invite message</title>
      <link>https://community.cisco.com/t5/call-control/replace-domain-in-to-invite-message/m-p/3541194#M1654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;I am experimenting with dialing directly to our Oracle SBC's (instead of tandeming through another product that does translations for us). However, our Verizon SIP service requires the INVITE to have a specific domain in the INVITE message. Right now the invite from CUCM just has 5551112222@1.1.1.1. Verizon wants to see &lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:5551112222@verizondomain.com"&gt;5551112222@verizondomain.com&lt;/A&gt;&lt;SPAN&gt;. Does anyone have a LUA scrip that can accomplish this? I've seen a lot of scripts out there, but nothing that changes the INVITE domain. Thanks for any tips.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jul 2017 13:49:34 GMT</pubDate>
      <guid>https://community.cisco.com/t5/call-control/replace-domain-in-to-invite-message/m-p/3541194#M1654</guid>
      <dc:creator>Robert Craig</dc:creator>
      <dc:date>2017-07-07T13:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: Replace domain in TO invite message</title>
      <link>https://community.cisco.com/t5/call-control/replace-domain-in-to-invite-message/m-p/3541195#M1655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you saying you want to change the request URI or the To: header?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jul 2017 13:14:54 GMT</pubDate>
      <guid>https://community.cisco.com/t5/call-control/replace-domain-in-to-invite-message/m-p/3541195#M1655</guid>
      <dc:creator>Mark Stover</dc:creator>
      <dc:date>2017-07-10T13:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Replace domain in TO invite message</title>
      <link>https://community.cisco.com/t5/call-control/replace-domain-in-to-invite-message/m-p/3541196#M1656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess it would be the request URI. The first first line in the invite.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2017-07-10 09:53:30.344 &lt;/P&gt;&lt;P&gt;INVITE sip:5551112233@1.1.1.1;user=phone SIP/2.0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jul 2017 13:54:47 GMT</pubDate>
      <guid>https://community.cisco.com/t5/call-control/replace-domain-in-to-invite-message/m-p/3541196#M1656</guid>
      <dc:creator>Robert Craig</dc:creator>
      <dc:date>2017-07-10T13:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: Replace domain in TO invite message</title>
      <link>https://community.cisco.com/t5/call-control/replace-domain-in-to-invite-message/m-p/3541197#M1657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought that might be the case. You have to use the getRequestLine() and setRequestUri() functions to change that. Have a look at the below, it should get you started. You could also input the domain through a Normalization Script parameter, so you don't have to edit the script to change the domain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;local method, ruri, ver = msg:getRequestLine()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;local nuri = sipUtils.parseUri(ruri)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;if nuri&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; local nUser = nuri:getUser()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; local nHost = nuri:getHost()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; local newHost = "domain.com"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --create new Request URI&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; newRuri = string.format("sip:%s@%s", nUser, newHost)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; msg:setRequestUri(newRuri)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;end&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jul 2017 14:52:08 GMT</pubDate>
      <guid>https://community.cisco.com/t5/call-control/replace-domain-in-to-invite-message/m-p/3541197#M1657</guid>
      <dc:creator>Mark Stover</dc:creator>
      <dc:date>2017-07-10T14:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: Replace domain in TO invite message</title>
      <link>https://community.cisco.com/t5/call-control/replace-domain-in-to-invite-message/m-p/3541198#M1658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great. I'll give this a shot. Thank you very much!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jul 2017 17:12:42 GMT</pubDate>
      <guid>https://community.cisco.com/t5/call-control/replace-domain-in-to-invite-message/m-p/3541198#M1658</guid>
      <dc:creator>Robert Craig</dc:creator>
      <dc:date>2017-07-10T17:12:42Z</dc:date>
    </item>
  </channel>
</rss>

