<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix"><tt>Hi, Jayesh!<br>
        <br>
        How did you get from </tt><tt>opensipsctl to uac_cancel.sh?
        Where do you see this (23430) output? Are you sure it is not
        used just for debugging? I think it just prints the PID of the
        process.<br>
        <br>
        Best regards,<br>
      </tt>
      <pre class="moz-signature" cols="72">Răzvan Crainea
OpenSIPS Solutions
<a class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a></pre>
      On 09/09/2014 06:11 PM, Jayesh Nambiar wrote:<br>
    </div>
    <blockquote
cite="mid:CANAYozs6cotc=3ysV5mh2goxMfdNstqo7QkrmTaB4prLbn34bQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div>When I use exec_avp opensips hangs. There's no core
                  generated, and following are the logs immediately
                  after the command is executed:<br>
                  Sep  9 10:17:48 v38
                  /usr/local/myOpensips/sbin/opensips[24843]:
                  DBG:exec:w_exec_avp: executing
                  [/usr/local/myOpensips/etc/opensips/uac_cancel.sh '.<a
                    moz-do-not-send="true"
                    href="http://56sqM.YAwbUId0odDVrte3d6PZqa.de">56sqM.YAwbUId0odDVrte3d6PZqa.de</a>'
                  '14654']<br>
                  Sep  9 10:17:48 v38
                  /usr/local/myOpensips/sbin/opensips[24843]:
                  DBG:exec:exec_avp: Forked pid 24879<br>
                  Sep  9 10:18:00 v38
                  /usr/local/myOpensips/sbin/opensips[24835]:
                  DBG:mi_fifo:mi_parse_tree: adding node &lt;&gt; ; val
                  &lt;.<a moz-do-not-send="true"
                    href="http://56sqM.YAwbUId0odDVrte3d6PZqa.de">56sqM.YAwbUId0odDVrte3d6PZqa.de</a>&gt;<br>
                  Sep  9 10:18:00 v38
                  /usr/local/myOpensips/sbin/opensips[24835]:
                  DBG:mi_fifo:mi_parse_tree: adding node &lt;&gt; ; val
                  &lt;14654&gt;<br>
                  Sep  9 10:18:00 v38
                  /usr/local/myOpensips/sbin/opensips[24835]:
                  DBG:mi_fifo:mi_parse_node: end of input tree<br>
                  Sep  9 10:18:00 v38
                  /usr/local/myOpensips/sbin/opensips[24835]:
                  DBG:mi_fifo:mi_fifo_server: done parsing the mi tree<br>
                  Sep  9 10:18:00 v38
                  /usr/local/myOpensips/sbin/opensips[24835]:
                  DBG:tm:t_lookup_callid: created comparable call_id
                  header field: &gt;Call-ID: .<a moz-do-not-send="true"
