Pjsip, a solution to avoid this problem?

Today I put the phone making a call and… No call.
So I check the console and I see

Rejected (exp. 396528s ago)

My question is: how to avoid this problem? I have those settings for pjsip

qualify frequency 86400

Actually I set forbidden_retry_interval=300 Will solve the problem?

On Thursday 06 February 2025 at 20:29:21, pnirru via Asterisk Community wrote:

Today I put the phone making a call and… No call.

That is very little information for us to go on.

So I check the console and I see

Rejected (exp. 396528s ago)

So, the telephone’s registration expired 4½ days ago.

My question is: how to avoid this problem?

Tell the telephone to register more frequently.

I have those settings for pjsip

qualify frequency 86400

That is how often Asterisk will check to find out whether the tepephone is
still reachable. It has nothing to do with how often the telephone itself
registers to Asterisk.

Also, depending on quite what you meant by your first statement “I put the
phone making a call”…

  • a telephone does not need to be registered to Asterisk in order to place a
    call (ie: send a SIP Invite)

  • a telephone does need to be registered to Asterisk in order for Asterisk to
    place a call to the telephone (otherwise Asterisk does not know where to send
    the Invite)

I suspect this is a networking problem, or possibly a configuration problem on
the telephone (not being told to register sufficiently frequently), although
these really are just guesses based on the information provided.

Antony.


“There is no reason for any individual to have a computer in their home.”

  • Ken Olsen, President of Digital Equipment Corporation (DEC, later consumed
    by Compaq, later merged with HP)
1 Like

Thanks for answer, actually this is the situation

pjsip show registrations


 <Registration/ServerURI..............................>  <Auth....................>  <Status.......>
==========================================================================================

 tim-uscita/sip:telecomitalia.it                         tim-uscita                  Registered        (exp. 129s)

It register every 300s, is a good value?
I have also set this parameter

forbidden_retry_interval=300

On Thursday 06 February 2025 at 20:51:52, pnirru via Asterisk Community wrote:

pjsip show registrations

tim-uscita/sip:telecomitalia.it

That is not a telephone.

That is Asterisk registering as a SIP client to an external provider.

Please explain exactly what you are doing, and what the problem is, in more
detail.

Antony.


Pavlov is in the pub enjoying a pint.
The barman rings for last orders, and Pavlov jumps up exclaiming “Damn! I
forgot to feed the dog!”

1 Like

Yes. The phones has no problem, all works. Only today I see all calls were dropped. So I check the asterisk console and I found reject registration

Rejected (exp. 396528s ago)

I have set this new parameter

forbidden_retry_interval=300

What’s the problem? Actually none, only ask if setting this parameter will avoid in the future this problem (i have set it today, when the rejected happen the parameter was set to NULL). Or I had to set a script which restart asterisk if registration was rejected?

Why? This is orders of magnitude too large for there to seem to be any purpose in doing this.

1 Like

What value did you suggest?

btw seems use another value which is 300

 tim-uscita/sip:telecomitalia.it                         tim-uscita                  Registered        (exp. 1s)
 tim-uscita/sip:telecomitalia.it                         tim-uscita                  Registered        (exp. 349s)

Either disable qualify entirely, or decide what qualify rate would overload the system, how quickly you want to detect a lack of connectivity without actually making a call, and how often you need to generate dummy network traffic to keep routers and NAT open.

Choose a value that is lower the last two factors, and higher than both the first one and about 32 seconds (the maximum time to retry getting a response).

1 Like

In ‘pjsip.conf’ under ‘type=registration’ try:
expiration=1000

1 Like

I did it, but instead of using 1000
became strange

Unregistered (exp. 1738885401s ago)

and then

registered (exp. 348s)

You may have to wait a day because of this.
What do you see under ‘pjsip show contacts’ command?

1 Like

i see

Contact: tim-uscita/sip:telecomitalia.it ******** Avail 440.386

First I wrote a bad value, real value is


MariaDB [asterisk]> select id,qualify_frequency from ps_aors;
+------------+-------------------+
| id         | qualify_frequency |
+------------+-------------------+
| tim-uscita |                25 |

86400 is the expiration time in ps_registration

That is not related to registration with the VoIP provider (which is sometimes ‘rejected’).
Or, if it is somehow, 25 may be too frequent and they don’t like it.

1 Like

Thanks, I try now with the 125 value

insert into ps_aors (id, contact, qualify_frequency, outbound_proxy) values ('tim-uscita', 'sip:telecomitalia.it', 125, 'sip:myproxy****.it.^3Blr');

Restart asterisk

But start even from 350!

tim-uscita/sip:telecomitalia.it tim-uscita Registered (exp. 347s)

How to increase this value?

The remote side can override what you set. As there is no SIP trace, I can’t say if that is what is happening.

1 Like