I’m using Asterisk 16 and need my Asterisk for testing purposes to reject inbound trunk calls where for ex. Min-SE is set to 90 secs. with “422 Session Timer too Small” message, when Min-SE on the PBX is set higher.
I have tried multiple variations, but without success: when the timer on Asterisk side is set within the range that is accepted by the trunk provider, the call is answered, unless the invite includes smaller timer; otherwise there is no response for the invite from Asterisk and the call is canceled by the provider after the maximum retry interval.
I have configured the timers in the pjsip.endpoint_custom_post.conf, which is included in the pjsip.conf as follows:
I have also tried with “timers=always” and “timers=required”: on outbound calls “yes” and “required” act as expected (on both options the timers are set - on “yes” timers appear as value at the “Support” header and on “required” at the “Require” header), but on inbound calls there is no difference; setting timers to “always” seems to have no effect in both directions, like setting to “no”…
As I remember, on the old chan_sip you could set “session-refresher=uas” to achieve the expected behavior, but I didn’t find any instruction how to reach the same effect using pjsip…
I would be very appreciated for some advice, what I’m doing wrong here!
Yes, I’m using FreePBX and the file has its include by default…
Never the less, I simply need a 422 reply from Asterisk on incoming calls, when the session timers I set with Asterisk/ FreePBX are set higher than the session timers in the INVITE.
Originally you said the minimum in the INVITE (Min-SE). Are you now saying that
was wrong?
Also, what is the problem that you are trying to solve? I could imagine that anyone setting a very low timer might well abort a call if you try to override them to a much higher value. It rather looks like you are trying to disable timers, by setting a very high value, rather than completely disabling them.
If someone tries to force a very low value, there is probably a reason for it.
Yes, there is a reason: I’m working for an ISP and we need such a behavior for testing purposes…
I thought the question is quite simple: for. ex. I set my PBX to Min-SE=8000 and Session-Expire=14400, there is an incoming INVITE with Min-SE=1800 and Session-Expire=3600 - how do I get my PBX to reply to this INVITE with 422 message instead of ignoring it?
The reason doesn’t matter! If I wouldn’t nead it, I wouldn’t ask! Don’t you think?