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

Yuriy Gorlichenko ovoshlook at gmail.com
Tue Feb 11 12:40:21 CET 2020


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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200211/8a0f8260/attachment.html>


More information about the sr-users mailing list