Help translating a simple peer config to PJSIP

Update: Here is the PJSIP config which works:

[telegram-endpoint]
type=endpoint
context=telegram-incoming-test
disallow=all
allow=opus
aors=telegram-aors

[telegram-aors]
type=aor
contact=sip:telegram@127.0.0.1:5062

[telegram-identify]
type=identify
endpoint=telegram-endpoint
match=127.0.0.1/255.255.255.255

Also some notes:

  1. In order to make original chan_sip config work, one have to disable chan_pjsip loading, because otherwise chan_pjsip may prevent chan_sip from using UDP
  2. pjproject dependency should be compiled with OPUS codec support. Also codec_opus should be installed in Asterisk