mo10
August 18, 2022, 1:25pm
#1
Hello,
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.
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
miguel
August 22, 2022, 10:00pm
#4
PitzKey:
contact_user=pitzkey
If I recall correctly, that’s applied when the parameter “Require Registration” is set to “Yes”
PitzKey
August 22, 2022, 10:06pm
#5
Well, it shouldn’t be that way. You should allow setting the contact name regardless to the registration method.
mo10
August 23, 2022, 6:37am
#6
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:
mo10
August 23, 2022, 6:50am
#7
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?
Thanks
Edit : somehow the contact_user is used but not visible in SNGREP. It is not completely ignored. But somehow it is messed up somewhere.
mo10
August 23, 2022, 8:24am
#9
PitzKey:
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.
PitzKey
August 23, 2022, 8:35am
#10
How did you set the contact header? If it is not in sngrep then it wasn’t properly set.
mo10
August 23, 2022, 8:58am
#11
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!
mo10
August 23, 2022, 11:31am
#13
Example for the custom file would be great.
Thx
PitzKey
August 23, 2022, 11:47am
#14
[trunk endpoint name](+type=endpoint)
contact_user=whatever
mo10
August 23, 2022, 3:00pm
#15
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)
type=endpoint
Is that right then?
[trunk endpoint name](p13)(+type=endpoint)
contact_user=whatever
miguel
August 23, 2022, 8:34pm
#16
It seems there are two types of contact users. Check the links below.
;===============OUTBOUND REGISTRATION WITH OUTBOUND AUTHENTICATION============
;
; This is a simple registration that works with some SIP trunking providers.
; You'll need to set up the auth example "mytrunk_auth" below to enable outbound
; authentication. Note that we "outbound_auth=" use for outbound authentication
; instead of "auth=", which is for inbound authentication.
;
; If you are registering to a server from behind NAT, be sure you assign a transport
; that is appropriately configured with NAT related settings. See the NAT transport example.
;
; "contact_user=" sets the SIP contact header's user portion of the SIP URI
; this will affect the extension reached in dialplan when the far end calls you at this
; registration. The default is 's'.
;
; If you would like to enable line support and have incoming calls related to this
; registration go to an endpoint automatically the "line" and "endpoint" options must
; be set. The "endpoint" option specifies what endpoint the incoming call should be
; associated with.
;[mytrunk]
;type=registration
; channel variables specify multiple 'set_var'(s)
;rtp_keepalive= ; Interval, in seconds, between comfort noise RTP packets if
; RTP is not flowing. This setting is useful for ensuring that
; holes in NATs and firewalls are kept open throughout a call.
;rtp_timeout= ; Hang up channel if RTP is not received for the specified
; number of seconds when the channel is off hold (default:
; "0" or not enabled)
;rtp_timeout_hold= ; Hang up channel if RTP is not received for the specified
; number of seconds when the channel is on hold (default:
; "0" or not enabled)
;contact_user= ; On outgoing requests, force the user portion of the Contact
; header to this value (default: "")
;incoming_call_offer_pref= ; Based on this setting, a joint list of
; preferred codecs between those received in an
; incoming SDP offer (remote), and those specified
; in the endpoint's "allow" parameter (local)
; is created and is passed to the Asterisk core.
;
; local - Include all codecs in the local list that
; are also in the remote list preserving the local
; order. (default).
mo10
August 23, 2022, 8:47pm
#17
Can you please make both work in the next version?
We need it for type=endpoint
Thanks
system
Closed
September 22, 2022, 9:14pm
#19
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.