[SR-Users] Different REGISTER expires based on User-Agent

mayamatakeshi mayamatakeshi at gmail.com
Tue Feb 11 12:27:08 CET 2020


On Tue, Feb 11, 2020 at 7:48 PM Daniel Tryba <d.tryba at pocos.nl> wrote:

> On Tue, Feb 11, 2020 at 08:03:29AM +0900, mayamatakeshi wrote:
> > Actually, my idea was to do something like this before handing the
> REGISTER
> > to registrar save() function:
> >                         remove_hf("Expires");
> >                         append_hf("Expires: 200\r\n");
> > However, this didn't work (or at least, it doesn't work with kamailio
> 4.3.7
> > which is the one I use).
>
> These changes aren't applied to the processing of the current message
> until you call msg_apply_changes().
>
> Try adding and see if it works.
>

Indeed. This worked:
        remove_hf("Expires");
        append_hf("Expires: 200\r\n");
        msg_apply_changes();
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200211/e4a3ac27/attachment.html>


More information about the sr-users mailing list