<div dir="ltr">Hi Daniel,<div><br></div><div>I have shared the logs at debug=3 level. Location: <a href="https://justpaste.it/6xmum">https://justpaste.it/6xmum</a></div><div> I do see the sst and dialog module are loaded at startup and Even that the sst module sees the Session-Expires value. But somehow the dialog module doesn't seem to recognize it.</div><div><br></div><div>Please see the excerpts from the log below:</div><div>Mar 23 15:14:39 CPaaSVM kamailio: 1(4248) DEBUG: {1 1 INVITE <a href="mailto:1-5214@172.27.44.121" target="_blank">1-5214@172.27.44.121</a>} sst [sst_handlers.c:668]: ki_sst_check_min(): Session-Expires: 200; MIN-SE: 100<br>Mar 23 15:14:39 CPaaSVM kamailio: 1(4248) DEBUG: {1 1 INVITE <a href="mailto:1-5214@172.27.44.121" target="_blank">1-5214@172.27.44.121</a>} sst [sst_handlers.c:692]: ki_sst_check_min(): Done returning false (-1)<br></div><div>............ </div><div>............. </div><div>Mar 23 15:14:39 CPaaSVM kamailio: 1(4248) DEBUG: {1 1 INVITE <a href="mailto:1-5214@172.27.44.121" target="_blank">1-5214@172.27.44.121</a>} dialog [dlg_handlers.c:681]: get_dlg_timeout(): invalid AVP value, using default timeout<br></div><div><br></div><div>Can you please take a look? </div><div><br></div><div>Regards,</div><div>Harneet </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 23, 2020 at 3:42 PM harneet singh <<a href="mailto:hbilling@gmail.com">hbilling@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Daniel,<div><br></div><div>I have attached here the logs at debug=3 level. I do see the sst and dialog module are loaded at startup and Even that the sst module sees the Session-Expires value. But somehow the dialog module doesn't seem to recognize it.</div><div><br></div><div>Please see the excerpts from the log below:</div><div>Mar 23 15:14:39 CPaaSVM kamailio: 1(4248) DEBUG: {1 1 INVITE <a href="mailto:1-5214@172.27.44.121" target="_blank">1-5214@172.27.44.121</a>} sst [sst_handlers.c:668]: ki_sst_check_min(): Session-Expires: 200; MIN-SE: 100<br>Mar 23 15:14:39 CPaaSVM kamailio: 1(4248) DEBUG: {1 1 INVITE <a href="mailto:1-5214@172.27.44.121" target="_blank">1-5214@172.27.44.121</a>} sst [sst_handlers.c:692]: ki_sst_check_min(): Done returning false (-1)<br></div><div>............ </div><div>............. </div><div>Mar 23 15:14:39 CPaaSVM kamailio: 1(4248) DEBUG: {1 1 INVITE <a href="mailto:1-5214@172.27.44.121" target="_blank">1-5214@172.27.44.121</a>} dialog [dlg_handlers.c:681]: get_dlg_timeout(): invalid AVP value, using default timeout<br></div><div><br></div><div>Can you please take a look?</div><div><br></div><div>Regards,</div><div>Harneet </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 23, 2020 at 3:02 PM Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div>
    <p>Hello,</p>
    <p>also check if code from sst module is executing when processing
      the dialog. Maybe the callback functions from sst are not called
      when dialog is handling the sip traffic. You should run with
      debug=3 and look at the debug messages to see if there are some
      printed from sst module. Watch also for other error or warning log
      messages, they may indicate that some processing could not be
      done.</p>
    <p>Eventually you can make the debug messages (from kamailio start
      to processing of the dialog) available somewhere online (e.g.,
      pastebin) so we can look at them and analyze.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div>On 22.03.20 15:23, Daniel-Constantin
      Mierla wrote:<br>
    </div>
    <blockquote type="cite">
      
      <p>Hello,</p>
      <p>ah, ok, I misunderstood.</p>
      <p>Is the INVITE received with the header Session-Expires?</p>
      <p>And remove the line:</p>
      <p>#!define DLG_TIMEOUT_AVP "i:1"</p>
      <p>It does not replaces the token inside strings, like inside the
        last parameter of the line:</p>
      <p>modparam("dialog", "timeout_avp", "$avp(DLG_TIMEOUT_AVP)")</p>
      <p>and if you use in config expressions $avp(DLG_TIMEOUT_AVP),
        then its name is replaced. So overall it can be two avp names,
        although when reading looks like one.</p>
      <p>Cheers,<br>
        Daniel<br>
      </p>
      <div>On 22.03.20 14:40, harneet singh
        wrote:<br>
      </div>
      <blockquote type="cite">
        
        <div dir="ltr">Hi Daniel,
          <div><br>
          </div>
          <div>Thanks for the confirmation. Your point confirms the same
            as I interpreted from the documentation, that Kamailio would
            not send refresh INVITEs. I am not expecting to achieve
            that. However, if i understand correctly, Kamailio can look
            into the "Session-Expires" header from UAC/UAS and set the
            timeout_avp based on that.</div>
          <div>In effect, Kamailio should ideally <b>tear down the call
              (Send a BYE to UAC and UAS)</b>, if it doesn't see any
            signalling(may it be session-refresh INVITE/UPDATE or any
            other mid-dialog messages). This i believe can be done by
            using the SST Module in conjunction with the Dialog Module. </div>
          <div>I am also using the SST Module and the Dialog Module,
            however have the following issues.</div>
          <div><br>
          </div>
          <div>1. I am seeing the following message when sending
            Session-Expires: 200 . </div>
          <div>   ""dialog [dlg_handlers.c:681]: <b>get_dlg_timeout():
              invalid AVP value, using default timeout</b>"</div>
          <div><br>
          </div>
          <div>Not sure what is causing this. </div>
          <div><br>
          </div>
          <div>2. If i try to hardcode the session-expires to a certain
            value, the Kamailio DOES send a BYE to UAC and UAS on the
            timer expiry if no signaling seen during that time. However,
            as pointed earlier, the Dialog Load on the Kamailio DOES NOT
            go down, as shown in the last email.</div>
          <div><br>
          </div>
          <div>FWIW, here's the config snippet from the Kamailio cfg i
            am using.</div>
          <div> 
