IMO the inbound problem is simply that Gamma is sending calls to port 5060 on your PBX (where pjsip is listening), rather than the chan_sip port (probably 5160, check at Asterisk SIP Settings -> Chan SIP Settings -> Bind Port).
Possible fixes:
- Get Gamma to send your calls to port 5160 (or whatever your chan_sip is using). If needed, allow it in your firewall.
- Change your Gamma trunk to use pjsip instead of chan_sip.
- Keep your existing chan_sip trunk for outgoing and create a new pjsip trunk to accept incoming calls.
- Change the pjsip Port to Listen On from 5060 to something else, then change chan_sip Bind Port to 5060. You’ll need to update your extensions to use the new ports and restart Asterisk.