I’ve the exact same problem with the same config like in the thread named “Outboud Call drops voice after 333 seconds” (I’m not allowed to post a link or reopen this thread)
Calls with fritzbox as trunk have no audio after 5 and half minutes and drops after that on external side with a delay of a half minute. The internal side doesn’t drop the call.
The pjsip debug log doesn’t show anything related to the call (only when I start and hang up the call on the internal side).
I tried many of setting changes like “Rewrite Contact” or other rtp timeouts.
I also have OPNSense between fritzbox and FreePBX, but it only acts as an firewall and for test purposes it does not block anything.
I am guessing that the problem is caused by OPNSense rewriting the source port, i.e. when Asterisk sends an INVITE to Fritz!Box from port 5060, Fritz!Box sees it coming from a different port.
In OPNSense, set Static Port for the PBX; see
If you already have that setting, or it doesn’t help, at the Asterisk command prompt type
pjsip set logger on
make a failing test call, post the Asterisk log for the call at pastebin.freepbx.org and post the link here.
Thanks for the quick answer!
I already disabled NAT in OPNSense completely for the pbx host. Also If 5060 were not the source port, the call wouldn’t work for 5 and a half minutes…
I can paste the log with
pjsip set logger on, but as I said it is nothing in there. Only when the call is started and manually ended.
Yes, I would like to see the SIP traffic when the call is set up and answered.
Thank you very much. i still can’t post links… https :// pastebin. freepbx. org /view/e698c8f6
Is the PBX at 192.168.2.9 and the Fritz at 192.168.2.100 ? If not, please describe your network in more detail.
There seem to be two things wrong and you may have to fix both to get this working.
Contact: <sip:[email protected]:5060>
The PBX should not send its public IP when connecting to a local resource.
In Asterisk SIP Settings, confirm that Local Networks is correctly set (based on what I know so far, it should be 192.168.2.0 / 24). After submit and apply config, you must also restart (not just reload) Asterisk.
Via: SIP/2.0/UDP 62.54.333.333:5060;rport=56548;branch=z9hG4bKPj2da68c10-3eb9-46e3-a7d1-89dd8decd88f;received=192.168.2.9
The Fritz is saying that it received the INVITE from port 56548, almost certainly because OPNSense rewrote it. I know almost nothing about it, but am guessing that even with NAT disabled, source port numbers are rewritten by default and you must configure it to force Static Port.
To ensure, that there is static port mapping, I completely removed OPNSense from the SIP cascade and now it seems to work. Thank you for you quick responses and help! Awesome community
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.