RealTime cache (sorcery)

Hello!

I have a RealTime configuration PJSIP with objects caching
If i make a call (to MusicOnHold) through a SIP account for the first time it’s caching via request to the DB. But if I make a second call (trough the same SIP account) it requests the DB again.
What am i doing wrong?

Version: Asterisk 18.13.0

My config (sorcery.conf):

[res_pjsip]
endpoint/cache = memory_cache,maximum_objects=200,expire_on_reload=yes,object_lifetime_maximum=3600
endpoint=realtime,ps_endpoints
auth/cache = memory_cache,maximum_objects=200,expire_on_reload=yes,object_lifetime_maximum=3600
auth=realtime,ps_auths
aor/cache = memory_cache,maximum_objects=200,expire_on_reload=yes,object_lifetime_maximum=3600
aor=realtime,ps_aors
domain_alias=realtime,ps_domain_aliases
contact/cache = memory_cache,maximum_objects=200,expire_on_reload=yes,object_lifetime_maximum=300
contact=realtime,ps_contacts

What do the memory cache CLI commands show? Which object are you referring to being retrieved again?

The requests for the second call:
2022-07-13_14-38-42

You probably have multidomain support enabled as it is the default, which would result in queries happening. It can be disabled in pjsip.conf[1]. You could also switch to full backend caching instead.

[1] asterisk/pjsip.conf.sample at master · asterisk/asterisk · GitHub

Thanks jcolp!

You helped me solve this “problem” … )