We use guest mode as we’d like to be able to receive anonymous calls (I realize that this may not be safe).
- Calling side is behind NAT
- FreePBX is behind NAT as well
FreePBX (chan_pjsip) sends the media to private IP of the calling side, so there is no RTP. So, I believe rtp_symmetric is not enabled out-of-the-box.
anonymous section in pjsip.endpoint.conf looks like this:
[anonymous] type=endpoint context=from-sip-external allow=all
As I understand it, it is not recommended to change this file (even if you change it reverts back to its original configuration).
So, we added the following to pjsip.endpoint_custom.conf thinking that it could be overriden with user input:
[anonymous] type=endpoint context=from-sip-external disallow=all allow=opus,ulaw,alaw,g722,g729,g726,h264 rtp_symmetric=yes
However, FreePBX returns 401 Unathorized to incoming INVITE, somehow rejects anonymous calls.
Then we tried adding the parameters below pjsip.endpoint_custom.conf thinking that I could somehow be amended:
[anonymous] disallow=all allow=opus,ulaw,alaw,g722,g729,g726,h264 rtp_symmetric=yes
In this case,
- INVITE with SDP (fast start): no RTP (rtp_symmetric is not really enabled)
- INVITE without SDP (slowstart): FreePBX sends 200 OK without SDP offer, and then terminates the call with BYE.
- FreePBX version: FPBX-220.127.116.11(16.17.0)
I’d appreciate any guidance on how to set this parameter properly via GUI or CLI or editing some files.
As I understand it Asterisk can do it by letting you edit just the pjsip.conf file; however the way FreePBX handles configuration is so much different (I am new to it). I could not figure out how to do it.