How to count the first re-register request?
James Morrison via sr-users <[email protected]>
| Newsgroups | gmane.comp.voip.ser |
|---|---|
| Message-ID | <[email protected]> |
I want to count the first REGISTER request during an initial register or re-register from UE. In my scscf instance, I have defined att_init_reg and att_rereg counters to count the number of initial registers and re-registers respectively. In my early tests, the following piece of logic worked as expected to filter the very first register request (one that is sent from UE before getting challenged). However, more tests showed that during re-registers, UE sends a REGISTER request, containing an authorization header and non-empty response, in that case the code is unable to distinguish a re-register attempt and the related counter fails to increment. Is there a way to fix this issue?
#!ifdef WITH_XHTTP_PROM
/* Only count the first register request */
if (!is_present_hf("Authorization") || search_hf("Authorization","response=\"\"","f")) {
if ($var(impu_registered) != 1) {
prom_counter_inc("att_init_reg", "1");
} else {
prom_counter_inc("att_rereg", "1");
}
}
#!endif
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the sender!