Subscribe (PJSIP)


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

endpoint/cache = memory_cache,maximum_objects=200,expire_on_reload=yes,object_lifetime_maximum=3600

auth/cache = memory_cache,maximum_objects=200,expire_on_reload=yes,object_lifetime_maximum=3600

aor/cache = memory_cache,maximum_objects=200,expire_on_reload=yes,object_lifetime_maximum=3600

contact/cache = memory_cache,maximum_objects=200,expire_on_reload=yes,object_lifetime_maximum=400

;identify/cache = memory_cache,maximum_objects=200,expire_on_reload=yes,object_lifetime_maximum=3600

outbound-publish/cache = memory_cache ;,maximum_objects=200,expire_on_reload=yes,object_lifetime_maximum=3600

inbound-publication/cache = memory_cache ;,maximum_objects=200,expire_on_reload=yes,object_lifetime_maximum=3600

asterisk-publication/cache = memory_cache ;,maximum_objects=200,expire_on_reload=yes,object_lifetime_maximum=3600


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.


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