[OpenSIPS-Users] Session timers refreshing

Mariana Arduini marianarduini at gmail.com
Mon Nov 12 20:45:49 CET 2012


Hi Razvan!

Thanks for the reply!

If there will be no consequences for setting the avp for a UPDATE outside a
dialog, then in fact, that won´t be a problem.

Thanks again.

Mariana.


On Mon, Nov 12, 2012 at 5:32 PM, Răzvan Crainea <razvan at opensips.org> wrote:

>  Hi, Mariana!
>
> The dialog timeout avp has effect only if it is set before match_dialog
> and loose_route. But only the dialog matched by either loose_route,
> either match_dialog, will be updated. If none is found, then nothing will
> be changed. Therefore I can't really see a problem here - if the UPDATE
> doesn't match the dialog, you can freely reply with a 481 without any
> consequences.
>
> Best regards,
>
> Razvan Crainea
> OpenSIPS Core Developerhttp://www.opensips-solutions.com
>
> On 11/12/2012 08:21 PM, Mariana Arduini wrote:
>
> After some testing I found out the dialog timeout is correctly refreshed
> if I set the avp before calling match_dialog(), but this is a problem,
> because we can only refresh the timer if the UPDATE message belongs to a
> dialog. Otherwise, we must reply with a 481.
>
>  I tried using loose_route() instead but no success yet.
>
>  Please advise.
>
>  Thanks,
> Mariana.
>
>
>  On Mon, Nov 12, 2012 at 3:17 PM, Mariana Arduini <marianarduini at gmail.com
> > wrote:
>
>> Hello all,
>>
>>  I´ve checked on SST module and it does not mention anything about
>> refreshing the dialog timeout value. We need to handle this through UPDATE
>> messages.
>>
>>  We are using dialog module:
>>
>>  modparam("dialog", "timeout_avp", "$avp(session_expires)")
>>
>>  When we get the INVITE, we do:
>>
>>          if($(hdr(Session-Expires)))
>>         {
>>             # Handling the case "Session-Expires: 4000;refresher=uac"
>>             $var(se_value) = $(hdr(Session-Expires){s.select,0,;});
>>
>>              if($(var(se_value){s.int}) >= MIN_SE)
>>             {
>>                 # Setting/Updating dialog's timeout
>>                 $avp(session_expires) = $(var(se_value){s.int});
>>                 xlog("L_ERR","******** set timer for INVITE:
>> $avp(session_expires) seconds");
>>             }
>>             else
>>             {
>>                   xlog("L_ERR","Session-Expires header value lower than
>> minimum supported (MIN_SE)");
>>                  append_to_reply("Min-SE: MIN_SE\r\n");
>>                 sl_send_reply("422","Session Interval Too Small");
>>                 exit;
>>              }
>>         }
>>
>>  Using dlg_list, I can see the dialog timeout was correctly set. When I
>> do the same thing for the UPDATE, the dialog timeout is not refreshed:
>>
>>   if (is_method("UPDATE") && $(hdr(Session-Expires)) ) {
>>
>>          if(match_dialog())
>>         {
>>             # Handling the case "Session-Expires: 4000;refresher=uac"
>>             $var(se_value) = $(hdr(Session-Expires){s.select,0,;});
>>
>>              if($(var(se_value){s.int}) >= MIN_SE)
>>             {
>>                 $avp(session_expires) = $(var(se_value){s.int});
>>             } else {
>>                 xlog("L_ERR","Session timer not refreshed");
>>             }
>>
>>              sl_send_reply("200", "OK");
>>             exit;
>>         }
>>         else
>>         {
>>             sl_send_reply("481", "Transaction Does Not Exist");
>>             exit;
>>         }
>>
>>  }
>>
>>  Any hints, please?
>>
>>  Thanks in advance.
>>
>>  Mariana.
>>
>
>
>
> _______________________________________________
> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20121112/0bad6064/attachment.htm>


More information about the Users mailing list