Using FreePBX 22.214.171.124.
The main function is: calls obtained through a GSM gateway (GoIP) are directed to Time Conditions (and from there to a trunk) or directly to a SIP trunk using Inbound Route(s). Simple as that. Using chan_sip.
The trunk provider needs a specific Diversion header for one of its features.
I just need to add a header to the outbound calls through this sip trunk.
Everything I can find on the internet involves the use of a (deprecated?!) macro which just plain doesn’t work.
When I add anything in the following context in extensions_custom.conf, it doesn’t seem to get executed when I test and call the GSM GW:
exten => s,1,Noop(Entering user defined context macro-dialout-trunk-predial-hook)
;exten => s,1,SipAddHeader(Testhdr: testvalue)
exten => s,n,MacroExit()
Nothing shows up in the (full) log, no header is set when I uncomment the SipAddHeader line.
I use sngrep to monitor SIP communication.
Is there anything I miss here?