How to add custom headers to some Trying and ACK responses?

AE
Alexey Ermoshin
Tue, Sep 26, 2017 6:56 AM

Hello there,

I need to add several suctom headers to some outgoing Trying and ACK
responses.
It's not a problem in respect of INVITE, CALLING, OK, etc. But such
responses as Trying and ACK are sent automatically.
It looks like making a custom module with implemented on_tx_response
callback is a good idea, but I see no way to connect pjsip_tx_data with
some call or smth else.
For some calls I need to add custom header, another calls - not...

Any idea how to understand what the pjsip_tx_data is about?


Alexey Ermoshin

Hello there, I need to add several suctom headers to some outgoing Trying and ACK responses. It's not a problem in respect of INVITE, CALLING, OK, etc. But such responses as Trying and ACK are sent automatically. It looks like making a custom module with implemented on_tx_response callback is a good idea, but I see no way to connect pjsip_tx_data with some call or smth else. For some calls I need to add custom header, another calls - not... Any idea how to understand what the pjsip_tx_data is about? --- Alexey Ermoshin