I am hoping to find some advice how I can proceed with my setting it right. I am having troubles getting FreePBX (Asterisk) to work from behind Tomato router (v1.28). Tomato is installed on Netgear WNR3500L.
I have pretty basic configuration: FreePBX - router - SIP provider. I do not initiate the calls from inside. All calls are coming from the provider and then forwarded through the trunk to other numbers. Askerisk seems to be registering fine with the provider. At least if I run "sip show peers" I can see it is connected.
However, with the Tomato router whenever I call from outside to my DID I hear the automatic answer that the number is not available at the moment.
When I replace the Tomato router to another one (Cisco E3000 with stock firmware) everything is working. I am able to call to my DID and the call is forwarded to another outside number.
I have read quite a bit around the web, including this forum, trying to find the answer. So I followed multiple advices. First I played with "SIP ALG". My Cisco router (the one with which the system works) has it On (I red quite a bit suggestions to better disable it, but I do not see the need once it works with it). Having this option On or Off on my Tomato router does not change anything. Then, both routers have UPnP enabled. I actually could not find the information of the ports which are opened from UPnP on my Cisco router, but the one on Tomato did not show that UDP ports 5060 or 10000-20000 were opened. Other applications were able to use UPnP in order to open the ports, but not FreePBX, apparently. Okay, then I bluntly decided to forward ports 5060-5070 as well 10000-20000 on Tomato router to my client. No effect. Same thing. The calls do not go through. Then I had an idea - what if I check the log on the router to see if some packets get rejected. I am not that good in VoIP, so frankly I was not sure what I needed to look for. So I decided to look for my SIP provider IP address. If say, the router rejects the calls from outside then at least it is something. Could not find any packets. So, could it be that the provider does not have my IP address? Meaning I did not register properly. I have no idea how can it be, since "sip show peers" gives me my provider as a peer. And remember, it works perfect as soon as I replace my router to Cisco E3000. May be I need to configure the STUN client, but first, I could not find out how I can do it over the browser interface. Secondly, if I just have registered with my provider then my IP has not changed. The way I understand it, STUN is required for keeping the connection with the provider when the IP is dynamic, when it changed. So I do not really see the point to mess with it. At the same time, like I said, I could not see any packets coming from my provider. So I suspect something is not really working connecting to the SIP provider. Something is missing and I am not sure what.
Anyway, I hope somebody will be able to point me to right direction. May be there is a way to get more logs, analyze them. With my current level of knowledge in this field I have run out of options.
Thanks
Tomato configuration for FreePBX and Asterisk