href="http://56sqM.YAwbUId0odDVrte3d6PZqa.de#015#012">56sqM.YAwbUId0odDVrte3d6PZqa.de#015#012</a>&lt;<br>
                  Sep  9 10:18:00 v38
                  /usr/local/myOpensips/sbin/opensips[24835]:
                  DBG:tm:t_lookup_callid: created comparable cseq header
                  field: &gt;CSeq: 14654 INVITE&lt;<br>
                  Sep  9 10:18:00 v38
                  /usr/local/myOpensips/sbin/opensips[24835]:
                  DBG:tm:t_lookup_callid:  &lt;Call-ID: .<a
                    moz-do-not-send="true"
                    href="http://56sqM.YAwbUId0odDVrte3d6PZqa.de#015#012">56sqM.YAwbUId0odDVrte3d6PZqa.de#015#012</a>&gt; 
                  &lt;CSeq: 14654&gt;<br>
                  Sep  9 10:18:00 v38
                  /usr/local/myOpensips/sbin/opensips[24835]:
                  DBG:tm:t_lookup_callid: we have a match:
                  callid=&gt;&gt;Call-ID: .<a moz-do-not-send="true"
                    href="http://56sqM.YAwbUId0odDVrte3d6PZqa.de#015#012">56sqM.YAwbUId0odDVrte3d6PZqa.de#015#012</a>&lt;&lt;
                  cseq=&gt;&gt;CSeq: 14654&lt;&lt;<br>
                  Sep  9 10:18:00 v38
                  /usr/local/myOpensips/sbin/opensips[24835]:
                  DBG:tm:t_lookup_callid: REF_UNSAFE:[0x7f449a0cbb00]
                  after is 1<br>
                  Sep  9 10:18:00 v38
                  /usr/local/myOpensips/sbin/opensips[24835]:
                  DBG:tm:t_lookup_callid: transaction found.<br>
                  Sep  9 10:18:00 v38
                  /usr/local/myOpensips/sbin/opensips[24835]:
                  DBG:tm:mi_tm_cancel: cancelling transaction
                  0x7f449a0cbb00<br>
                  Sep  9 10:18:00 v38
                  /usr/local/myOpensips/sbin/opensips[24835]:
                  DBG:tm:build_local: using FROM=&lt;From: "Jayesh
                  Nambiar" &lt;<a moz-do-not-send="true"
                    href="mailto:sip%3A1003040@198.24.63.38">sip:1003040@198.24.63.38</a>&gt;;tag=NPD-XIL90Z6yNzrktn-IZWpOgnzcJ6EZ#015#012&gt;,
                  TO=&lt;To: &lt;<a moz-do-not-send="true"
                    href="mailto:sip%3A1003030@198.24.63.38">sip:1003030@198.24.63.38</a>&gt;#015#012&gt;,
                  CSEQ_N=&lt;CSeq: 14654&gt;<br>
                  Sep  9 10:18:00 v38
                  /usr/local/myOpensips/sbin/opensips[24835]:
                  DBG:tm:cancel_branch: sending cancel...<br>
                  Sep  9 10:18:00 v38
                  /usr/local/myOpensips/sbin/opensips[24835]:
                  DBG:tm:set_timer: relative timeout is 500000<br>
                  Sep  9 10:18:00 v38
                  /usr/local/myOpensips/sbin/opensips[24835]:
                  DBG:tm:insert_timer_unsafe: [4]: 0x7f449a0cbde8
                  (173300000)<br>
                  Sep  9 10:18:00 v38
                  /usr/local/myOpensips/sbin/opensips[24835]:
                  DBG:tm:insert_timer_unsafe: [0]: 0x7f449a0cbe18 (212)<br>
                  Sep  9 10:18:00 v38
                  /usr/local/myOpensips/sbin/opensips[24835]:
                  DBG:tm:mi_tm_cancel: UNREF_UNSAFE: [0x7f449a0cbb00]
                  after is 0<br>
                  <br>
                </div>
                Also when I use exec_msg, the opensips doesn't hang and
                looks like it works as expected. Although while using
                exec_msg function, it adds an additional parameter when
                executing the command at the end in a parentheses. For
                eg: my function is:<br>
                exec_msg("/usr/local/myOpensips/sbin/opensipsctl fifo
                t_uac_cancel $avp(caller_cid) $avp(caller_cseq)");<br>
                <br>
              </div>
              In the debug it shows command executed as:<br>
              /usr/local/myOpensips/etc/opensips/uac_cancel.sh
              btf4RC2Z8tBlpG6eAG-hZK4cZxENCEud 8222 (23430)<br>
              <br>
            </div>
            I'm not sure what (23430) is in the above command because of
            which most likely the t_uac_cancel fails. Because If I run
            this command directly it gives me syntax error:<br>
            -bash: syntax error near unexpected token `('<br>
            <br>
          </div>
          I dont even have an option to single quote that parameter as
          it comes automatically when the function is executed.<br>
          <br>
        </div>
        --- Jayesh<br>
        <div>
          <div>
            <div><br>
            </div>
          </div>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Tue, Sep 9, 2014 at 8:22 PM, Răzvan
          Crainea <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:razvan@opensips.org" target="_blank">razvan@opensips.org</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000">
              <div><tt>Hi, Jayesh!<br>
                  <br>
                  Do you see any cores generated? Is there anything
                  logged by your MI command?<br>
                  <br>
                  Best regards,<br>
                </tt><span class="">
                  <pre cols="72">Răzvan Crainea
OpenSIPS Solutions
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">www.opensips-solutions.com</a></pre>
                </span>
                <div>
                  <div class="h5"> On 09/09/2014 05:27 PM, Jayesh
                    Nambiar wrote:<br>
                  </div>
                </div>
              </div>
              <div>
                <div class="h5">
                  <blockquote type="cite">
                    <div dir="ltr">
                      <div>
                        <div>
                          <div>Hello Razvan,<br>
                          </div>
                          I extracted the source
                          opensips-1.11.2-4c08b62_src.tar.gz created on
                          Sept 7th and tried again. This time, as soon
                          as the exec_avp command is fired, the opensips
                          stops processing anything after that. The
                          service doesn't even stop when tried to stop
                          cleanly. It just hangs. After a minute or so,
                          it shuts down with the following in the logs:<br>
                          Sep  9 10:23:17 v38
                          /usr/local/myOpensips/sbin/opensips[24832]:
                          DBG:core:pool_remove: connection still kept in
                          the pool<br>
                          Sep  9 10:23:17 v38
                          /usr/local/myOpensips/sbin/opensips[24832]:
                          DBG:core:pool_remove: removing connection from
                          the pool<br>
                          <br>
                          Sep  9 10:23:17 v38
                          /usr/local/myOpensips/sbin/opensips[24832]:
                          DBG:core:pool_remove: removing connection from
                          the pool<br>
                          Sep  9 10:24:17 v38
                          /usr/local/myOpensips/sbin/opensips[24832]:
                          CRITICAL:core:sig_alarm_abort: BUG - shutdown
                          timeout triggered, dying...<br>
                          Sep  9 10:24:17 v38 kernel: [24880095.291228]
                          device eth0 left promiscuous mode<br>
                          <br>
                        </div>
                        Should I try with an older stable version
                        instead?? I think there is something wrong with
                        the way this is going. Let me know if I can be
                        of any help to troubleshoot this further.<br>
                        <br>
                        Thanks,<br>
                        <br>
                      </div>
                      --- Jayesh<br>
                    </div>
                    <div class="gmail_extra"><br>
                      <div class="gmail_quote">On Tue, Sep 9, 2014 at
                        7:19 PM, Răzvan Crainea <span dir="ltr">&lt;<a
                            moz-do-not-send="true"
                            href="mailto:razvan@opensips.org"
                            target="_blank">razvan@opensips.org</a>&gt;</span>
                        wrote:<br>
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex">
                          <div bgcolor="#FFFFFF" text="#000000">
                            <div><tt>Can you please update your sources?
                              </tt><tt>Bogdan made a fix</tt><tt> </tt><tt>on
                                24</tt><tt>th of A</tt><tt>ugust </tt><tt>that
                                might be related to this.</tt><span><tt><br>
                                </tt><tt><br>
                                </tt><tt>Best regards,</tt><br>
                                <pre cols="72">Răzvan Crainea
OpenSIPS Solutions
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">www.opensips-solutions.com</a></pre>
                              </span>
                              <div>
                                <div> On 09/09/2014 04:42 PM, Jayesh
                                  Nambiar wrote:<br>
                                </div>
                              </div>
                            </div>
                            <div>
                              <div>
                                <blockquote type="cite">
                                  <div dir="ltr">
                                    <div>
                                      <div>Hello Razvan,<br>
                                        I am running 1.11.2 extracted
                                        from the following source file:<br>
opensips-1.11.2-4fda9a1_src.tar.gz<br>
                                        <br>
                                      </div>
                                      <div>A little more background on
                                        the problem:<br>
                                      </div>
                                      <div>The caller is connected on
                                        TCP and relayed over UDP. The
                                        transaction that I am trying to
                                        cancel is an UDP transaction. I
                                        dont believe this should have
                                        any concern with the problem I'm
                                        facing but still mentioning.
                                        Basically I want to cancel this
                                        transaction, get the caller into
                                        the failure route and relay it
                                        to a different destination !!<br>
                                        <br>
                                        Thanks for the prompt replies.<br>
                                      </div>
                                      <br>
                                    </div>
                                    --- Jayesh<br>
                                  </div>
                                  <div class="gmail_extra"><br>
                                    <div class="gmail_quote">On Tue, Sep
                                      9, 2014 at 7:07 PM, Răzvan Crainea
                                      <span dir="ltr">&lt;<a
                                          moz-do-not-send="true"
                                          href="mailto:razvan@opensips.org"
                                          target="_blank">razvan@opensips.org</a>&gt;</span>
                                      wrote:<br>
                                      <blockquote class="gmail_quote"
                                        style="margin:0 0 0
                                        .8ex;border-left:1px #ccc
                                        solid;padding-left:1ex">
                                        <div bgcolor="#FFFFFF"
                                          text="#000000">
                                          <div><tt>Hi, Jayesh!<br>
                                              <br>
                                              No, it should not be
                                              present. It is created by
                                              opensipsctl when a command
                                              is issued. What version of
                                              OpenSIPS are you running?<br>
                                              <br>
                                              Best regards,<br>
                                            </tt><span>
                                              <pre cols="72">Răzvan Crainea
OpenSIPS Solutions
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">www.opensips-solutions.com</a></pre>
                                            </span>
                                            <div>
                                              <div> On 09/09/2014 04:30
                                                PM, Jayesh Nambiar
                                                wrote:<br>
                                              </div>
                                            </div>
                                          </div>
                                          <div>
                                            <div>
                                              <blockquote type="cite">
                                                <div dir="ltr">
                                                  <div>
                                                    <div>Hi,<br>
                                                    </div>
                                                    Just as an update, I
                                                    only see
                                                    opensips_fifo in the
                                                    /tmp/ directory. Is
                                                    the
                                                    opensips_receiver
                                                    supposed to be
                                                    present??<br>
                                                    <br>
                                                  </div>
                                                  --- Jayesh<br>
                                                </div>
                                                <div class="gmail_extra"><br>
                                                  <div
                                                    class="gmail_quote">On
                                                    Tue, Sep 9, 2014 at
                                                    6:49 PM, Jayesh
                                                    Nambiar <span
                                                      dir="ltr">&lt;<a
                                                        moz-do-not-send="true"
href="mailto:jayesh1017@gmail.com" target="_blank">jayesh1017@gmail.com</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>Yes,
                                                          running
                                                          opensips with
                                                          user root.
                                                          Still the same
                                                          problem.<span><font
color="#888888"><br>
                                                          <br>
                                                          </font></span></div>
                                                        <span><font
                                                          color="#888888">---

                                                          Jayesh<br>
                                                          </font></span></div>
                                                      <div>
                                                        <div>
                                                          <div
                                                          class="gmail_extra"><br>
                                                          <div
                                                          class="gmail_quote">On

                                                          Tue, Sep 9,
                                                          2014 at 6:22
                                                          PM, Răzvan
                                                          Crainea <span
                                                          dir="ltr">&lt;<a
moz-do-not-send="true" href="mailto:razvan@opensips.org" target="_blank">razvan@opensips.org</a>&gt;</span>
                                                          wrote:<br>
                                                          <blockquote
                                                          class="gmail_quote"
                                                          style="margin:0
                                                          0 0
                                                          .8ex;border-left:1px
                                                          #ccc
                                                          solid;padding-left:1ex">
                                                          <div
                                                          bgcolor="#FFFFFF"
                                                          text="#000000">
                                                          <div><tt>Hi,
                                                          Jayesh!<br>
                                                          <br>
                                                          I think there
                                                          is a
                                                          permissions
                                                          issue here.
                                                          What is the
                                                          user you are
                                                          running
                                                          opensips with?
                                                          Is it the same
                                                          as the one you
                                                          are trying to
                                                          execute the
                                                          shell script?<br>
                                                          <br>
                                                          Best regards,<br>
                                                          </tt>
                                                          <pre cols="72">Răzvan Crainea
OpenSIPS Solutions
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">www.opensips-solutions.com</a></pre>
                                                          <div>
                                                          <div> On
                                                          09/09/2014
                                                          03:44 PM,
                                                          Jayesh Nambiar
                                                          wrote:<br>
                                                          </div>
                                                          </div>
                                                          </div>
                                                          <blockquote
                                                          type="cite">
                                                          <div>
                                                          <div>
                                                          <div dir="ltr">
                                                          <div>
                                                          <div>
                                                          <div>
                                                          <div>
                                                          <div>
                                                          <div>Hello,<br>
                                                          </div>
                                                          I try to
                                                          cancel a
                                                          running
                                                          transaction in
                                                          opensips based
                                                          on certain
                                                          conditions.
                                                          When I try
                                                          this from the
                                                          script:<br>
                                                          </div>
                                                          exec_avp("/usr/local/myOpensips/sbin/opensipsctl



                                                          fifo
                                                          t_uac_cancel
                                                          $avp(caller_cid)
$avp(caller_cseq)",
"$avp(result)");<br>
                                                          </div>
                                                          <div>The
                                                          callid and
                                                          cseq is
                                                          properly
                                                          substituted in
                                                          the
                                                          appropriate
                                                          AVPs.<br>
                                                          </div>
                                                          I get, **
                                                          ERROR: error
                                                          opening read
                                                          fifo
                                                          /tmp/opensips_receiver_24405
                                                          in the
                                                          resulting AVP.
                                                          Whereas when I
                                                          run this
                                                          command
                                                          directly from
                                                          my shell it
                                                          runs fine and
                                                          cancels the
                                                          transaction as
                                                          expected.<br>
                                                          </div>
                                                          Tried to
                                                          google around
                                                          the problem
                                                          and couldn't
                                                          find much. I
                                                          read about
                                                          some selinux
                                                          thing that
                                                          might block
                                                          opensips from
                                                          executing the
                                                          MI command,
                                                          but I'm pretty
                                                          sure selinux
                                                          is disabled on
                                                          my machine.
                                                          Where else do
                                                          I look for a
                                                          fix such that
                                                          my script is
                                                          able to
                                                          execute this
                                                          !!<br>
                                                          <br>
                                                          </div>
                                                          Thanks in
                                                          advance for
                                                          any pointers.<br>
                                                          <br>
                                                          </div>
                                                          --- Jayesh<br>
                                                          </div>
                                                          <br>
                                                          <fieldset></fieldset>
                                                          <br>
                                                          </div>
                                                          </div>
                                                          <pre>_______________________________________________
Users mailing list
<a moz-do-not-send="true" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a moz-do-not-send="true" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
                                                          </blockquote>
                                                          <br>
                                                          </div>
                                                          <br>
_______________________________________________<br>
                                                          Users mailing
                                                          list<br>
                                                          <a
                                                          moz-do-not-send="true"
href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
                                                          <a
                                                          moz-do-not-send="true"
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                                                          target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
                                                          <br>
                                                          </blockquote>
                                                          </div>
                                                          <br>
                                                          </div>
                                                        </div>
                                                      </div>
                                                    </blockquote>
                                                  </div>
                                                  <br>
                                                </div>
                                                <br>
                                                <fieldset></fieldset>
                                                <br>
                                                <pre>_______________________________________________
Users mailing list
<a moz-do-not-send="true" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a moz-do-not-send="true" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
                                              </blockquote>
                                              <br>
                                            </div>
                                          </div>
                                        </div>
                                        <br>
_______________________________________________<br>
                                        Users mailing list<br>
                                        <a moz-do-not-send="true"
                                          href="mailto:Users@lists.opensips.org"
                                          target="_blank">Users@lists.opensips.org</a><br>
                                        <a moz-do-not-send="true"
                                          href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                                          target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
                                        <br>
                                      </blockquote>
                                    </div>
                                    <br>
                                  </div>
                                  <br>
                                  <fieldset></fieldset>
                                  <br>
                                  <pre>_______________________________________________
Users mailing list
<a moz-do-not-send="true" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a moz-do-not-send="true" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
                                </blockquote>
                                <br>
                              </div>
                            </div>
                          </div>
                          <br>
_______________________________________________<br>
                          Users mailing list<br>
                          <a moz-do-not-send="true"
                            href="mailto:Users@lists.opensips.org"
                            target="_blank">Users@lists.opensips.org</a><br>
                          <a moz-do-not-send="true"
                            href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                            target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
                          <br>
                        </blockquote>
                      </div>
                      <br>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                    <pre>_______________________________________________
Users mailing list
<a moz-do-not-send="true" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a moz-do-not-send="true" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
                  </blockquote>
                  <br>
                </div>
              </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"
              target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </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>