; The following object mapping is the default mapping of external MWI mailbox
; objects to give persistence to the message counts.
;
;[res_mwi_external]
;mailboxes=astdb,mwi_external

;
; The following object mappings set PJSIP objects to use realtime database mappings from extconfig
; with the table names used when automatically generating configuration from the alembic script.
;
[res_pjsip]
;endpoint=realtime,ps_endpoints
;auth=realtime,ps_auths
;aor=realtime,ps_aors
;domain_alias=realtime,ps_domain_aliases

transport/cache=memory_cache,full_backend_cache=yes
transport=realtime,ps_transports,allow_unqualified_fetch=yes
transport=config,pjsip.conf,criteria=type=transport

endpoint/cache=memory_cache,full_backend_cache=yes
endpoint=realtime,ps_endpoints,allow_unqualified_fetch=no
endpoint=config,pjsip.conf,criteria=type=endpoint

auth/cache=memory_cache,full_backend_cache=yes
auth=realtime,ps_auths,allow_unqualified_fetch=no
auth=config,pjsip.conf,criteria=type=auth

aor/cache=memory_cache,full_backend_cache=yes
aor=realtime,ps_aors,allow_unqualified_fetch=no
aor=config,pjsip.conf,criteria=type=aor

;registration=realtime,ps_registrations

;Not using this now, because of the hit on the database for every AoR load
global=realtime,ps_globals
contact=astdb,registrator


[res_pjsip_endpoint_identifier_ip]
identify/cache=memory_cache,object_lifetime_stale=600,object_lifetime_maximum=14400,expire_on_reload=yes,full_backend_cache=yes
identify=realtime,ps_endpoint_id_ips,allow_unqualified_fetch=no
identify=config,pjsip.conf,criteria=type=identify

;Drop subscription_persistence into RAM so that they are wiped on restart as a way to disable persistence until ASTERISK-27759 is fixed
[res_pjsip_pubsub]
subscription_persistence=memory
