<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:Aptos;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Aptos",sans-serif;
mso-ligatures:standardcontextual;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#467886;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Aptos",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:11.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
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-US" link="#467886" vlink="#96607D" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m trying to use Freeswitch as a media server with Opensips as a load balancer, I need something very basic for a POC. (I configured the load balancer and dispatcher based on old information found here:
<a href="https://developer.signalwire.com/freeswitch/FreeSWITCH-Explained/Enterprise-Deployment/Enterprise-deployment-OpenSIPS_13173169/#freeswitch-configuration">
https://developer.signalwire.com/freeswitch/FreeSWITCH-Explained/Enterprise-Deployment/Enterprise-deployment-OpenSIPS_13173169/#freeswitch-configuration</a>, here:
<a href="https://developer.signalwire.com/freeswitch/FreeSWITCH-Explained/Auxiliary-Knowledge-and-Utilities/OpenSIPS-configuration-for-2-or-more-FreeSWITCH-installs_13173462/">
https://developer.signalwire.com/freeswitch/FreeSWITCH-Explained/Auxiliary-Knowledge-and-Utilities/OpenSIPS-configuration-for-2-or-more-FreeSWITCH-installs_13173462/</a> and here:
<a href="https://www.opensips.org/Documentation/Tutorials-OpenSIPSFreeSwitchIntegration">
https://www.opensips.org/Documentation/Tutorials-OpenSIPSFreeSwitchIntegration</a>)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m adding the X-Auth-IP header to the requests like this (this is based on the config that ships with the 3.4.x release in the docker image, so I guessed that this is where I should add the header):<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">route[relay] {<o:p></o:p></p>
<p class="MsoNormal"> # for INVITEs enable some additional helper routes<o:p></o:p></p>
<p class="MsoNormal"> if (is_method("INVITE")) {<o:p></o:p></p>
<p class="MsoNormal"> remove_hf("X-Auth-IP");<o:p></o:p></p>
<p class="MsoNormal"> append_hf("X-Auth-IP: $si\r\n");<o:p></o:p></p>
<p class="MsoNormal"> append_to_reply("X-Auth-IP: $si\r\n");<o:p></o:p></p>
<p class="MsoNormal"> xlog("L_INFO", "$ci|log|X-Auth-IP: $si\n");<o:p></o:p></p>
<p class="MsoNormal"> xlog("L_INFO", "SIP Message: $mb");<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> t_on_failure("missed_call");<o:p></o:p></p>
<p class="MsoNormal"> t_on_branch("per_branch_ops");<o:p></o:p></p>
<p class="MsoNormal"> t_on_reply("handle_nat");<o:p></o:p></p>
<p class="MsoNormal"> }<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> if (!t_relay()) {<o:p></o:p></p>
<p class="MsoNormal"> send_reply(500,"Internal Error");<o:p></o:p></p>
<p class="MsoNormal"> }<o:p></o:p></p>
<p class="MsoNormal"> exit;<o:p></o:p></p>
<p class="MsoNormal">}<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">On the freeswitch side I added the IP set by opensips in the list of allowed addresses.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Now, with or without authentication enabled on the Freeswitch side (i.e. regardless of what I set in the “auth-calls” param, or if I enable the accept-blind-auth), or even whether the Freeswitch is running or not, when I try to place a
call from/to some registerd addresses, I get the “407 Proxy authentication required” response.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Could you please give me some hints on what I might be doing wrong, or direct me to a contemporary tutorial?<o:p></o:p></p>
</div>
</body>
</html>