<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 16/09/14 15:55, Federico Cabiddu
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAFOaF_g6ckAYErC7nw5-skZB_xZoYG0hFZmxJ3vA9bGdCPQWFQ@mail.gmail.com"
      type="cite">
      <div>looking at the trace, it seems to me that the 407 is not sent
        by Kamailio but by the FS1 server ("<span
          style="font-family:arial,sans-serif;font-size:14px">User-Agent:

          IMX" in the 407, as for the 1st 407 sent by FS2), and that you
          are probably missing in the trace the messages between
          Kamailio and FS1.</span></div>
    </blockquote>
    This shouldn't be the case as the tcpdump was executed on that
    server itself, but it seems plausible (perhaps lo -vs- ethX).<br>
    <blockquote
cite="mid:CAFOaF_g6ckAYErC7nw5-skZB_xZoYG0hFZmxJ3vA9bGdCPQWFQ@mail.gmail.com"
      type="cite">
      <div><span style="font-family:arial,sans-serif;font-size:14px">-
          disable the authentication in freeswitch if you don't need it</span></div>
    </blockquote>
    Unfortunately necessary until we transition to Kamailio performing
    the authentication.<br>
    <blockquote
cite="mid:CAFOaF_g6ckAYErC7nw5-skZB_xZoYG0hFZmxJ3vA9bGdCPQWFQ@mail.gmail.com"
      type="cite">
      <div><span style="font-family:arial,sans-serif;font-size:14px">-
          store the custom header when receiving the 302 and use it to
          set $du upon receiving the 2nd INVITE</span></div>
      <div><font face="arial, sans-serif"><span style="font-size:14px">For

            the latter you can have several solutions, I suggest you to
            have a a look at the htable module. For example you could
            use it to store the key USERID::CALLID with the value of
            your custom header and retrieve it when you receive the
            authenticated INVITE from the client. Something like</span></font></div>
      <div><font face="arial, sans-serif"><span style="font-size:14px"><br>
          </span></font></div>
      <div><font face="arial, sans-serif"><span style="font-size:14px">sht(TABLE_NAME=>$fU::$ci)
            = </span></font><span
          style="font-family:arial,sans-serif;font-size:14px">$avp(imx-redirect);</span></div>
      <div><span style="font-family:arial,sans-serif;font-size:14px"><br>
        </span></div>
      <div><span style="font-family:arial,sans-serif;font-size:14px">to
          store it, and then</span></div>
      <div><span style="font-family:arial,sans-serif;font-size:14px"><br>
        </span></div>
      <div><span style="font-family:arial,sans-serif;font-size:14px">$avp(imx-redirect)
          = </span><span
          style="font-family:arial,sans-serif;font-size:14px">sht(TABLE_NAME=>$fU::$ci)</span><span
          style="font-family:arial,sans-serif;font-size:14px">;</span><span
          style="font-family:arial,sans-serif;font-size:14px"><br>
        </span></div>
    </blockquote>
    This is very useful, thank you. I'll investigate this option.<br>
    <br>
    Cheers,<br>
    <br>
    -nick<br>
  </body>
</html>