<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hi Rodrigo,<br>
      <br>
      Most likely you're starting opensips as root user, however you're
      attempting to write to the FIFO file on behalf of an unprivileged
      user.<br>
      <br>
      So either do "sudo echo_to_file_command" or just start OpenSIPS in
      unprivileged mode.<br>
      <br>
      Here's my FIFO file, I can write to it:<br>
      <br>
    </tt><tt>[liviu ◄ Rivendell ~]$ ls -la /tmp/opensips_fifo </tt><tt><br>
    </tt><tt>prw------- 1 liviu liviu 0 dec  2 11:02 /tmp/opensips_fifo</tt><br>
    <tt>
      <meta name="qrichtext" content="1">
      <br>
      <br>
      BR,<br>
    </tt>
    <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 02.12.2015 12:53, Rodrigo Pimenta
      Carvalho wrote:<br>
    </div>
    <blockquote
cite="mid:BY2PR02MB1655DF012A0DD54AB115E06DB50E0@BY2PR02MB1655.namprd02.prod.outlook.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
      <div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
        <p>Ok. thanks.</p>
        <p><br>
        </p>
        <p>I will search about it in operational system context. I used
          to think that such fifo file was 100% supported by OpenSIPS. I
          didn't realize that it could be something of unix.</p>
        <p><br>
        </p>
        <p>I'm kind of a beginner in unix or linux.</p>
        <p><br>
        </p>
        <p>Regards.<br>
        </p>
        <p><br>
        </p>
        <div id="Signature">
          <div name="divtagdefaultwrapper"
            style="font-family:Calibri,Arial,Helvetica,sans-serif;
            font-size:; margin:0">
            <div class="BodyFragment"><font size="2">
                <div class="PlainText">RODRIGO PIMENTA CARVALHO<br>
                  Inatel Competence Center<br>
                  Software<br>
                  Ph: +55 35 3471 9200 RAMAL 979<br>
                </div>
              </font></div>
          </div>
        </div>
        <br>
        <br>
        <div style="color: rgb(0, 0, 0);">
          <hr tabindex="-1" style="display:inline-block; width:98%">
          <div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
              face="Calibri, sans-serif" color="#000000"><b>De:</b>
              <a class="moz-txt-link-abbreviated" href="mailto:users-bounces@lists.opensips.org">users-bounces@lists.opensips.org</a>
              <a class="moz-txt-link-rfc2396E" href="mailto:users-bounces@lists.opensips.org">&lt;users-bounces@lists.opensips.org&gt;</a> em nome de Ionut
              Muntean <a class="moz-txt-link-rfc2396E" href="mailto:ionutm22@gmail.com">&lt;ionutm22@gmail.com&gt;</a><br>
              <b>Enviado:</b> terça-feira, 1 de dezembro de 2015 17:19<br>
              <b>Para:</b> <a class="moz-txt-link-abbreviated" href="mailto:users@lists.opensips.org">users@lists.opensips.org</a><br>
              <b>Assunto:</b> Re: [OpenSIPS-Users] How can I write down
              the MI commands into the FIFO file, using an editor.</font>
            <div> </div>
          </div>
          <div>
            <div class="moz-cite-prefix">Come on, read about FIFO in
              Linux, lot's of info on the net! Sorry, but you lack some
              basic Linux OS knowledge ... The FIFO is active and RW if
              the creating process is active and if you have the
              permissions to do this.<br>
              <br>
              On 01/12/2015 21:13, Rodrigo Pimenta Carvalho wrote:<br>
            </div>
            <blockquote type="cite">
              <div id="divtagdefaultwrapper" style="font-size:12pt;
                color:#000000; background-color:#FFFFFF;
                font-family:Calibri,Arial,Helvetica,sans-serif">
                <p>Ok. Thanks.</p>
                <p><br>
                </p>
                <p>But, if I cann't edit the file, how could a program
                  (let's say a C program) write into such file?</p>
                <p><br>
                </p>
                <p>I will create a executable that will have to write
                  down MI commands into the FIFO file.</p>
                <p><br>
                </p>
                <p>Any hint will be very helpful!</p>
                <p>Thanks a lot!<br>
                </p>
                <p><br>
                </p>
                <div id="Signature">
                  <div name="divtagdefaultwrapper"
                    style="font-family:Calibri,Arial,Helvetica,sans-serif;
                    font-size:; margin:0">
                    <div class="BodyFragment"><font size="2">
                        <div class="PlainText">RODRIGO PIMENTA CARVALHO<br>
                          Inatel Competence Center<br>
                          Software<br>
                          Ph: +55 35 3471 9200 RAMAL 979<br>
                        </div>
                      </font></div>
                  </div>
                </div>
                <br>
                <br>
                <div style="color:rgb(0,0,0)">
                  <hr tabindex="-1" style="display:inline-block;
                    width:98%">
                  <div id="divRplyFwdMsg" dir="ltr"><font
                      style="font-size:11pt" face="Calibri, sans-serif"
                      color="#000000"><b>De:</b>
                      <a moz-do-not-send="true"
                        class="moz-txt-link-abbreviated"
                        href="mailto:users-bounces@lists.opensips.org">
                        users-bounces@lists.opensips.org</a> <a
                        moz-do-not-send="true"
                        class="moz-txt-link-rfc2396E"
                        href="mailto:users-bounces@lists.opensips.org">
                        <a class="moz-txt-link-rfc2396E" href="mailto:users-bounces@lists.opensips.org">&lt;users-bounces@lists.opensips.org&gt;</a></a> em
                      nome de Brian :: <a moz-do-not-send="true"
                        class="moz-txt-link-rfc2396E"
                        href="mailto:bc@iptel.co">
                        &lt;bc@iptel.co&gt;</a><br>
                      <b>Enviado:</b> terça-feira, 1 de dezembro de 2015
                      16:38<br>
                      <b>Para:</b> OpenSIPS users mailling list<br>
                      <b>Assunto:</b> Re: [OpenSIPS-Users] How can I
                      write down the MI commands into the FIFO file,
                      using an editor.</font>
                    <div> </div>
                  </div>
                  <div>
                    <div dir="ltr">This is not the correct way to go
                      about what you are trying to achieve.
                      <div><br>
                      </div>
                      <div>You *cant* edit the fifo file. You use
                        (correctly configured) opensipsctl fifo to send
                        commands in realtime</div>
                    </div>
                    <div class="gmail_extra"><br>
                      <div class="gmail_quote">On Tue, Dec 1, 2015 at
                        5:04 PM, Rodrigo Pimenta Carvalho
                        <span dir="ltr">&lt;<a moz-do-not-send="true"
                            href="mailto:pimenta@inatel.br"
                            target="_blank">pimenta@inatel.br</a>&gt;</span>
                        wrote:<br>
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex; border-left:1px #ccc solid;
                          padding-left:1ex">
                          <div dir="ltr">
                            <div style="font-size:12pt; color:#000000;
                              background-color:#ffffff;
                              font-family:Calibri,Arial,Helvetica,sans-serif">
                              <p>Dear OpenSIPS-users,</p>
                              <p><br>
                              </p>
                              <p>I my opensips.cfg I have:</p>
                              <p><br>
                              </p>
                              <p>---------------------------------------------------------</p>
                              <p><br>
                              </p>
                              <p>##### FIFO Management Interface<br>
                                loadmodule "mi_fifo.so"<br>
                                modparam("mi_fifo", "fifo_name",
                                "/tmp/FifoCommands.txt")    # arquivo
                                para ler comandos solicitados por
                                aplicações externas.<br>
                                modparam("mi_fifo", "reply_dir",
                                "/tmp")                     # diretório
                                onde serão escritas as respostas do
                                OpenSIPS, que serão lidas pelas
                                aplicações externas.<br>
                                modparam("mi_fifo", "fifo_mode",
                                0777)                       # permissão
                                de scrita e leitura.<br>
                                modparam("mi_fifo", "fifo_group",
                                "root")                    # grupo de
                                usuários para o arquivo.<br>
                                modparam("mi_fifo", "fifo_user",
                                "root")                     # usuário do
                                arquivo.</p>
                              <p><br>
                              </p>
                              <p>----------------------------------------------------------</p>
                              <p><br>
                              </p>
                              <p><br>
                              </p>
                              <p>When OpenSIPS is not running, I can
                                edit the file FifoCommands.txt using
                                emacs or vi, for example.</p>
                              <p><br>
                              </p>
                              <p>However, when OpenSIPS is running I can
                                not.  The editor tells me that the file
                                is read only Why? How to solve this? Any
                                configuration?</p>
                              <p><br>
                              </p>
                              <p>Any hint will be very helpful!</p>
                              <p><br>
                              </p>
                              <p>Thanks a lot.</p>
                              <span class="HOEnZb"><font color="#888888">
                                  <p><br>
                                  </p>
                                  <p><br>
                                  </p>
                                  <p><br>
                                  </p>
                                  <p><br>
                                  </p>
                                  <div>
                                    <div name="divtagdefaultwrapper">
                                      <div><font size="2">
                                          <div>RODRIGO PIMENTA CARVALHO<br>
                                            Inatel Competence Center<br>
                                            Software<br>
                                            Ph: <a
                                              moz-do-not-send="true"
                                              href="tel:%2B55%2035%203471%209200"
                                              value="+553534719200"
                                              target="_blank">
                                              +55 35 3471 9200</a> RAMAL
                                            979<br>
                                          </div>
                                        </font></div>
                                    </div>
                                  </div>
                                </font></span></div>
                          </div>
                          <br>
_______________________________________________<br>
                          Users mailing list<br>
                          <a moz-do-not-send="true"
                            href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
                          <a moz-do-not-send="true"
                            href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                            rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
                          <br>
                        </blockquote>
                      </div>
                      <br>
                    </div>
                  </div>
                </div>
              </div>
              <br>
              <fieldset class="mimeAttachmentHeader"></fieldset>
              <br>
              <pre>_______________________________________________
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>
          </div>
        </div>
      </div>
      <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>