<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Useful update: The actual culprit is the initial INVITE from the
      SIP trunk, which is missing the "From" header. FreeSWITCH raises an
      eyebrow and replies with 400 "Bad Request", while omitting the
      header as well on the way back to OpenSIPS!</tt><br>
    <pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
    <div class="moz-cite-prefix">On 16.03.2016 11:27, Liviu Chircu
      wrote:<br>
    </div>
    <blockquote cite="mid:56E926FE.2000208@opensips.org" type="cite">
      <meta content="text/html; charset=windows-1252"
        http-equiv="Content-Type">
      <tt>Hi Dimitry!<br>
        <br>
        That errors suggests the "From" Header Field of the 400 negative
        reply is missing! Best way to continue from here is to perform a
        SIP trace on this scenario, so you can confirm this yourself
        before starting to fix it.<br>
      </tt>
      <pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
      <div class="moz-cite-prefix">On 15.03.2016 14:48, Nagorny, Dimitry
        wrote:<br>
      </div>
      <blockquote
        cite="mid:ac8647e150b24f98aa4d3b207493e5f1@r5prod-exchange.robot5.de"
        type="cite">
        <meta http-equiv="Content-Type" content="text/html;
          charset=windows-1252">
        <meta name="Generator" content="Microsoft Word 15 (filtered
          medium)">
        <style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@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;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
span.E-MailFormatvorlage17
        {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:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:578903226;
        mso-list-type:hybrid;
        mso-list-template-ids:-17911100 1125529682 67567619 67567621 67567617 67567619 67567621 67567617 67567619 67567621;}
