SIP header, weird Contact one way audio

Hi folks, I need some help with GAMMA SIP provider.

The yellow is the problem.

We have one way audio, an example.
PSTN – Gamma SIP Trunk --FreePBX-- Local Ext (We cannot hear).
Local Ext --FreePBX–Gamma SIP Trunk – PSTN (We can hear)

GAMMA is expecting in the contact header to be formatted in this call example as <sip:[email protected]:53848>

The Contact header advises our SBC where to respond to. If this is a LAN address, or some other address which you’re not expecting traffic on, the 2-way dialog will be disrupted and calls will not setup correctly.

We would recommend ensuring the Contact headers are amended accordingly and re-testing.

Any clue or hints, will be super welcome
Thanks

Daniel White

In your PJSIP trunk, check the parameter “Rewrite Contact” and set it to off if it is on. Normally you would not want to do NAT-related adjustment of contact headers from your provider.

Thanks billsimon. for give me some hints. We are using FreePBX ver 13, and apparently the “Rewrite Contact” is not available under PJSIP , Tab Advanced. Maybe in new versions. This is our FreePBX

I had been reading the PJSIP.conf, but the parameter is not there, however in the file pjsip.endpoint.conf show the ext and the parameter “Rewrite Contact is there, but those are not trunks.

I had been reading and I am all mix up with this thread How to enable rtp_symmetric and rewrite_contact for pjsip Trunk? - #7 by DanielYK

But here show in the Web GUI of freePbx the parameter

I guess this screenshot is from a new FreePBX version.
2019-10-12%2012_02_58-Window

I am scratching my head. Any advice will be great.

Daniel White

After re-reading your post I don’t really understand what your provider is asking. You’re having trouble with inbound calls, and on an inbound invite the contact header is being set by them, so unless you’re mangling it up (with the rewrite_contact option, which seems to be disabled) then it’s on them to set it properly.

If you need to set the contact header for outbound calls that you initiate from your PBX, you can put the user part in that “Contact User” field, for example your own DID.

I had been thinking the same with the “Contact User” without any luck.

However, I installed the FreePBX v15, and I did a test enabled and disabled the “Rewrite Contact” and in both scenarios the GAMMA trunk work great, I will do other labs in the FreePBX ver 13, and compare both PBX.

Thanks for your help
Daniel White

I copy from new FreePBX Ver 15 to the old one FreePBX v13 this text from file “pjsip.endpoint.conf” :

[GAMMA_Trunk_using_185.196.xxx.xxx_Fibre_0150927xxxx]
type=endpoint
transport=0.0.0.0-udp
context=from-pstn
disallow=all
allow=ulaw,alaw,gsm,g726,g722
aors=GAMMA_Trunk_using_185.196.xxx,xxx_Fibre_0150927xxxxx
language=en
outbound_auth=GAMMA_Trunk_using_185.196.xxx,xxx_Fibre_0150927xxxxx
t38_udptl=no
t38_udptl_ec=none
fax_detect=no
trust_id_inbound=no
t38_udptl_nat=no
direct_media=no
rewrite_contact=no <— it can be yes or not, works fine.
rtp_symmetric=yes

The old (original text) in FreePBX ver 13
[GAMMA_Trunk_using_185.196.xxx.xxx_Fibre_0150927xxxx]
type=endpoint
transport=0.0.0.0-udp
context=from-pstn
disallow=all
allow=alaw,gsm,g726,g723,ulaw
aors=GAMMA_Trunk_using_185.196.xxx.xxx_Fibre_0150927xxxx
language=en_GB
outbound_auth=GAMMA_Trunk_using_185.196.xxx.xxx_Fibre_0150927xxxx
t38_udptl=no
t38_udptl_ec=none
fax_detect=no
t38_udptl_nat=no
dtmf_mode=auto

So ?, maybe in FreePBX ver 13 need the rtp_symmetric=yes or direct_media=no or rust_id_inbound=no

Anyway, Thanks you so much for the help, that give me some hints.
Now both ver 13 and v15 Gamma trunk work great.

Daniel White

Well finally the problem was with the Set up in the NAT in FreePBX v13 in “Asterisk SIP Setting” n the section “Local Networks” I added the public IP of Gamma there, and start to work with out any other parameters. This is tricky because only start to work after restart all the server.

However in FreePBX 15, I did not set up nothing there.
Now it is under control.
Thanks

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