Well i had similar problem but not with pjsip with our own proprietary
sip stack, its not the problem with the sip stack but its due to iOS
limitation.
When app run in background and no voip
is active then it will allow 'at least' 10 minutes to run into the
background, more or less depend upon usage , device bettery level and
other parameters,
and more over socket may also get closed,
the way we resolved is as follows,
1 -- if voip is active then need not to worry ,
2 -- if no voip then apply following logic ,
- make
iOS framework full by playing an audio file in the background it can be
PCM with dead air, so it will continue play and your session will not
die.
If still not work then lets us know we have other option for this issue.
Best,
StarTele Logic