No ContactStatus AMI event when full_backend_cache=no

Hello,

After I set full_backend_cache=no in sorcery.conf, No ContactStatus AMI event was received.

[res_pjsip]
endpoint=config,pjsip.conf,criteria=type=endpoint
endpoint/cache=memory_cache,maximum_objects=150,full_backend_cache=no
endpoint=realtime,ps_endpoints
auth=config,pjsip.conf,criteria=type=auth
auth/cache=memory_cache,maximum_objects=150,full_backend_cache=no
auth=realtime,ps_auths
aor=config,pjsip.conf,criteria=type=aor
aor/cache=memory_cache,maximum_objects=150,full_backend_cache=no
aor=realtime,ps_aors
contact=realtime,ps_contacts

I’d like to know if this is a specification or a bug.
The version I use is 16.13.0.

Best,
ET

You’d have to be more specific about what exactly is going on and the configuration and deployment.

Thank you for your comment.

Before adding memory_cache settings like this:

[res_pjsip]
endpoint=config,pjsip.conf,criteria=type=endpoint
endpoint=realtime,ps_endpoints
auth=config,pjsip.conf,criteria=type=auth
auth=realtime,ps_auths
aor=config,pjsip.conf,criteria=type=aor
aor=realtime,ps_aors
contact=realtime,ps_contacts

I received ContactStatus AMI events
On registering:

Event: ContactStatus
Privilege: system,all
URI: sip:1003316@192.168.1.152:1183;transport=TLS;ob
ContactStatus: NonQualified
AOR: 1003316
EndpointName: 1003316
RoundtripUsec: 0

On unregistering:

Event: ContactStatus
Privilege: system,all
URI: sip:1003316@192.168.1.152:1183;transport=TLS;ob
ContactStatus: Removed
AOR: 1003316
EndpointName: 1003316
RoundtripUsec: 0

The aor record is below:

mysql> select * from ps_aors where id='1003316' \G
*************************** 1. row ***************************
                  id: 1003316
             contact: NULL
  default_expiration: NULL
           mailboxes: NULL
        max_contacts: 1
  minimum_expiration: NULL
     remove_existing: yes
   qualify_frequency: NULL
authenticate_qualify: NULL
  maximum_expiration: NULL
      outbound_proxy: NULL
        support_path: NULL
     qualify_timeout: NULL
 voicemail_extension: NULL

I reffered this topic and set qualify_frequency but the situation didn’t change.

There’s nothing in the memory cache that would come to mind to cause this, and I haven’t seen it reported elsewhere. You’d need to provide an Asterisk log with debug level enabled. It may show what is going on and why it is doing what it is doing.

Thank you for your advice.

I monitored debug logs on 4 situations:

  • Registering with memory_cache settings
  • Registering without memory_cache settings
  • Unregistering with memory_cache settings
  • Unregistering without memory_cache settings

I found that pjsip_options.c and devicestat.c log messages before 200OK(REGISTER) without memory_cache settings:

Registering:

DEBUG[27430] res_pjsip/pjsip_options.c: An unqualified contact has been added to AOR '1003316' so it is now available
DEBUG[27430] res_pjsip/pjsip_options.c: Endpoint state compositor '1003316' is online as AOR '1003316' is available
DEBUG[26779] devicestate.c: No provider found, checking channel drivers for PJSIP - 1003316

Unregistering:

DEBUG[27430] res_pjsip/pjsip_options.c: An unqualified contact has been removed from AOR '1003316' leaving no remaining contacts
DEBUG[26779] devicestate.c: No provider found, checking channel drivers for PJSIP - 1003316

With memory_cache settings, I didn’t.

I haven’t understood the log messages mean, yet.

Registering_with_memory_cache_settings.txt (14.0 KB)
Registering_without_memory_cache_settings.txt (19.6 KB)
Unregistering_with_memory_cache_settings.txt (8.5 KB)
Unregistering_without_memory_cache_settings.txt (17.2 KB)

What is the sorcery.conf with caching enabled? If you enable full backend caching what is the result?

With sorcery.conf bellow:

[res_pjsip]
endpoint=config,pjsip.conf,criteria=type=endpoint
endpoint/cache=memory_cache,full_backend_cache=yes
endpoint=realtime,ps_endpoints
auth=config,pjsip.conf,criteria=type=auth
auth/cache=memory_cache,full_backend_cache=yes
auth=realtime,ps_auths
aor=config,pjsip.conf,criteria=type=aor
aor/cache=memory_cache,full_backend_cache=yes
aor=realtime,ps_aors
contact=realtime,ps_contacts

I met the same result as bellow:

[res_pjsip]
endpoint=config,pjsip.conf,criteria=type=endpoint
endpoint/cache=memory_cache,maximum_objects=150,full_backend_cache=no
endpoint=realtime,ps_endpoints
auth=config,pjsip.conf,criteria=type=auth
auth/cache=memory_cache,maximum_objects=150,full_backend_cache=no
auth=realtime,ps_auths
aor=config,pjsip.conf,criteria=type=aor
aor/cache=memory_cache,maximum_objects=150,full_backend_cache=no
aor=realtime,ps_aors
contact=realtime,ps_contacts

The problem is NOT ‘full_backend_cache=no’.
I’m sorry for that…

Oh, you’re using it in between .conf and realtime… I don’t know if that has actually been tested or used…

I would suggest trying to prune down things to further isolate the specific combination causing the issue.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.