<div dir="ltr">Hi Daniel,<div><br><div>I am observing a behavior after we have started fetching the Session-Expires Header Value from the initial INVITE.</div><div><br></div><div>1. If the 200 OK(to the initial INVITE) from the UAS contains a lesser value of Session-Expires, than the one advertised in the initial INVITE, the session termination(by SST/Dialog Module) in case no refresh INVITE is sent, happens at the value sent in the Initial INVITE only. ie. a lower Session-Expires value in 200OK does not seem to be taking effect. </div><div>2. If the subsequent in-dialog INVITEs contain a different(lower) Session refresh value, than the one advertised in the initial INVITE, the $avp(..) seems to be getting updated, but the session termination still happens at the end of initial INVITE;s Session Expires value.</div><div><br></div><div>Is this as per implementation, or should the timeout be updated based on the 200OK response and other in-dialog REINVITEs as well?</div><div><br></div><div>Regards,</div><div>Harneet Singh  </div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 27, 2020 at 10:34 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">Thanks Daniel/Bastian.<div><br></div><div>The change suggested works for me. :)</div><div><br></div><div>Regards,</div><div>Harneet</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 27, 2020 at 1:28 PM Bastian Triller <<a href="mailto:bastian.triller@gmail.com" target="_blank">bastian.triller@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="auto"><div><pre style="white-space:pre-wrap">$(hdr(Session-Expires){s.select,0,;}{<a href="http://s.int/" target="_blank">s.int</a>})</pre><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 27, 2020, 04:56 harneet singh <<a href="mailto:hbilling@gmail.com" target="_blank">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>The following code works if the Session-Expires comes WITHOUTa refresher parameter.</div><div><pre style="white-space:pre-wrap;color:rgb(0,0,0)">if(is_present_hf("Session-Expires")) {

   $avp(...) = $(hdr(Session-Expires){<a href="http://s.int" rel="noreferrer" target="_blank">s.int</a>});

}</pre>If however, The session expires comes like below, there is an error in parsing </div><div>Session-Expires: 200;refresher=uac</div><div><br></div><div>Is there a way we can fetch just the value, ignoring the refresher parameter? I believe the refresher parameter is not required to be picked up from the INVITE by Kamailio for the working of SST Module. </div><div><br></div><div>Regards,</div><div>Harneet Singh</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 24, 2020 at 7:11 PM Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com" rel="noreferrer" 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>probably you can use an htable to store that the ds_load_remove()
      was called for a specific call id, but we can make that error log
      message to debug level, there can be cross BYEs at the end of a
      call resulting in same situation.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div>On 24.03.20 13:55, harneet singh wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">Thanks Daniel,
        <div><br>
        </div>
        <div>Your suggestion was very helpful. I am now able to see the
          dialog load go down on Dispatcher as expected in case of
          session expiry. </div>
        <div>Just an extra error log is what I keep getting per
          occurrence. I believe the reason for this is that the
          event_route[tm:local-request] will be called twice per call
          since BYE is sent to two sides. </div>
        <div><br>
        </div>
        <div>The log is :</div>
        <div>Mar 24 17:23:59 CPaaSVM kamailio: 25(7499) DEBUG: sst
          [sst_handlers.c:405]: sst_dialog_terminate_CB(): Terminating
          DID 0x7fd847a50340 session<br>
          Mar 24 17:23:59 CPaaSVM kamailio: 25(7499) DEBUG: sst
          [sst_handlers.c:412]: sst_dialog_terminate_CB(): freeing the
          sst_info_t from dialog 0x7fd847a50340<br>
          Mar 24 17:23:59 CPaaSVM kamailio: 25(7499) ALERT:
          <script>: [tm:local-request] RSYS: BYE Sent. Updating
          Load...<br>
          Mar 24 17:23:59 CPaaSVM kamailio: 25(7499) ALERT:
          <script>: [tm:local-request] RSYS: BYE Sent. Updating
          Load...<br>
          <b>Mar 24 17:23:59 CPaaSVM kamailio: 25(7499) ERROR:
            dispatcher [dispatch.c:1664]: ds_load_remove(): cannot find
            load for (<a href="mailto:3-5996@172.27.44.121" rel="noreferrer" target="_blank">3-5996@172.27.44.121</a>)</b><br>
        </div>
        <div><b><br>
          </b></div>
        <div>Is there a way I can avoid calling the ds_load_update from
          event_route[tm:local-request] by somehow figuring out that it
          has been accounted for once, for this dialog? I understand
          that the dialog event end route might be the most appropriate
          path to call this as that would probably be called once for a
          dialog, but in case you have any recommendations to circumvent
          the error code seen above?</div>
        <div><br>
        </div>
        <div>Thanks & Regards,</div>
        <div>Harneet </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Tue, Mar 24, 2020 at 4:02
          PM Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com" rel="noreferrer" 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>we have to update the docs for timeout_avp in sst module
              to reflect this behaviour.</p>
            <p>Related to the dispatcher load, try using the
              event_route[tm:local-request], inside it you can catch the
              BYE generated by Kamailio.</p>
            <p>It could be a good addition to make dispatcher decrease
              the load also from dialog end event route. I can look into
              it when I find some spare time, if nobody else wants to do
              it meanwhile.</p>
            <p>Cheers,<br>
              Daniel<br>
            </p>
            <div>On 24.03.20 10:23, harneet singh wrote:<br>
            </div>
            <blockquote type="cite">
              <div dir="ltr">Hi Daniel,
                <div><br>
                </div>
                <div>Your timely response is much appreciated. I was
                  able to fetch the Session-Expires value from the
                  INVITE's SE header, albeit with a minor modification.
                  I guess there were missing "(Double Quotes)" in the
                  argument to is_present_hf. After fixing that, things
                  worked and the Dialog Expiry is triggered at the
                  correct time, and hence the BYE is sent from Kamailio
                  to UAC and UAS as expected.</div>
                <div><br>
                </div>
                <div>
                  <p>if(is_present_hf("Session-Expires")) {</p>
                  <p>   $avp(...) = $(hdr(Session-Expires){<a href="http://s.int/" rel="noreferrer" target="_blank">s.int</a>});</p>
                  <p>}</p>
                  <p>However, there is still a concern from the earlier
                    email that is unresolved. We are using Call Load
                    Based Dispatching Algorithm(Algorithm 10) and here's
                    teh observation:</p>
                  <p>1. When a BYE is initiated by either UAC or UAS,
                    the dialog load is reduced by 1, since we call
                    ds_load_update </p>
                  <p> # Dispatcher load updation<br>
                            if (is_method("BYE|CANCEL")){<br>
                                ds_load_update();<br>
                            }<br>
                  </p>
                  <p>2. When however, the BYE is initiated by Kamailio
                    towards UAC and UAS as a result of session-Expiry,
                    the load is NOT reduced. I am looking at this
                    parameter from the output of "kamcmd
                    dispatcher.list" command. </p>
                  <p>                    RUNTIME: {<br>
                                                                   
                    DLGLOAD: 1<br>
                                                            }<br>
                  </p>
                  <p>I did go through the ds_load_update() API at<span style="color:rgb(111,66,193);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre-wrap"> </span><a href="https://github.com/kamailio/kamailio/blob/master/src/modules/dispatcher/dispatch.c" rel="noreferrer" target="_blank">https://github.com/kamailio/kamailio/blob/master/src/modules/dispatcher/dispatch.c</a> 
                    file and seems like the ds_load_remove() which
                    probably reduces the load gets called only for a BYE
                    or CANCEL that is received. Since clearing by
                    kamailio in case of Session-Expiry is done by
                    sending the BYE out of Kamailio, the load might not
                    be getting removed.</p>
                  <p>In addition to the above, I also tried adding the
                    below code where the ds_load_update() gets called
                    when the dialog ends, but still the dispatcher load
                    is not removed, despite this piece of code getting
                    called. </p>
                  <p>event_route[dialog:end] {<br>
                       xlog("L_ALERT", '[DIALOG:END] : Dialog ENDING
                    NOW....' + "\n");<br>
                       ds_load_update();<br>
                    }<br>
                  </p>
                  <p>What would be your recommend to circumvent/fix the
                    issue?</p>
                  <p>Regards,</p>
                  <p>Harneet</p>
                  <p><br>
                  </p>
                </div>
              </div>
              <br>
              <div class="gmail_quote">
                <div dir="ltr" class="gmail_attr">On Mon, Mar 23, 2020
                  at 7:21 PM Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com" rel="noreferrer" 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>looking at logs, the callback functions from sst
                      modules are for requests within dialog, not for
                      initial request. It looks like the update is
                      expected to be done when the request refreshing
                      the session is done (the reinvite), therefore for
                      initial INVITE the avp is not set.<br>
                    </p>
                    <p><br>
                      <span><span>Mar 23 15:14:39 CPaaSVM kamailio:
                          1(4248) DEBUG: {1 1 INVITE <a href="mailto:1-5214@172.27.44.121" rel="noreferrer" target="_blank">1-5214@172.27.44.121</a>}
                          sst [sst_handlers.c:988]:
                          setup_dialog_callbacks(): Adding callback
                          DLGCB_FAILED|DLGCB_TERMINATED|DLGCB_EXPIRED</span><br>
                        <span>Mar 23 15:14:39 CPaaSVM kamailio: 1(4248)
                          DEBUG: {1 1 INVITE <a href="mailto:1-5214@172.27.44.121" rel="noreferrer" target="_blank">1-5214@172.27.44.121</a>}
                          sst [sst_handlers.c:992]:
                          setup_dialog_callbacks(): Adding callback
                          DLGCB_REQ_WITHIN</span><br>
                        <span>Mar 23 15:14:39 CPaaSVM kamailio: 1(4248)
                          DEBUG: {1 1 INVITE <a href="mailto:1-5214@172.27.44.121" rel="noreferrer" target="_blank">1-5214@172.27.44.121</a>}
                          sst [sst_handlers.c:1002]:
                          setup_dialog_callbacks(): Adding callback
                          DLGCB_RESPONSE_FWDED</span><br>
                        <span>Mar 23 15:14:39 CPaaSVM kamailio: 1(4248)
                          DEBUG: {1 1 INVITE <a href="mailto:1-5214@172.27.44.121" rel="noreferrer" target="_blank">1-5214@172.27.44.121</a>}
                          sst [sst_handlers.c:1006]:
                          setup_dialog_callbacks(): Adding rpc handler</span></span></p>
                    <p>There are callbacks for the response as well, and
                      they seem to be executed, avp attempted to be set,
                      but already having the same value:<br>
                      <span></span></p>
                    <p><span>Mar 23 15:14:39 CPaaSVM kamailio: 37(4284)
                        DEBUG: {2 1 INVITE <a href="mailto:1-5214@172.27.44.121" rel="noreferrer" target="_blank">1-5214@172.27.44.121</a>}
                        sst [sst_handlers.c:520]:
                        sst_dialog_response_fwded_CB(): Dialog seen
                        REPLY 200 OK</span><br>
                      <span>Mar 23 15:14:39 CPaaSVM kamailio: 37(4284)
                        DEBUG: {2 1 INVITE <a href="mailto:1-5214@172.27.44.121" rel="noreferrer" target="_blank">1-5214@172.27.44.121</a>}
                        sst [sst_handlers.c:870]: set_timeout_avp():
                        Current timeout value already set to 200</span></p>
                    <p><span></span>A solution you can try for now would
                      be to set the avp explicitly for the first invite,
                      like:</p>
                    <p>if(is_present_hf(Session-Expires)) {</p>
                    <p>   $avp(...) = $(hdr(Session-Expires){<a href="http://s.int" rel="noreferrer" target="_blank">s.int</a>});</p>
                    <p>}</p>
                    <p>Cheers,<br>
                      Daniel<br>
                    </p>
                    <div>On 23.03.20 11:29, harneet singh wrote:<br>
                    </div>
                    <blockquote type="cite">
                      <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" rel="noreferrer" target="_blank">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" rel="noreferrer" 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" rel="noreferrer" 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" rel="noreferrer" 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" rel="noreferrer" target="_blank">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" rel="noreferrer" 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" rel="noreferrer" 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" rel="noreferrer" 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" rel="noreferrer" 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" rel="noreferrer" 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 rel="noreferrer">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" rel="noreferrer" target="_blank">sr-users@lists.kamailio.org</a>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" 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" rel="noreferrer" target="_blank">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" rel="noreferrer" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" rel="noreferrer" 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" rel="noreferrer" target="_blank">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" rel="noreferrer" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" rel="noreferrer" target="_blank">www.linkedin.com/in/miconda</a></pre>
                                </blockquote>
                                <pre cols="72">-- 
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" rel="noreferrer" target="_blank">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" rel="noreferrer" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" rel="noreferrer" 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">"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" rel="noreferrer" target="_blank">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" rel="noreferrer" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" rel="noreferrer" 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" rel="noreferrer" target="_blank">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" rel="noreferrer" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" rel="noreferrer" 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" rel="noreferrer" target="_blank">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" rel="noreferrer" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" rel="noreferrer" 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>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" rel="noreferrer" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div></div></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</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>