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

mayamatakeshi mayamatakeshi at gmail.com
Tue Feb 11 13:31:45 CET 2020


Thank to pointing that out.
I'm not sure about all the implications but yes, I think it is better to go
with kamailio v. 5 save() flag approach.
However, the guys at my company might want this change soon so I might need
to go with kamailio v. 4.
Of course, I always run load test before releasing.

On Tue, Feb 11, 2020 at 8:43 PM Yuriy Gorlichenko <ovoshlook at gmail.com>
wrote

> But you will see those changes in the pcap even without
> apply_message_changes
> It is highly recommended to not use this function as it parses all message
> again.
>
> On Tue, 11 Feb 2020, 12:29 mayamatakeshi, <mayamatakeshi at gmail.com> wrote:
>
>>
>>
>> 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!
>> _______________________________________________
>> Kamailio (SER) - Users Mailing List
>> sr-users at lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200211/154301aa/attachment.html>


More information about the sr-users mailing list