]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip: improve realtime performance on CLI 'pjsip show contacts'
authorAlexei Gradinari <alex2grad@gmail.com>
Tue, 25 Sep 2018 22:33:32 +0000 (18:33 -0400)
committerAlexei Gradinari <alex2grad@gmail.com>
Fri, 28 Sep 2018 22:09:12 +0000 (17:09 -0500)
commit625b329f4e5edda068a76222d0db28081816f07d
treeb066080606da19d63afa069c37e5621fada2ad1c
parent160ab08840d621025213dca6231e1999422881d4
res_pjsip: improve realtime performance on CLI 'pjsip show contacts'

CLI command 'pjsip show contacts' inefficiently make a lot of DB requests.

For example if there are 10k aors then asterisk requests these 10k records
of aor and then does 10k requests of contact - one request per aor.

Even if use 'like <pattern>' the asterisk requests all aor's and contact's
records and then filters them by itself.

This patch gathers contact's container by
- retrieving all dynamic contacts by regex (filtered by reg_server)
- retrieving all aors with permanent contacts
- finally filters container by regex

ASTERISK-28077 #close

Change-Id: Id0ad65d14952a02fb213273a90f3f680a8149618
res/res_pjsip/location.c