Even if the player has the required rank to escort and there are freighters docked at the stations no missions are given out to the player. He also isnt offered the destory charon pirates fortress missions.
I think the problem lies with "30% of the time we leave the system":
Lines 1490ff KorolovShipping.xml
(if (or (leq (random 1 100) 30) (not portsLeft))
I think the chance for a "gatemission" should be the %tage of friendly stations to gates or something like that. That would prevent the game from not being able to find a suitable destination for that mission.