res_pjsip_registrar: Remove unavailable contacts if exceeds max_contacts
The behavior of max_contacts and remove_existing are connected. If remove_existing is enabled, the soonest expiring contacts are removed. This may occur when there is an unavailable contact. Similarly, when remove_existing is not enabled, registrations from good endpoints are rejected in favor of retaining unavailable contacts. This commit adds a new AOR option remove_unavailable, and the effect of this setting will depend on remove_existing. If remove_existing is set to no, we will still remove unavailable contacts when they exceed max_contacts, if there are any. If remove_existing is set to yes, we will prioritize the removal of unavailable contacts before those that are expiring soonest. ASTERISK-29525 Change-Id: Ia2711b08f2b4d1177411b1be23e970d7fdff5784
parent
0aac38c0
No related branches found
No related tags found
Showing
- configs/samples/pjsip.conf.sample 10 additions, 0 deletionsconfigs/samples/pjsip.conf.sample
- contrib/ast-db-manage/config/versions/f56d79a9f337_pjsip_create_remove_unavailable.py 30 additions, 0 deletions.../versions/f56d79a9f337_pjsip_create_remove_unavailable.py
- doc/CHANGES-staging/res_pjsip_registrar.txt 7 additions, 0 deletionsdoc/CHANGES-staging/res_pjsip_registrar.txt
- include/asterisk/res_pjsip.h 2 additions, 0 deletionsinclude/asterisk/res_pjsip.h
- res/res_pjsip.c 29 additions, 2 deletionsres/res_pjsip.c
- res/res_pjsip/location.c 1 addition, 0 deletionsres/res_pjsip/location.c
- res/res_pjsip_registrar.c 108 additions, 7 deletionsres/res_pjsip_registrar.c
Loading
Please register or sign in to comment