[SOLVED] Pjsip call delay


pjsip 2.8
Asterisk 16.0.0

Problem: long delay (10 sec) between asterisk take a call and dial to remote extension.
Now use realtime pjsip config (for endpoints, aors, auth, contacts) but non-realtime (all in pjsip.conf) has same behavior. Same as aster 15.6

Logs of normal and problem calls (cant attach):

Dont heve this problem by use chan_sip.
Please, tell me, what kind information I can get to you for resolving

Looks to me as though you are getting a DNS fault (no reply rather than “does not exist” reply) on test-s-aster01

So why it works without delay if I get a call again immediately?
And why it happends pjsip only?

The DNS client can cache the result for a period of time, even a negative one, to reduce the impact. If STUN is being used that can also cause a delay if that server is unreachable. And res_pjsip may use/do things differently causing it. Ultimately you need to verify that DNS is working on the system for all upstreams, and that everything resolves as you expect - including the hostname of the server.

You mean DNS client on asterisk server?
Cause ping it from himself has no delay from DNS server

PING test-s-aster01 ( 56(84) bytes of data.
64 bytes from test-s-aster01 ( icmp_seq=1 ttl=64 time=0.026 ms
64 bytes from test-s-aster01 ( icmp_seq=2 ttl=64 time=0.072 ms
64 bytes from test-s-aster01 ( icmp_seq=3 ttl=64 time=0.077 ms
64 bytes from test-s-aster01 ( icmp_seq=4 ttl=64 time=0.068 ms
64 bytes from test-s-aster01 ( icmp_seq=5 ttl=64 time=0.082 ms

Problem has solved by adding in /etc/hosts ‘ test-s-aster01’
Sorry for disturbing.
You can close this ticket