Help configuring SIP Trunk

Hi there! I am trying to configure the SIP Trunk my ISP provides me (Movistar / Telefónica de España).

I found online some configuration file from someone who got this working for this SIP Trunk.

Full file: PJSIP-Movistar/pjsip.conf at main · wifreaks/PJSIP-Movistar · GitHub

It reads - partly:

[Movistar_reg]
type=registration
transport=transport-udp
outbound_auth=Movistar_auth
server_uri=sip:10.31.255.134:5070
client_uri=sip:[email protected]
contact_user=999999999
retry_interval=60
expiration=3600
support_path=yes

[Movistar_auth]
type=auth
auth_type=userpass
password=999999999
[email protected]
realm=telefonica.net

[Movistar_aor]
type=aor
max_contacts=2
contact=sip:[email protected]
qualify_frequency=60
qualify_timeout=30
support_path=yes
;send_rpid=yes
;send_pai=yes

[Movistar_endpoint]
type=endpoint
transport=transport-udp
context=from-movistar
disallow=all
allow=ulaw
allow=alaw
allow=gsm
allow=g729
outbound_auth=Movistar_auth
outbound_proxy=sip:10.31.255.134:5070\;lr
aors=Movistar_aor
from_user=999999999
from_domain=telefonica.net
callerid=asreceived
send_pai=yes
rewrite_contact=no
send_pai=yes
send_rpid=yes

[Movistar_identify]
type=identify
endpoint=Movistar_endpoint
match=10.31.255.134

Unfortunately, when creating a Trunk via Connectivity > Trunks, I don’t know how to map these settings to GUI fields.

I tried to do this using Config Edit… but it was a painful rabbithole which I couldn’t make work.

So I please ask for your help today in order to Add this Trunk.

Thank you.

The only difficult one I can see is support_path, and that doesn’t appear to do anything in your usage (outbound registration), so I’d reject it as an error in the guidance you have been given. I’d suggest trying to fit them to the GUI yourself, and coming back with specific ones which you can’t match, and an outline of how you tried to match them and why you rejected possibilities.

Try these settings. If it won’t register, turn on pjsip logger, wait for a registration attempt and post the REGISTER request and associated replies.

Username: 999999999 (use actual username)
Auth username: [email protected]
Secret: 999999999 (use actual password)
SIP Server: telefonica.net
From Domain: telefonica.net
From User: (same as username)
Outbound Proxy: sip:10.31.255.134:5070\;lr\;hide
Send RPID/PAI: Both

Leave all other settings at their defaults.

If the information the OP was originally given works, the hide option isn’t necessary. That’s at least something to try, if it doesn’t work.

They’ll need to specify registration and authentication, as outbound.

Hello Jmdv

How are you doing I came across your post and I see this is what I am expert on and I will like to help you make this achieve, do you still need help with the sip configuration if yes let me know thanks

Best Regard

Phill

Hi! No worries, I will help you set up your Movistar SIP trunk quickly and correctly. I’ll map the config settings from the file directly into your FreePBX GUI, so you won’t have to deal with confusing edits or errors. Let’s get it working smoothly today!