External links hangs up after 30s

Good afternoon, don’t notice my english because I’m using google translator :grimacing:.

I have a problem with the external connections of my FreePBX, all the calls I make from outside last only 30s, even * 43 the echo test after 30s hangs up the call.

This is the sip settings configuration. I changed the sip port from 5060 to 8765, to test and still giving the problem.

This one is my Firewall that is running in a hundred, where it is doing nat for Freepbx.
iptables -t nat -A PREROUTING -i $WAN1_eth -p tcp --dport 10000:20000 -j DNAT --to-dest
iptables -t nat -A PREROUTING -i $WAN1_eth -p udp --dport 10000:20000 -j DNAT --to-dest
iptables -t nat -A PREROUTING -i $WAN1_eth -p tcp --dport 8091 -j DNAT --to-dest
iptables -t nat -A PREROUTING -i $WAN1_eth -p udp --dport 8091 -j DNAT --to-dest

Here is the pjsip set logger on.

CLI log

And if I make any connection or echo test on the same network where the serivador works normally without a problem.

Thank you.

It is necessary that whatever external port you are using for SIP matches the pjsip Port to Listen On. So, your firewall should have
iptables -t nat -A PREROUTING -i $WAN1_eth -p udp --dport 8091 -j DNAT --to-dest
then set pjsip Port to Listen On to 8091, Submit, Apply Config, then restart Asterisk and test.

If you still have trouble, paste a new log and post the link. We prefer you to use pastebin.freepbx.org, but if you must use pastebin.com, please make certain that Paste Expiration is set to Never, so that future readers can benefit from your thread.

It worked thank you very much.
So I can’t do port masking for sip. I believe that was my mistake.
Thank you very much.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.