Chan_pjsip 30 seconds hangup, cannot figure out, please help

hi to all,
I have a freepbx with 4 pjsip trunks from same provider. I have to use pjsip cause chan_sip gives some problems if the trunks comes all from the same ip/provider. with chan_pjsip everything works perfect.
So… in my production environment the freepbx server is connected to a router and there is no nat cause the router gives a dedicated public ip to the freepbx server. Now I really want to have a backup to some other connectivity that we already have (some vdsl and a really good 4g LTE connectivity) but all these connections obviously gives only a static ip, so there is nat beetween the freepbx server and the internet. And here comes the problems, with pjsip I can register make calls and receive with no problems with any of these connections, but an incoming call will drop after 30 seconds. WITH SIP PROTOCOL THIS DOESN’T HAPPENS JUST SETTING NAT=YES FIX THE PROBLEM I searched for days with no results, tryed everything but I never come to a solution, the only way is to use chan sip, but this gives a lot of problems with multitrunking from same IP provider… so I’m attaching two logs when starting an incoming call to a test environment that I have created with a new number from the same provider to test a solution, this is a pjsip trunk that is simply ringing on extension 102.
the first one is log from asterisk -rvvv and second one is with verbose,debug and pjsip logger enabled. Hope someone can give to me a suggestion. Sorry for this but due the long LOG during 30 seconds of call I have to attach these LOGS from an external service.
asterisk -rvvv
pjsip logger

While it might seem that this is an Asterisk or FreePBX problem, if you look back through the logs, you’ll probably find at least a few occurrences of errors like “so and so has not responded to our critical packets”. Whenever I see “30 seconds” in a post, my first assumption is that the router is actually shutting down the connection.

Whether you are using NAT=YES or NAT=NO will determine how the packets are processed. NAT=YES tells the remote system (but not your local router) that the traffic is actually coming from a machine behind a router, and that the local address of that machine is “whatever”. If you say “NAT=NO”, then the destination router is the destination of the packets. If that destination router is set up to pass all traffic from an external address to a non-routable one, the traffic will all start and work. On the other hand, with some routers, the session to the local PBX from the router isn’t established correctly and your traffic is terminated after 30 seconds (or whatever the timeout in the router is).

I deleted the external address leaving it blank from general and pjsip settings, and it works perfectly. Everything else is as default. I don’t know why but in this way is working. Something that I cannot understand is why with a simple and stupid soft phone I can pass trough any NAT or kind of router, but with freepbx is so difficoult, in example I have other 2 vdsl that doesn’t works with any of the above parameters.


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