Hello Henning,
I'm preparing Kamailio configuration that uses save() responce codes for
additional actions so email from Lars brought my attention. This is not a
problem since as Lars mentioned I can check expires value. I just was
curious if this is a correct behavior or not.
Thank you!
ср, 26 черв. 2019 о 23:36 Henning Westerholt <hw(a)skalatan.de> пише:
Hello,
just briefly looked into the code, but I think the return value is like
this for the following reasons:
- function update_contacts(..) will skip if a contact is not found and a
expires=0 is given (it could be also e.g. that the Contact just expired a
few seconds ago in Kamailio)
- this function will return 0, means success
- the calling function save(..) will then return 1 as the default return
value
The main question to change this would be how to differentiate between a
the valid case (just expired in Kamailio) from the other case (simply not
registered at all). What issues do you experience because of this behaviour?
Cheers,
Henning
Am 26.06.19 um 16:25 schrieb Володимир Іванець:
Hello!
I've just tested this on Kamailio v. 5.3.0-dev6 with *modparam("usrloc",
"db_mode", 0)* setting. save() return code was 1 too. I'm also interested
if this behavior is by design.
Thanks.
ср, 26 черв. 2019 о 11:34 Lars Olsson <lars.olsson(a)optimobile.se> пише:
Hi,
I have found a behavior in the registrar module that I do have a question
about. Is the current behavior correct and wanted?
Using the save() method in the script I see the following:
- Processing a register request for a user gives return code 1 ( or 2
)
- Processing a unregister request (expires=0) for registered user
gives return code 3
- Processing a unregister request (expires=0) for a user which is NOT
registered gives return code 1. Why?
What is the reason behind this?
No database entry is added which is expected.
Test performed on 5.1.4, using DB mode 3.
For handling a late unregister request ( where registration has already
expired) return code does not reflect the the action.
I assume that manually checking $expires(max) is the option to go then if
I want to detect the unregister request or?
Cheers,
Lars
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________
Kamailio (SER) - Users Mailing
Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Henning Westerholt -
https://skalatan.de/blog/
Kamailio services -
https://skalatan.de/services