Diversion Header

My upstream provider has been giving my gray hairs regarding the diversion header, and now want it in a very specific format, which I am not fully understanding how to set.

Currently, my code for the header is as follows:
exten => s,1,Set(DIVERSION_REASON=${IF($[${LEN(${DIVERSION_REASON})}=0]?no-answer:${DIVERSION_REASON})})
exten => s,n,SIPAddHeader(Diversion: >+27${FROM_DID:1}@X.X.X.X>;reason=${DIVERSION_REASON};screen=no;privacy=off))exten => s,n,Return()

This shows up as:
Diversion: >[email protected]>;reason=no-answer;screen=no;privacy=off))exten =>
which has worked fine without issue.

Now they require the following:
Diversion: “+2742XXXXXXX” >[email protected]>;reason=no-answer;screen=no;privacy=off

How do I change my code to add the bit between the " "?

You just add them.

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