FreePBX 17 pjsip registration with Swiss telecom Swisscom

Here are my two config files, which I think are related. I believe the auth name is transmitted wrong. Swisscom_sip is the name of the trunk.

outbound_auth=Swisscom_sip

Can I correct it directly in the conference and not use the GUI?

/etc/asterisk/pjsip.endpoint.conf

[Swisscom_sip]
type=endpoint
transport=0.0.0.0-udp
context=from-pstn
disallow=all
allow=ulaw,alaw,g722,g729
aors=Swisscom_sip
send_connected_line=no
rtp_keepalive=0
language=de_DE
outbound_proxy=sip:fs1.ims.swisscom.ch;lr;hide
outbound_auth=Swisscom_sip
user_eq_phone=no
t38_udptl=no
t38_udptl_ec=none
fax_detect=no
trust_id_inbound=no
t38_udptl_nat=no
direct_media=no
rtp_symmetric=yes
dtmf_mode=auto

pjsip.registration.conf
[0]
#include pjsip.registration_custom.conf
[Swisscom_sip]
type=registration
transport=0.0.0.0-udp
outbound_auth=Swisscom_sip
retry_interval=180
fatal_retry_interval=180
forbidden_retry_interval=180
max_retries=10000
expiration=3600
auth_rejection_permanent=no
line=yes
endpoint=Swisscom_sip
server_uri=sip:swisscom.ch:5060
client_uri=sip:[email protected]:5060
outbound_proxy=sip:fs1.ims.swisscom.ch;lr;hide

You are missing the auth section for this. That will have the username/password in it.

Thanks - I found pjsip.auth.conf with the information. That’s fine.

I’m still baffling why I get a 403 forbidden response

For what? You originally said the trunk was registered and then you showed incoming OPTIONS being rejected with a 403.

Is the trunk registered?

In the Web GUI of FreePBX 17 it says REGISTERED, but debug log shows:

So it is not registered. - sorry if there was a misunderstanding

e[0K<— Received SIP response (397 bytes) from UDP:195.186.128.164:5060 —>
SIP/2.0 403 Forbidden

Via: SIP/2.0/UDP 213.3.28.232:5060;received=100.95.10.115;rport=49156;branch=z9hG4bKPj4e54b979-6296-4573-b124-f6998df0d9ac

To: sip:[email protected];tag=h7g4Esbg_ng2julwn4rt3j6dhllvpnfxpz9gcp86t

From: sip:[email protected];tag=094724cd-2547-4a07-830e-dee17b059392

Call-ID: a069add4-8c39-4f43-9510-f6732416c10b

CSeq: 48724 OPTIONS

Content-Length: 0

That doesn’t mean it is not registered. An OPTIONS is sent to verify reachability, as long as ANY response (including 403) is received it is considered reachable for the purposes of sending calls from FreePBX to the provider.

Your logs show no request being made for the auth name, so it shouldn’t be transmitted at all. You are falling at the first hurdle and not being considered something even worth challenging to authenticate itself.

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