Need: different from and contact header


I am currently testing the Vitalpbx 4 (same with Vital 3) with a German provider and pjsip!
Incoming calls work, but for outgoing calls it is rejected.

The provider requires the following for outgoing calls:

“From” = caller number
“To” = Number to call
“Contact” = Provider SIP user
“P-Preferred-Identity” = Billing number Provider.

If I don’t enter anything in the trunk settings for “From User” the “Contact” is output as follows sip:asterisk@192.168.1....!

But if I enter the Provider SIP-User in the Trunk Settings at "From User
the “Contact” is output as follows sip:+491967383737...@192.168.1.... which is correct but in the “From” the provider SIP user is also entered, which is not correct because in the field “From” the caller number must be entered!

Any Idea how to get all those headers different?
On the advanced tab in trunks it will only append and not replace the header. This will not work.

Thanks a lot.

Who can help? Thanks.

2022-08-22 um 16.29.27

For the contact, you can set it on the Trunk

However, I tested this on VitalPBX 3.2.3-2, and it seems like VitalPBX does not add the contact_user=pitzkey to the PJSIP endpoint. So either wait until they fix it. (perhaps it even works on your machine, I only tested on one VM) or add it to a custom file.

For the PAI, disable PAI for the Trunk device profile and manually add it on the Trunk header tab

1 Like

If I recall correctly, that’s applied when the parameter “Require Registration” is set to “Yes”

Well, it shouldn’t be that way. You should allow setting the contact name regardless to the registration method.

If From User is set then it will overwrite the Contact Header.
But the contact_user will not be used even if it is set.


Without From User:

With From User:

The contact_user is NOT used by VitalPBX even when “Require Registration” is set to yes.
This is the problem.
Are you able to fix this please?

Edit: somehow the contact_user is used but not visible in SNGREP. It is not completely ignored. But somehow it is messed up somewhere.

What makes you say that?

We tested a call with the provider. It was not working without the contact_user. Rejected.
As soon as the contact_user is set the call works. But the issues we said still persist.

How did you set the contact header? If it is not in sngrep then it wasn’t properly set.

Thought the contact_user will be the contact header?
Otherwise please send screenshots how we should/could proceed and set it correctly.
Thanks a lot!

See what I said above:

Example for the custom file would be great.

[trunk endpoint name](+type=endpoint)

Yes, this is what we would need.
In Vitalpbx the conatct_user is NOT written to type=endpoint.

We added the contact_user to the type=endpoint and this would work.

Another question:
its like that in the pjsip__…_trunk conf:

[trunk endpoint name](p13)

Is that right then?

[trunk endpoint name](p13)(+type=endpoint)

It seems there are two types of contact users. Check the links below.

Can you please make both work in the next version?
We need it for type=endpoint


No, remove the (p13)

1 Like

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