The above is my understanding: apps aren't allowed to run in the background
unless they're doing one of some limited things (playing music, satnav). So
you need a third party service to send the phone a push notification to wake
up the app - but that means you can't have an entirely local SIP app.
'Termius', an SSH client, works around this by having an option to record
location 'so you remember where you opened an SSH connection from', which
just so happens to keep the SSH session up in the background.
I suppose a SIP client could do the same.
According to this:
https://www.reddit.com/r/VOIP/comments/nh9s26/ios_sip_softphone/
Acrobits or Groundwire are suggested as (paid) SIP apps that support push
notifications.
https://wiki.linphone.org/xwiki/wiki/public/view/Lib/Features/Push%20notifications/IOS%20push%20notification%20management/
has the gory details. I have this problem with the Linphone app, so
whatever they might have done in their app, it doesn't work for me.
Theo