New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uac_registrant and external "expires" parameter (in 200OK) #217
Comments
Please provide a trace for it and the version of opensips that you are using. |
opensips 1.10 latest git commit as registrant. |
Hi @ovidiusas , any progress with this bug ? |
I will try to work on it tomorrow. |
This is working fine on dev and 1.11. |
There are no differences between 1.10 and dev. |
One of latest 1.10 from git (92d6ed4). |
Please post the uac_registrant params and the output of 'opensips -V' |
A similar issue was fixed a while ago:
|
version: opensips 1.10.1-tls (x86_64/linux) loadmodule "uac_registrant.so" |
The issue was fixed Nov 22. However, we use latest git 1.10. |
Something is not right with your install: I don't see the git version on the output of 'opensips -V'. See the output that I have: version: opensips 1.10.1-notls (x86_64/linux) |
You may be sure we use git. rpm -qa|grep opensips-1opensips-1.10.1.20140505.92d6ed4-2.x86_64 |
any progress in this task? |
This issue was fixed a while ago (see my previous comments). I know that you are claiming that you are building from latest git, but your output for 'opensips -V' doesn't show the git version which is odd ... You can try to register from a test box running 1.11 (it's the same codebase for uac_registrant). Regards, |
we have latest stable version from git. now updated to 1.11 and problem is still there |
Please provide me with the output of 'opensips -V'. |
version: opensips 1.11.1-tls (x86_64/linux) |
You mentioned that you are compiling from git. I don't see your git version in the output of 'opensips -V'. I will need an account on your server and I will try to register to it to reproduce it. |
Ovidiu, when you build rpm or compile opensips manually, "opensip -V" doesn't write git version (I'll figure out how to fix this). But you may be sure we use git. Today we change 1.10 into 1.11. The same problem. And sorry, we cannot give you access. We can give you any information you need and we can install your patches to get debug info or test. |
Nick, I build my own rpms from git and it always has the git revision in it. For all the above reasons, I don't really thing that this is a real issue (it was already fixed, from my POV) and I can't spend more time on it. Regards, |
I double checked, my own rpms and daily rpms from yum.opensips.org doesn't have git release. I'll fix it, but now they have not. You're really incredulous man. :-) Yes, our opensips have different useragent, but it's really opensips, it's really built from git. :-) Maybe logs with debug=4 can help you or something else? We can change useragent back, if you wish. :-) We can add your debug patch, which will show us how it processed expires... P.S. We cannot set registration time as on one registrar because we send many registrations to many servers. |
I've found the error. It's not on your side. We changed contact in local route, then contact->uri != rec->contact_uri and module didn't use expires from contact. We will try to avoid contact changing in local route. But I've found logical problem in code. You divide timer_interval on reg_hsize when initializing timer, but you don't divide timer_interval when you calculate expiration time. So, with hash_size=4 (16) and timer_interval=80, timer starts every 5 seconds, but for expire=120 we will update every 60 seconds. Greater than timer_interval, the less update time. |
Recreated pull request. The proper one: #236 |
Both hash size and timer interval are configurable so the admin can tune them to fit their needs. If you want to use expire=120 with a hash_size =4, then set: This will result in 16 branches in the hash table. Each record will be checked every 32s and every 2s the timer will fire checking one branch in the hash table. |
I think this moment not well documented. And also something wrong there. Maybe this logic will be better? rec->registration_timeout = now + rec->expires - rec->expires*0.8; When you have many registrants and database with many different intervals, you will have many inaccuracies with re-register intervals. Or we should better document this moment. For example, we should recommend using as small timer_interval as user can. |
I pushed some changes into trunk (some extra checks and more error logs). |
Documentation updated. |
Situation:
A = registrant (our opensips with uac_registrant module). all REGISTERS sent with expires=600 (as ct.fields(expires))
B = registrar (some sip-server). Sends 200OK with expires=120 (as ct.fields(expires) or header "expires") to REGISTERs with expires greater then 120.
When A receives 200OK with expires=120 from B, it does not modify expiration of registration and sends sequential REGISTERs after ~600 seconds.
The text was updated successfully, but these errors were encountered: