Incoming call problem. Incoming call only works right after i call out first

I am having a really weird problem with my freepbx.

I cannot call into the line and I get the this number is not in service message. But if i call using the IP phone first and call in to the right after, the call will go through. If i wait a little while it will not work again. It feels like some line is not connecting correctly.

Please tell me what information should I provided to get help with this. I am a newbie. Thanks

It’s likely your firewall. When you place a call, the ports get opened up to incoming traffic (since you initiated it). After a period of time, the ports are closed again. You probably need to find the port forwarding options in your router config and open the appropriate ports.

At least port 5060, I’m not sure what else.