Subscribe (PJSIP)

Hello!

We have realtime pjsip users. When some users subscribe to an extension they are removed after a few seconds. What we need to do to fix it?

Asterisk 18.13.0

can you do a tcpdump / sngrep for one of the affected sip user
and check if it do a unregistre
also what is a few seconds 10-20 sec or 500-600 ?

also please do not post text as a picture, instead use the preformatted text tag

Unregister doesn’t occur.

In seconds it is 5-10 sec, although the Expires (in a SUBSCRIBE message) is set to 600 sec

Have you modified sorcery.conf such that you’re trying to store persistent subscriptions elsewhere? What all are you putting into realtime? Does this happen in the latest Asterisk 18?

My sorcery.conf

[res_pjsip]
endpoint/cache = memory_cache,maximum_objects=200,expire_on_reload=yes,object_lifetime_maximum=3600
endpoint=realtime,ps_endpoints
endpoint=config,pjsip.conf,criteria=type=endpoint

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=400
contact=realtime,ps_contacts

;[res_pjsip_endpoint_identifier_ip]
;identify/cache = memory_cache,maximum_objects=200,expire_on_reload=yes,object_lifetime_maximum=3600
;identify=realtime,ps_endpoint_id_ips

[res_pjsip_outbound_publish]
outbound-publish/cache = memory_cache ;,maximum_objects=200,expire_on_reload=yes,object_lifetime_maximum=3600
outbound-publish=realtime,ps_outbound_publishes

[res_pjsip_pubsub]
inbound-publication/cache = memory_cache ;,maximum_objects=200,expire_on_reload=yes,object_lifetime_maximum=3600
inbound-publication=realtime,ps_inbound_publications

[res_pjsip_publish_asterisk]
asterisk-publication/cache = memory_cache ;,maximum_objects=200,expire_on_reload=yes,object_lifetime_maximum=3600
asterisk-publication=realtime,ps_asterisk_publications

extconfig.conf

ps_endpoints => odbc,asterisk
ps_auths => odbc,asterisk
ps_aors => odbc,asterisk
ps_contacts => odbc,asterisk
ps_outbound_publishes => odbc,asterisk,ps_outbound_publishes
ps_inbound_publications => odbc,asterisk,ps_inbound_publications
ps_asterisk_publications => odbc,asterisk,ps_asterisk_publications
extensions => odbc,asterisk
queues => odbc,asterisk
queue_members => odbc,asterisk
musiconhold => odbc,asterisk
musiconhold_entry => odbc,asterisk
queue_log => odbc,asterisk

Asterisk 18.13.0

Later I will also try to install the latest Asterisk version …

In the Asterisk version 18.17.1 the problem persists …

Then I would suggest setting up a test environment and seeing if the same issue occurs. If it does, then simplify the setup to isolate where the issue is occurring.

I can recall no filed issues for this, so it likely requires specific circumstances.

i’ve found the cause of this problem. UAC subscribes with an external IP. In endpoint settings i have the outbound_proxy, but NOTIFY’s doesn’t use this parameter. Why?
And how to make asterisk send NOTIFY’s though the outbount_proxy?

Because outbound_proxy doesn’t apply to that. The NOTIFY is considered in-dialog, and would follow any Record-Route (which a proxy should put in so it remains in the message flow) or fall back to Contact per normal SIP specifications.

Thanks!

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