No such command pjsip show endpoints

I installed dependencies using

sudo apt-get update
sudo apt-get install -y build-essential wget libssl-dev libncurses5-dev libnewt-dev libxml2-dev libsqlite3-dev uuid-dev libjansson-dev libedit-dev

I checked the make menuselect res_pjproject and res_pjsip is selected
I am using ubuntu on raspberry pi 5

Distributor ID: Ubuntu
Description: Ubuntu 24.10
Release: 24.10
Codename: oracular

asterisk version: Asterisk 22.2.0

I was getting following error but i resolved it by installing LTS version of asterisk