Call deflection by endpoint (302) not working, probably due to Diversion Header

Hello community,

i am pretty new to FreePBX.
I already figured out some things but with one problem I need some help.

I try to use call forwarding enabled by a phone/endpoint (not using die Asterisk Featurecode).
Every time there is a diversion header added with my extension. Lets say my extension is 15 than the header looks like

Diversion: "Name" <sip:[email protected];user=phone>;reason=unknown

My provider wants a real number or no diversion header at all but I could not figure out a way to change oder remove this header.

This is something else i tried:

[macro-dialout-trunk-predial-hook]
exten => s,1,NoOp(Executing custom predial hook to remove Diversion)
    same => n,Set(PJSIP_HEADER(remove,Diversion))
    same => n,Set(PJSIP_HEADER(add,Diversion)=<sip:[email protected]>\;reason=unconditional\;screen=yes\;privacy=off)
    same => n,Return()

It just keeps the header i mentioned above.

Forwarding a call with asterisk feature Code ist working.

Any ideas?

Thank you.
NetRacer

You are fighting the system when you explicitly set Diversion headers. It sounds like you are trying to undermine the automated processing, rather than using REDIRECTING - Asterisk Documentation to work with the system.

Sorry, I have only used this sort of thing on raw Asterisk, and that was many years ago, so I can’t tell you how to do it cleanly with FreePBX.

Hello,
I found a solution to change the diversion header for a diverted call:
same => n,Set(REDIRECTING(from-name)=Support Team)
same => n,Set(REDIRECTING(from-num)=004940xxxxxxxc)

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