FreePBX 17 contract header user=phone

I have a phone connection with Vodafone Kabel Deutschland.
I’m trying to connect via pjsip.
To register my phone number, the contract header must contain user=phone. Currently, it says line=(variable variables).

Actually:
Contact: sip:[email protected]:5060;**line=gmbpsso**

I Need it:
Contact: sip:[email protected]:5060;**user=phone**

The setting under pjsip → advanced → user = phone is enabled, but it doesn’t respond or doesn’t work.

So, how or where can I enable the option?

Regards

It should be none of the provider’s business what is in the contact header other than the domain name and transport. In particular anything to do with the user part of the URI should be of no interest to them. You are asking how to fix a broken provider, and fixes for broken providers tend only to get added if lots of people use them and there are commercial reasons for not moving to a provider who understands the purpose of contact headers.

How to in insert user=phone - FreePBX / Providers - FreePBX Community Forums How to in insert user=phone - Providers - FreePBX Community Forums

That article shows it being set on almost everything but the Contact header on which the Op’s broken provider is insisting it should be put.

This is my log from Asterisk.

Zusammenfassung

<— Transmitting SIP request (683 bytes) to UDP:178.13.17.134:5060 —>
REGISTER sip:sip.kabelfon.vodafone.de SIP/2.0
Via: SIP/2.0/UDP 178.25.126.8:5060;rport;branch=z9hG4bKPj64b7f1c3-3622-44a1-a360-55eecd3ccd53
From: sip:[email protected];tag=8fda3465-60dd-4dd5-a80e-2fb8462d0f5b
To: sip:[email protected]
Call-ID: 6a666c1a-1446-42aa-8917-00dfb7b65ece
CSeq: 14971 REGISTER
Contact: sip:[email protected]:5060;line=hnfctzj
Expires: 3600
Allow: OPTIONS, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INFO, REFER, MESSAGE
Route: sip:[email protected]:5060
Max-Forwards: 70
User-Agent: FPBX-17.0.21(22.5.2)
Content-Length: 0

<— Received SIP response (548 bytes) from UDP:178.13.17.134:5060 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 178.25.126.8:5060;received=178.25.126.8;branch=z9hG4bKPj64b7f1c3-3622-44a1-a360-55eecd3ccd53;rport=5060
From: sip:[email protected];tag=8fda3465-60dd-4dd5-a80e-2fb8462d0f5b
To: sip:[email protected];tag=2136214163
Call-ID: 6a666c1a-1446-42aa-8917-00dfb7b65ece
CSeq: 14971 REGISTER
WWW-Authenticate: Digest realm=“fixed.vodafone.de”,
nonce=“1968aad868fe4dce266dcea0174826147d2d25efcce02b5f5a008b”,
algorithm=MD5,
qop=“auth,auth-int”
Content-Length: 0

<— Transmitting SIP request (980 bytes) to UDP:178.13.17.134:5060 —>
REGISTER sip:sip.kabelfon.vodafone.de SIP/2.0
Via: SIP/2.0/UDP 178.25.126.8:5060;rport;branch=z9hG4bKPjc682a1ac-b132-416f-9726-be9660f1adde
From: sip:[email protected];tag=8fda3465-60dd-4dd5-a80e-2fb8462d0f5b
To: sip:[email protected]
Call-ID: 6a666c1a-1446-42aa-8917-00dfb7b65ece
CSeq: 14972 REGISTER
Contact: sip:[email protected]:5060;line=hnfctzj
Expires: 3600
Allow: OPTIONS, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INFO, REFER, MESSAGE
Max-Forwards: 70
User-Agent: FPBX-17.0.21(22.5.2)
Authorization: Digest username=“KUNDENNUMMER”, realm=“fixed.vodafone.de”, nonce=“1968aad868fe4dce266dcea0174826147d2d25efcce02b5f5a008b”, uri=“sip:sip.kabelfon.vodafone.de”, response=“0821e0b514e621113946ffac2297ecd3”, algorithm=MD5, cnonce=“de100d33dc224c00b96e449f2a303d65”, qop=auth, nc=00000001
Route: sip:[email protected]:5060
Content-Length: 0

<— Received SIP response (428 bytes) from UDP:178.13.17.134:5060 —>
SIP/2.0 403 Forbidden - 102 Authentication failed, 101 Wrong response
Via: SIP/2.0/UDP 178.25.126.8:5060;received=178.25.126.8;branch=z9hG4bKPjc682a1ac-b132-416f-9726-be9660f1adde;rport=5060
From: sip:[email protected];tag=8fda3465-60dd-4dd5-a80e-2fb8462d0f5b
To: sip:[email protected];tag=453311792
Call-ID: 6a666c1a-1446-42aa-8917-00dfb7b65ece
CSeq: 14972 REGISTER
Content-Length: 0

[2025-10-26 17:35:27] WARNING[9308]: res_pjsip_outbound_registration.c:1570 handle_registration_response: 403 Forbidden fatal response received from ‘sip:[email protected]:5060’ on registration attempt to ‘sip:[email protected]:5060’, retrying in ‘30’ seconds

the line=hnfctzj is currently no longer being sent. However, nothing is now sent in the contract header.

Contact: sip:[email protected]:5060;line=hnfctzj

now it is in the header

Contact: sip:[email protected]:5060;

but I need it:

Contact: sip:[email protected]:5060;user=phone

user_eq_phone=yes is already in the pjsip.endpint_custom_post.conf

Regarts

My Settings but in German (Send Line in Registration is now off and User = Phone is actually on!)




The “user_eq_phone” option does not currently apply to the Contact header in outbound registrations. There is nothing you can do to change this from configuration, it would require code modifications.

And how do I activate the option? Or do I have to use a previous version of FreePBX?

Best regards

The code doesn’t exist in chan_pjsip, so no version of FreePBX will do what you want with it. I don’t know what chan_sip did.

chan_sip is no longer available in FreePBX 17?

There are two parts. FreePBX is an interface/functionality on top of Asterisk, so it needs to have functionality to configure chan_sip. I believe that still exists. Asterisk itself is what provides chan_sip, and chan_sip was removed in Asterisk 21. Prior versions still have it.

Ah yes, after reading carefully, I just noticed that it is no longer available in asterisk… Then i have a problem..

I am puzzled by the Route header in your REGISTER requests. This would normally be associated with an Outbound Proxy setting (which you don’t need and don’t have). Possibly, it is causing trouble. See if you can eliminate it by setting Outbound Proxy to
sip:sip.kabelfon.vodafone.de\;lr\;hide
(note backslash semicolon in two places).

Also, you have many settings which should not be needed in this simple setup. Please try setting them to (blank) and retest:
Client URI
Server URI
AOR
AOR Contact
Match (Permit)

Also, try setting both Send Line in Registration and User = Phone to Nein.

Finally, possibly something went wrong when setting up the account. I understand that you can set your own SIP password in the provider’s portal. Set a new password consisting of no more than 15 letters and digits (no special characters). Use copy/paste to be sure that Kennwort for the trunk is the same.

In a brief look at the chan_sip code, I see nothing that would add anything other than transport to the basic URI, in a contact header.

Basically your provider is trying to read meaning into something that is intended to be opaque data, returned unchanged, to its creator. There are options to include account names, because several providers were found to be broken in terms of trying to interpret the user part as an account name, but this is the first time I recall a provider that also insists on user=phone.

I don’t think falling back to Asterisk 20, or adding the third party forked chan_sip for later versions, is going to help you.