@list l0:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:-;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-font-family:Calibri;
        mso-bidi-font-family:"Times New Roman";}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></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]-->
        <div class="WordSection1">
          <p class="MsoNormal">Good afternoon Ladies and Gentlemen,<o:p></o:p></p>
          <p class="MsoNormal"><o:p> </o:p></p>
          <p class="MsoNormal">I’m trying to use OpenSIPS as a Border
            Controller between a PSTN and a FreeSWITCH. The PSTN is
            sending all SIP-messages through a SIP-trunk.<o:p></o:p></p>
          <p class="MsoNormal">I got OpenSIPS working fine from PSTN
            through OpenSIPS to FreeSWITCH, but the other way around
            (from FS over OpenSIPS to PSTN),  I’m getting an error
            message I can’t solve. (Info: There are NO phones registered
            with OpenSIPS or FreeSWITCH, they are all on the PSTN, I
            need OpenSIPS only to guide traffic to either my FreeSWITCH
            mediaserver or tot he Aus @ PBX.)<o:p></o:p></p>
          <p class="MsoNormal"><o:p> </o:p></p>
          <p class="MsoNormal">As far as I can tell, when OpenSIPS opens
            up a new branch it is changing internally the headers from
            the incoming SIP-message from FreeSWITCH into a wrong format
            and after that it’s throwing two errors:<o:p></o:p></p>
          <p class="MsoListParagraph"
            style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><!--[if !supportLists]--><span
              style="mso-list:Ignore">-<span style="font:7.0pt
                &quot;Times New Roman&quot;">          </span></span><!--[endif]-->ERROR:tm:send_ack:
            failed to generate a HBH ACK if key HFs in reply missing <br>
            ERROR:tm:reply_received: failed to send ACK (local=no)<o:p></o:p></p>
          <p class="MsoListParagraph"
            style="margin-left:72.0pt;text-indent:-18.0pt;mso-list:l0
            level2 lfo1">
            <!--[if !supportLists]--><span
              style="font-family:&quot;Courier New&quot;"><span
                style="mso-list:Ignore">o<span style="font:7.0pt
                  &quot;Times New Roman&quot;">   </span></span></span><!--[endif]-->Here
            I looked at the relevant code but I can’t tell what it is
            trying to do in the transaction module<o:p></o:p></p>
          <p class="MsoListParagraph"
            style="margin-left:72.0pt;text-indent:-18.0pt;mso-list:l0
            level2 lfo1">
            <!--[if !supportLists]--><span
              style="font-family:&quot;Courier New&quot;"><span
                style="mso-list:Ignore">o<span style="font:7.0pt
                  &quot;Times New Roman&quot;">   </span></span></span><!--[endif]-->As
            well I couldn’t find info about the abbreviation „HBH“ or
            „HF“<o:p></o:p></p>
          <p class="MsoNormal">Additionally this piece of info:<o:p></o:p></p>
          <p class="MsoListParagraph"
            style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><!--[if !supportLists]--><span
              style="mso-list:Ignore">-<span style="font:7.0pt
                &quot;Times New Roman&quot;">          </span></span><!--[endif]-->…
            SIP/2.0 400 Bad Request..Warning: 399 192.168.1.30
            "Malformed headers : From " …<o:p></o:p></p>
          <p class="MsoListParagraph"
            style="margin-left:72.0pt;text-indent:-18.0pt;mso-list:l0
            level2 lfo1">
            <!--[if !supportLists]--><span
              style="font-family:&quot;Courier New&quot;"><span
                style="mso-list:Ignore">o<span style="font:7.0pt
                  &quot;Times New Roman&quot;">   </span></span></span><!--[endif]-->From
            this somehow I found out that it’s missing the “:“ after
            From<o:p></o:p></p>
          <p class="MsoNormal"><o:p> </o:p></p>
          <p class="MsoNormal"><o:p> </o:p></p>
          <p class="MsoNormal">Please see the attached files for more
            info.<br>
            I would very much appreciate it if somebody could give me,
            at least, a hint how I could fix the problem, because by now
            I googled these problems for three days now w/o a solution.
            I can’t attach the full debug, the mail list blocks the size
            of it (17KB…). I’ll attach it to an answer.<o:p></o:p></p>
          <p class="MsoNormal"><o:p> </o:p></p>
          <p class="MsoNormal">Thanks in advance for any help I can get!<o:p></o:p></p>
          <p class="MsoNormal"><o:p> </o:p></p>
          <p class="MsoNormal"><o:p> </o:p></p>
          <p class="MsoNormal"><span style="mso-fareast-language:DE">Very

              Respectfully<o:p></o:p></span></p>
          <p class="MsoNormal"><b><span style="mso-fareast-language:DE">Dimitry

                Nagorny<o:p></o:p></span></b></p>
          <p class="MsoNormal"><span
              style="font-size:8.0pt;mso-fareast-language:DE">Trainee<o:p></o:p></span></p>
          <p class="MsoNormal"><span
              style="font-size:8.0pt;mso-fareast-language:DE"><o:p> </o:p></span></p>
          <p class="MsoNormal"><span
              style="font-size:8.0pt;color:#4BA829;mso-fareast-language:DE">robot</span><span
style="font-size:8.0pt;color:#004994;mso-fareast-language:DE">5</span><span
              style="font-size:8.0pt;mso-fareast-language:DE"> GmbH <o:p></o:p></span></p>
          <p class="MsoNormal"><span
              style="font-size:8.0pt;mso-fareast-language:DE"><o:p> </o:p></span></p>
          <p class="MsoNormal"><u><span
                style="font-size:8.0pt;mso-fareast-language:DE">_____________________________________________________________<o:p></o:p></span></u></p>
          <p class="MsoNormal"><span
              style="font-size:8.0pt;color:#7F7F7F;mso-fareast-language:DE"
              lang="EN-US">This message is confidential and may contain
              privileged information.<br>
              If you are not the above named addressee or authorized to
              receive this<br>
              message on behalf of the addressee, please advise the
              sender immediately<br>
              and delete this message. Any unauthorized copying,
              disclosure or<br>
              distribution of the information in this e-mail is strictly
              forbidden.<o:p></o:p></span></p>
          <p class="MsoNormal"><o:p> </o:p></p>
          <p class="MsoNormal"><o:p> </o:p></p>
        </div>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
      </blockquote>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>