Call-limit in pjsip

what is similar to call-limit(chan-sip) in PJSIP !
since call-limit is not recognized in pjsip

thanks in advance

The core has group functionality which can be used to group channels together, providing equivalent functionality. It’s done using the GROUP[1] and GROUP_COUNT[2] dialplan functions.

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+17+Function_GROUP
[2] https://wiki.asterisk.org/wiki/display/AST/Asterisk+17+Function_GROUP_COUNT

and this could be used in pjsip.conf or only in dialplan ?

The group can be set using set_var on the endpoint with GROUP, and then afterwards in dialplan you would check.

i am still wondering how to use these functions.
i would admire any help.

this is my pjsip.conf : (only one user)
[37301]
type = endpoint
context = phones
disallow = all
allow = ulaw,alaw,gsm
aors = 37301
auth = auth37301
device_state_busy_at=1

[37301]
type = aor
max_contacts = 1

[auth37301]
type=auth
auth_type=userpass
password=123
username=37301

and this is my extensions.conf:

exten => _X.,1,NoOp({EXTEN}) same => n,dial({PJSIP_DIAL_CONTACTS(${EXTEN:0:5})},15))
same => n,Hangup

i wish you could help me with it since i am stuck here

or if there any example then it would be great as well

I don’t have an example. There may be one online, or someone else here may have one that they use in production.