Asterisk on fedora 36 (20221108 - updated 20221225)

With this setup I was able to call from one phone to another

only install the necessary packages -

asterisk-18.4.0-1.fc36.5.x86_64
asterisk-pjsip-18.4.0-1.fc36.5.x86_64
asterisk-sounds-core-en-1.6.1-11.fc36.noarch
asterisk-sounds-core-en-ulaw-1.6.1-11.fc36.noarch
	

my /etc/asterisk/pjsip.conf - which works with cisco spa504g phones as well as soft phones

I had to add "remove_existing=yes" or I sometimes can't reregister a phone if it has already registered.

;-----stuff from hello-world test https://wiki.asterisk.org/wiki/display/AST/Hello+World
[transport]
type=transport
protocol=tcp
bind=0.0.0.0

;----- 6001

[6001]
type=endpoint
context=fxsgroup
disallow=all
allow=ulaw
auth=6001
aors=6001

[6001]
type=auth
auth_type=userpass
password=unsecurepassword
username=6001

[6001]
type=aor
max_contacts=1
remove_existing=yes

;----- 602
[602]
type=endpoint
context=fxsgroup
disallow=all
allow=ulaw
auth=602
aors=602

[602]
type=auth
auth_type=userpass
password=602
username=602

[602]
type=aor
max_contacts=1
remove_existing=yes
;contact=sip:192.168.1.40:5060

;----- 603
[603]
type=endpoint
context=fxsgroup
disallow=all
allow=ulaw
auth=603
aors=603

[603]
type=auth
auth_type=userpass
password=603
username=603

[603]
type=aor
max_contacts=1
remove_existing=yes

;----- 604
[604]
type=endpoint
context=fxsgroup
disallow=all
allow=ulaw
auth=604
aors=604

[604]
type=auth
auth_type=userpass
password=604
username=604

[604]
type=aor
max_contacts=1
remove_existing=yes
;----- 605
[605]
type=endpoint
context=fxsgroup
disallow=all
allow=ulaw
auth=605
aors=605

[605]
type=auth
auth_type=userpass
password=605
username=605

[605]
type=aor
max_contacts=1
remove_existing=yes

	

my /etc/asterisk/extensions.conf - this is only the part I added for my fxsgroup context

[fxsgroup]
exten => 602,1,Dial(PJSIP/602)

exten => 603,1,Dial(PJSIP/603)

exten = 100,1,Answer()
same = n,Wait(1)
same = n,Playback(hello-world)
same = n,Hangup()

exten = 200,1,Answer()
same = n,Wait(2)
same = n,Playback(hello-world)
same = n,Wait(1)
same = n,Playback(hello-world)
same = n,Wait(1)
same = n,Playback(hello-world)
same = n,Hangup()

exten = 201,1,Answer()
same = n,Wait(1)
same = n,Playback(vm-sorry)
same = n,Hangup()
exten = 202,1,Answer()
same = n,Wait(1)
same = n,Playback(vm-Urgent)
same = n,Hangup()
exten = 203,1,Answer()
same = n,Wait(1)
same = n,Playback(confbridge-begin-glorious-a)
same = n,Hangup()
exten = 204,1,Answer()
same = n,Wait(1)
same = n,Playback(hello)
same = n,Hangup()
exten = 205,1,Answer()
same = n,Wait(1)
same = n,Playback(goodbye)
same = n,Hangup()
exten = 206,1,Answer()
same = n,Wait(1)
same = n,Playback(please-try-again)
same = n,Hangup()
exten = 207,1,Answer()
same = n,Wait(1)
same = n,Playback(one-moment-please)
same = n,Hangup()
exten = 208,1,Answer()
same = n,Wait(1)
same = n,Playback(number)
same = n,Hangup()
exten = 209,1,Answer()
same = n,Wait(1)
same = n,Playback(digits/0)
same = n,Playback(digits/1)
same = n,Playback(digits/2)
same = n,Playback(digits/3)
same = n,Playback(digits/4)
same = n,Playback(digits/5)
same = n,Playback(digits/6)
same = n,Playback(digits/7)
same = n,Playback(digits/8)
same = n,Playback(digits/9)
same = n,Playback(digits/10)
same = n,Playback(digits/h-billion)
same = n,Hangup()
	

phone setup for Cisco SPA504G

for extension1, using line1, using asterisk extension 602, based on the config above, here are the extension settings:
- sip settings -> sip transport: TCP - proxy entry needs to be set to: 192.168.1.89:5060
- display name: 602
- UserId: 602
- password: 602
- Auth Id: 602
- Use Auth ID: yes
note that an extension can be mapped to 1 or more lines (buttons) on a phone. This can cause confustion. The mapping is done on the phone tab