As many of the forums and config files say, with FreePBX, editing a *.config file is not recommended as it will get overwritten the instant you apply a new configuration using the “Apply Config” button".
This may work for a raw Asterisk setup, but with FreePBX, most of the configuration files are automated and get constantly overwritten by the UI, especially SIP information.
You also never specified whether you are using PJSIP or CHAN_SIP as those are two separate entities that can be used for registration. If the phone is looking for port 5060, the default is PJSIP. You may also need to add the custom configuration in the appropriate pjsip config file.
I’m using Chan_SIP since I read the PJSIP is harder to add header to.
About the config file I was under the impression that using the _custom.conf files would not be overwritten… I’m using the GUI to edit that file in Admin -> Config Edit…
I was assuming you were editing it directly on the computer hosting FreePBX without the UI. Editing the custom_*.config files through the GUI should not get overwritten, but if I have done my research properly, using these custom files also means that the information in them will have less priority over the standard configuration.
Also, the CLI doesn’t always have all the information. You may need to run TCPDump on the machine directly to verify whether or not FreePBX is actually appending the header or not. I personally use a separate machine on a hub to do this to so that I can use Wireshark to view the resulting *.pcap easier.
Alternatively, is there any way to disable the header on the phone you are using? Have you looked into that?
The information in the _custom config files is processed last, so if the ‘context steps’ you are trying to add are already defined, they will not be added again. To override the options in FreePBX (and set the precedence of your commands higher) add them to the “*_override*” config files.
That context is called when your extension is trying to make a call, so the phone is sending that header to the PBX in the SIP headers. I’m not sure that’s the right place for your experiment. A SIP Debug would probably go a long way to helping you find the place to add your request (see what’s getting sent to the phone and find out where Asterisk/FreePBX is sending that).