<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    the headers have to be terminated in \r\n. In a shell script for
    click to dial, here is the used form:<br>
    <br>
    cat &gt; $FIFO &lt;&lt;EOF<br>
    :t_uac_dlg:$name<br>
    INVITE <br>
    $URI<br>
    .<br>
    .<br>
    "`printf "${FIXED_DLG}To: &lt;$URI&gt;\r\nCSeq: $CSEQ
    INVITE\r\nContent-Type: application/sdp\r\n"`<br>
    "<br>
    "`printf "v=0\r\no=click-to-dial 0 0 IN IP4
    0.0.0.0\r\ns=session\r\nc=IN IP4 0.0.0.0\r\nb=CT:1000\r\nt=0
    0\r\nm=audio 9 RTP/AVP 8 0\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:0
    PCMU/8000\r\n"`<br>
    "<br>
    <br>
    EOF<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <br>
    On 12/16/11 10:02 AM, Sammy Govind wrote:
    <blockquote
cite="mid:CAJUJwthEUnO9-Rf7HNrb8BmoM111gNJE6jgpDkhixXmWynsbQg@mail.gmail.com"
      type="cite">Hello list,
      <div><br>
      </div>
      <div>I'm using Kamailio 3.2 and am trying to send a SIP request
        from fifo to kamailio using below format.</div>
      <div><br>
      </div>
      <div>#kamctl fifo t_uac_dlg MESSAGE <a class="moz-txt-link-freetext" href="sip:103@">sip:103@</a>
        <a moz-do-not-send="true" href="http://mydomain.org">mydomain.org</a>&nbsp;&nbsp;.
        . "From: <a moz-do-not-send="true"
          href="mailto:101@mydomain.org">101@mydomain.org</a> To: <a
          moz-do-not-send="true" href="mailto:103@mydomain.org">103@mydomain.org</a>
        Contact: <a moz-do-not-send="true" href="http://mydomain.org">mydomain.org</a>
        Content-Type: text/plain; charset=UTF-8" "INVITE"</div>
      <div><br>
      </div>
      <div>But I see this reply from Kamctl</div>
      <div><br>
      </div>
      <div>
        <div><b>database engine 'MYSQL' loaded</b></div>
        <div><b>Control engine 'FIFO' loaded</b></div>
        <div><b>entering fifo_cmd t_uac_dlg INVITE <a class="moz-txt-link-freetext" href="sip:103@">sip:103@</a>
            <a moz-do-not-send="true" href="http://mydomain.org">mydomain.org</a>&nbsp;&nbsp;.
            . From: 101@
            <a moz-do-not-send="true" href="http://mydomain.org">mydomain.org</a>&nbsp;&nbsp;To:
            103@
            <a moz-do-not-send="true" href="http://mydomain.org">mydomain.org</a>&nbsp;&nbsp;Contact:&nbsp;
            <a moz-do-not-send="true" href="http://mydomain.org">mydomain.org</a>&nbsp;&nbsp;Content-Type:
            text/plain; charset=UTF-8 INVITE</b></div>
        <div><b>400 Bad headers</b></div>
        <div><b>FIFO command was:</b></div>
        <div><b>:t_uac_dlg:openser_receiver_25561</b></div>
        <div><b>INVITE</b></div>
        <div><b><a moz-do-not-send="true"
              href="mailto:sip%3A103@mydomain.org">sip:103@mydomain.org</a></b></div>
        <div><b>.</b></div>
        <div><b>.</b></div>
        <div><b>From: 101@
            <a moz-do-not-send="true" href="http://mydomain.org">mydomain.org</a>&nbsp;&nbsp;To:
            103@
            <a moz-do-not-send="true" href="http://mydomain.org">mydomain.org</a>&nbsp;&nbsp;Contact:&nbsp;
            <a moz-do-not-send="true" href="http://mydomain.org">mydomain.org</a>&nbsp;&nbsp;Content-Type:
            text/plain; charset=UTF-8</b></div>
        <div><b>INVITE</b></div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>And in log file I see this output:</div>
      </div>
      <div>
        <br>
      </div>
      <div>
        <div>Dec 16 00:57:46 Kamailio3 /usr/local/sbin/kamailio[24541]:
          ERROR: &lt;core&gt; [parser/msg_parser.c:275]: ERROR:
          get_hdr_field: bad body for &lt;From: <a
            moz-do-not-send="true" href="mailto:101@mydomain.org">101@mydomain.org</a>&nbsp;&nbsp;To:
          103@
          <a moz-do-not-send="true" href="http://mydomain.org">mydomain.org</a>&nbsp;&nbsp;Contact:&nbsp;
          <a moz-do-not-send="true" href="http://mydomain.org">mydomain.org</a>&nbsp;&nbsp;Content-Type:
          text/plain; charset=UTF-8INVITE#012&gt;(4)</div>
        <div>Dec 16 00:57:46 Kamailio3 /usr/local/sbin/kamailio[24541]:
          INFO: &lt;core&gt; [parser/msg_parser.c:353]: ERROR: bad
          header field [From: <a class="moz-txt-link-abbreviated" href="mailto:101@mydomain.o">101@mydomain.o</a>]<br>
          <br>
          <br>
          Can anyone help..</div>
      </div>
      <div><br>
      </div>
      <div><br>
      </div>
      <div>Regards,</div>
      <div>Sammy</div>
      <div><br>
      </div>
      <div><br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a></pre>
  </body>
</html>