<div dir="ltr">Hi All,<div><br></div><div>I am facing an issue in understanding how the min_se should be working in kamailio. As per the SST documentation, it seems like if the min_se is configured as 500, then any value of Session-Expires OR MIN-SE if lower than 500, can be responded to by a 422.</div><div>However, I strangely see the reverse happening. To investigate further, I looked in to the ki_sst_check_min() code in the master, and these seems like a potential issue.</div><div><br></div><div>Ref Code: Inside ki_sst_check_min(), there is an if condition like below:</div><div><br></div><div><span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre">if</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre"> (sst_min_se < </span><span class="gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre">MIN</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre">(minse, se.</span><span class="gmail-pl-smi" style="box-sizing:border-box;color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre">interval</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre">)) {</span> </div><div><br></div><div>However, shouldn't it be the other way around? ie </div><div><span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre">if</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre"> (sst_min_se > </span><span class="gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre">MIN</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre">(minse, se.</span><span class="gmail-pl-smi" style="box-sizing:border-box;color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre">interval</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre">)) {</span> <br></div><div><br></div><div>because we need to send 422 if the received value(in INVITE etc) is smaller than the sst configure min_se value? </div><div>I also found a different documentation, at <a href="https://git.sgu.ru/oldssu/ex-opensips/blob/cb9df8d59dbb254a9d862569fd5d11f6656c597d/modules/sst/sst_handlers.c">https://git.sgu.ru/oldssu/ex-opensips/blob/cb9df8d59dbb254a9d862569fd5d11f6656c597d/modules/sst/sst_handlers.c</a> where the check is as below?</div><div><span class="gmail-kwd" style="box-sizing:border-box;color:rgb(0,0,136);font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;white-space:pre">if</span><span class="gmail-pln" style="box-sizing:border-box;color:rgb(0,0,0);font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;white-space:pre"> </span><span class="gmail-pun" style="box-sizing:border-box;color:rgb(102,102,0);font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;white-space:pre">(</span><span class="gmail-pln" style="box-sizing:border-box;color:rgb(0,0,0);font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;white-space:pre">sst_min_se </span><span class="gmail-pun" style="box-sizing:border-box;color:rgb(102,102,0);font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;white-space:pre">></span><span class="gmail-pln" style="box-sizing:border-box;color:rgb(0,0,0);font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;white-space:pre"> MIN</span><span class="gmail-pun" style="box-sizing:border-box;color:rgb(102,102,0);font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;white-space:pre">(</span><span class="gmail-pln" style="box-sizing:border-box;color:rgb(0,0,0);font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;white-space:pre">minse</span><span class="gmail-pun" style="box-sizing:border-box;color:rgb(102,102,0);font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;white-space:pre">,</span><span class="gmail-pln" style="box-sizing:border-box;color:rgb(0,0,0);font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;white-space:pre"> se</span><span class="gmail-pun" style="box-sizing:border-box;color:rgb(102,102,0);font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;white-space:pre">.</span><span class="gmail-pln" style="box-sizing:border-box;color:rgb(0,0,0);font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;white-space:pre">interval</span><span class="gmail-pun" style="box-sizing:border-box;color:rgb(102,102,0);font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;white-space:pre">))</span><span class="gmail-pln" style="box-sizing:border-box;color:rgb(0,0,0);font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;white-space:pre"> </span><span class="gmail-pun" style="box-sizing:border-box;color:rgb(102,102,0);font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;white-space:pre">{</span> </div><div><br></div><div>Can someone confirm if this is broken, or my understanding is incorrect?</div><div><br></div><div>Regards,</div><div>Harneet <br></div><div> <br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">"Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth" - Sir Arthur Conan Doyle<br></div></div></div>