On Mon, Dec 10, 2018, at 6:02 AM, Davor Jovanovic wrote: > Hi all, > > I’m trying to rewrite Diversion header when call forwarding is done on > the phone. The phone sends "302 Moved Temporarily" response and sets > Diversion header to a local number, but before Asterisk sends this call > towards TSP provider I need to change Diversion header to a full PSTN > number. I am using PJSIP_HEADER in a pre-dial handler (configuration is > below). On the same call I can add some other custom headers (logs are > below). > > Is there any chance I can rewrite Diversion header in this scenario with > PJSIP_HEADER function? Asterisk version is 16.0.1 built from source on > Debian 9.
The Diversion header is created and managed by the implementation in PJSIP itself. It can't be edited using the PJSIP_HEADER dialplan function, but can be manipulated using the normal core mechanisms[1]. [1] https://wiki.asterisk.org/wiki/display/AST/Manipulating+Party+ID+Information#ManipulatingPartyIDInformation-REDIRECTINGdialplanfunction -- Joshua C. Colp Digium - A Sangoma Company | Senior Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: www.digium.com & www.asterisk.org -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