==========================================================================  <br>
          </div>
          <div>#!define <b>DLG_TIMEOUT</b>_AVP "i:1"<br>
          </div>
          <div><br>
          </div>
          <div># ----------- dialog params -----------<br>
            modparam("dialog", "send_bye", 1)<br>
            <b>modparam("dialog", "timeout_avp",
              "$avp(DLG_TIMEOUT_AVP)")</b><br>
            modparam("dialog", "dlg_flag", 5)<br>
            <br>
            # ----------- sst params -----------<br>
            modparam("sst", "enable_stats", 1)<br>
            modparam("sst", "min_se", 150)<br>
            # Set the sst modules timeout_avp to be the same value<br>
            <b>modparam("sst", "timeout_avp", "$avp(DLG_TIMEOUT_AVP)")</b><br>
            #modparam("sst", "reject_to_small", 1)<br>
            modparam("sst", "sst_flag", 6)<br>
          </div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div>request_route {</div>
          <div>     ....... </div>
          <div>     ....... </div>
          <div>    # account only INVITEs</div>
          if (is_method("INVITE")) {<br>
                          setflag(FLT_ACC); # do accounting<br>
                          <br>
                          setflag(5); # set the dialog flag<br>
                          setflag(6); # Set the sst flag<br>
                          $dlg_ctx(timeout_bye)=1;<br>
          <br>
                          if (sstCheckMin("1")) {<br>
                             xlog("L_ERR", "422 Session Timer Too Small
          reply sent.\n");<br>
                             exit;<br>
                          }<br>
          <br>
          }
          <div> .....</div>
          <div>......</div>
          <div>}</div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div>==========================================================================<br>
            <div><br>
            </div>
            <div>From the SST documentation, it pretty much seems like
              the only config to do. Am I missing something. If you have
              a working config for the Kamailio tuned in this manner
              using the SST and Dialog Module, could you share the same?</div>
            <div>Any pointers to make it work are most welcome. </div>
            <div><br>
            </div>
            <div>Regards,</div>
            <div>Harneet</div>
            <div><br>
            </div>
            <div><br>
            </div>
          </div>
        </div>
        <br>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">On Sun, Mar 22, 2020 at 3:01
            PM Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>>
            wrote:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
            <div>
              <p>Hello,</p>
              <p>are you looking for Kamailio to send re-INVITEs? If
                yes, that is not available as a feature of dialog
                module.</p>
              <p>Cheers,<br>
                Daniel<br>
              </p>
              <div>On 21.03.20 10:39, harneet singh wrote:<br>
              </div>
              <blockquote type="cite">
                <div dir="ltr">Hi,
                  <div><br>
                  </div>
                  <div>I am fairly new to Kamailio and had a question
                    regarding how to use Kamailio to enable Session
                    refresh functionality when Kamailio is acting as Sip
                    Stateful Proxy. </div>
                  <div>Kamailio Version used: <b>5.3.2</b> with <b>Call
                      Load based routing</b> using the <b>dispatcher </b>module.</div>
                  <div><br>
                  </div>
                  <div><br>
                  </div>
                  <div>* From what i understand from the documentation,
                    Kamailio will probably not be acting as a session
                    refresher, but Kamailio can tear down the call in
                    case session refresh is negotiated, between the
                    caller and the callee(via Kamailio Sip Proxy), and
                    no message exchange happens in the duration set in
                    Session-Expires header. <b>Is my
                      understanding correct?</b></div>
                  <div><b><br>
                    </b></div>
                  <div><b>* </b>I believe the above functionality is
                    possible by using the <b>sst</b> and <b>dialog</b>
                    module. I have set the same according to the
                    documentation but I keep getting the
                    following error:</div>
                  <div>"dialog [dlg_handlers.c:681]: <b>get_dlg_timeout():
                      invalid AVP value, using default timeout</b>"</div>
                  <div>Can someone share a working example?</div>
                  <div><br>
                  </div>
                  <div>* When i tried hardcoding the timeout value by
                    setting the timeout_avp to a specific value,
                    Kamailio did sense a timeout and hence sent a BYE
                    towards the caller and the Callee side both(which is
                    what the requirement is), however, i do see the <b>dialog
                      is still not cleared</b> in the "kamcmd
                    dispatcher.list". Output excerpt below for
                    reference:</div>
                  <div><br>
                  </div>
                  <div>[root@CPaaSVM ~]# kamcmd dispatcher.list<br>
                    {<br>
                            NRSETS: 1<br>
                            RECORDS: {<br>
                                    SET: {<br>
                                            ID: 1<br>
                                            TARGETS: {<br>
                                                    DEST: {<br>
                                                            URI: <a>sip:172.27.44.121:5080;transport=tcp</a><br>
                                                            FLAGS: AP<br>
                                                            PRIORITY: 0<br>
                                                            ATTRS: {<br>
                                                                   
                    BODY: duid=sample-cas;maxload=1000<br>
                                                                   
                    DUID: sample-cas<br>
                                                                   
                    MAXLOAD: 1000<br>
                                                                   
                    WEIGHT: 0<br>
                                                                   
                    RWEIGHT: 0<br>
                                                                   
                    SOCKET:<br>
                                                            }<br>
                                                            LATENCY: {<br>
                                                                    AVG:
                    111.304000<br>
                                                                    STD:
                    1042.193000<br>
                                                                    EST:
                    2.385000<br>
                                                                    MAX:
                    9999<br>
                                                                   
                    TIMEOUT: 1<br>
                                                            }<br>
                                                            RUNTIME: {<br>
                                                                    <font color="#ff0000">DLGLOAD: <b>1</b></font><br>
                                                            }<br>
                                                    }<br>
                                            }<br>
                                    }<br>
                            }<br>
                    }<br>
                  </div>
                  <div><br>
                  </div>
                  <div>It is noteworthy that in case the BYE is
                    initiated by either the caller or the callee, the
                    dialog is cleared properly and the DLGLOAD is set to
                    0 on call termination. </div>
                  <div><br>
                  </div>
                  <div>Any pointers for the above questions would be
                    highly appreciated. </div>
                  <div><br>
                  </div>
                  <div>Regards,</div>
                  <div>Harneet</div>
                  <div>
                    <div><br>
                    </div>
                    -- <br>
                    <div dir="ltr">"Once you eliminate the impossible,
                      whatever remains, no matter how improbable, must
                      be the truth" - Sir Arthur Conan Doyle<br>
                    </div>
                  </div>
                </div>
                <br>
                <fieldset></fieldset>
                <pre>_______________________________________________
Kamailio (SER) - Users Mailing List
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
              </blockquote>
              <pre cols="72">-- 
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a></pre>
            </div>
          </blockquote>
        </div>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div dir="ltr">"Once you eliminate the
          impossible, whatever remains, no matter how improbable, must
          be the truth" - Sir Arthur Conan Doyle<br>
        </div>
      </blockquote>
      <pre cols="72">-- 
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a></pre>
    </blockquote>
    <pre cols="72">-- 
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a></pre>
  </div>

</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr">"Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth" - Sir Arthur Conan Doyle<br></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">"Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth" - Sir Arthur Conan Doyle<br></div>