[asterisk-users] PJSIP_HEADER - Diversion header manipulation

Davor Jovanovic davor.jovanovic at srce.hr
Tue Dec 11 08:11:14 CST 2018


got it working by using REDIRECTING function, thank you.

Davor

On 11.12.2018. 14:46, Joshua C. Colp wrote:
> 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
> 



More information about the asterisk-users mailing list