Contact header manipulation

Hello, I would like to learn how to modify the Contact header in trunk registration.

Currently, I’m sending:
Contact: sip:[email protected]:5060

but I want to include the number of my line, such as 101, 102, 103, or something similar instead of “asterisk”.

I’m aware that there’s a “Contact User” field in trunk settings under “Advanced,” but I’m unsure how to input a variable there. Using something like ${CallerID(num)} doesn’t seem to work.

Thank you for your recommendations.

Nobody knows?
How to imput any variable into the GUI?

Maybe I am wrong but I think adding a variable into the field “Contact User” in the trunk settings is not supported. I think the only way you can do that is by writing a custom dialplan for the [macro-dialout-trunk-predial-hook] context in the extensions_custom.conf file.

[UPDATE]
There is an option “Caller ID into Contact Header” in the GUI (see the post below). I think this is the solution you are looking for.

Thank you, it seems like it is do the thing.

Sorry to bump this, but I am looking for this setting and just cannot seem to find it. I found the quoted thread before this one so did not want to open another thread.

Has that setting changed/moved? Am I crazy and just not seeing it?

Thanks!

In FreePBX 16 you can find it unter Settings > Asterisk SIP Settings > SIP Settings [chan_pjsip] > Caller ID into Contact Header

1 Like

Thanks. I was looking under PJSIP advanced trunk settings and regular Advanced Settings. Hopefully this clears it up for anyone else as well!

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