[asterisk-dev] adding SIP headers for ALL request within a dialog
marco.happenhofer at tuwien.ac.at
Wed May 28 07:04:28 CDT 2008
I need some special SIP headers in each request within a SIP dialog. So
I modified the chan_sip.c. I extracted the piece of code in the
transmit_invite() function, which adds the SIP header, to a new function
and called that function in every transmit Request function.
To verify the functionality I configured the * in B2BUA mode. Almost
every request (coming from the initiator of the call) gets the
preconfigured SIP headers.
But no all request will get these headers. When the * receives a BYE
from the initiator of the call, he sends an INVITE to the other peer to
modify the destination address for the media traffic, to its own
address. After that INVITE transaction a BYE transaction follows. And in
the requests after the INVITE, the ACK (which belongs to the INVITE) and
the BYE, there are no SIP headers added. After some debugging I found
that the p->owner points to nowhere, and the function can not be
performed without this structure.
So my question: Is it possible to modify the code so that ALL request
within a dialog will get the preconfigured headers?
More information about the asterisk-dev