Diversion Header

I have a client that on their key system has line appearances for each analog line and has 3 different companies. They know how to answer the phone stating the appropriate companies name because they know if line 1 rings it is company A and that if line 2 rings it is company B.

I need to mimic these settings so, I would like to use an ext with a forward no answer setup and use the diversion header information to display that ext so that they will know what company to answer the phone as.

We have Polycom phones setup to use the diversion header if it is passed, what we cannot figure is how to make get the diversion header added to the SIP invite.

We have tried adding the line to several different macro sections of the extensions.conf but cannot make get it to send an invite with the diversion header.

exten => s-NOANSWER,1,SIPAddHeader(Diversion: tel:${ARG1};reason=user-busy;screen=no;privacy=off

Can someone please assist in getting this corrected please.

Thanks,

BS

If I could do it on the ring group I would like to do that as well.

You have unbalanced parentheses. Also ; is the comment delimiter. I don’t know about Asterisk, but most parsers would need it to be escaped.

The actual line we did use had the ;'s escaped with a \ and has a closing )

Not sure if Bryan’s original post didn’t include them or if the forum didn’t like them.

exten => s-NOANSWER,1,SIPAddHeader(Diversion: <tel:${ARG1}>\;reason=user-busy\;screen=no\;privacy=off)

Trying the line with the Code tags.