<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Kamailio receives a fairly arbitrary out of dialog NOTIFY on an interface with a private IP address (eth1). It runs it through the following code which relays it to an IP/port combo pulled from a hash table.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The IP that it is relaying to is a public address and should be addressed out of the interface with a public IP address (eth0). It is, however, sent on the private interface (eth1) and thus never reaches its target.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">route[PHONEREBOOT] {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">        # Only handle check-sync (Polycom) NOTIFY<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">        if (!is_method("NOTIFY") || $hdr(Event)!="check-sync")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">                return;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">        # Look up ip:port combo in the agentloc hash table<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">        if ($sht(agentloc=>$rU)==$null)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">                return;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">        # Set SIP URI to point to the agent<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">        $ru = "sip:" + $rU + "@" + $sht(agentloc=>$rU);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">        route(RELAY);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">        exit;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">}<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Is there a way to explicitly set the source interface to relay on?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="line-height:13.2pt;background:white"><span style="color:black;mso-fareast-language:EN-GB">Phil Lavin<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black;mso-fareast-language:EN-GB">Telecoms Systems Manager<o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="color:#86579E;mso-fareast-language:EN-GB">CloudCall by SYNETY</span></b><span style="color:black;mso-fareast-language:EN-GB"><br>
<a href="http://www.cloudcall.com/"><span style="color:#0563C1">www.cloudcall.com</span></a><b><o:p></o:p></b></span></p>
<p class="MsoNormal"><b><span style="color:black;mso-fareast-language:EN-GB"><br>
</span></b><span style="font-size:10.0pt;color:black;mso-fareast-language:EN-GB">T: +44 (0) 330 335 0000 / +1 617 982 1600<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:black;mso-fareast-language:EN-GB">D: +44 (0) 116 424 4790 / +1 716 242 6604<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:10.0pt;color:black;mso-fareast-language:EN-GB">SM:
<a href="https://uk.linkedin.com/pub/phil-lavin/25/422/750"><span style="color:#0563C1">LinkedIn</span></a>
</span><span style="color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><b><u><span style="color:#0563C1;mso-fareast-language:EN-GB"><a href="http://t.sidekickopen03.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XX43M2cMvVRrZGW2zq9tRVd0tpR56dKNHf2gJW-W02?t=http%3a%2f%2fwww.synety.com%2fblog&si=4668581662425088&pi=98b5dc7b-6a3f-4319-9221-c422f106ebf9"><span style="color:#0563C1">READ
 OUR BLOG FOR SMARTER COMMUNICATIONS</span></a></span></u></b><span style="color:black;mso-fareast-language:EN-GB"> <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:10.0pt;color:black;mso-fareast-language:EN-GB"><br>
</span><b><span style="font-size:7.5pt;color:black;mso-fareast-language:EN-GB">Confidentiality: This e-mail transmission, including any attachments, is intended only for the named recipient(s) and may contain information that is privileged, confidential and/or
 exempt from disclosure under applicable law. If you have received this transmission in error, or are not the named recipient(s), please notify the sender immediately by return e-mail and permanently delete this transmission, including any attachments.<br>
Security: This e-mail and any attachments are believed to be free from any virus but it is the responsibility of the recipient to ensure this is so. E-mail is not a 100% secure communication</span></b><span style="font-size:7.5pt;color:black;mso-fareast-language:EN-GB">.<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>