Asterisk 19: PJSIP Transfer with Headers on REINVITE and TRANSFER

How do I attached SIP headers to a Transfer (SIP Refer)? According to PJSIP_HEADER wiki, I’m probably attaching the header to the incoming channel. But Transfer doesn’t have a pre-dial handler to attach headers.

> same => n,Answer()
> same => n,Playback(transfer-message)
> same => n,Set(PJSIP_HEADER(add,_test)={test}) same => n,Transfer(PJSIP/sip:{EXTEN}@inbound)

According to the following post this functionality is not supported.

Is it supported in Asterisk 19? Is there any other way to add/update/remove headers on REINVITE and TRANSFER ?

Thanks and best,
Andreas

No, noone has written such functionality.

If we want to write such functionality, where would we add it? Which file?

Best,
Andreas

The PJSIP_HEADER dialplan function is contained within its own module[1].

[1] asterisk/res_pjsip_header_funcs.c at master · asterisk/asterisk · GitHub

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