V
V
Vellis-msk2020-07-14 15:14:08
Asterisk
Vellis-msk, 2020-07-14 15:14:08

How to add SipAddHeader for all calls?

Good afternoon.
There is telephony based on FreePBX Distro.
The task is to add the UNIQUEID value to absolutely all calls (internal, outgoing, incoming) in the SIP Header for further analysis of calls in CRM.
In extensions_custom.conf I add:
exten => _.,1,SIPaddheader(Unique-ID: ${UNIQUEID})
And when we receive an incoming call from another internal number, we see that the necessary information has been received:
5f0da11b064f0481794614.png
No matter how I twisted SIPaddheaderit in this file, I can't add UNIQUEID to the header of outgoing calls, and incoming calls "from outside".

UPDATE:
In extensions_custom.conf added the following:

[macro-dialout-one-predial-hook]
exten => s,1,SIPAddHeader(X-Unique-ID: ${UNIQUEID})
exten => s,n,MacroExit()

Now the header is added to all incoming ones (internal, "from outside", forwarded, returned from the queue, etc.). It remains to achieve the same effect for outgoing.
UPDATE UPDATE:
Bug, when calling from the queue, the header is not added, only when entering the extension number.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question