[asterisk-dev] SipAddHeader and SIP REFER

Olle E. Johansson oej at edvina.net
Tue Mar 15 03:01:57 CDT 2011


14 mar 2011 kl. 21.35 skrev Kirill Katsnelson:

> Additional headers from SIPAddHeader are not added to the REFER packet. This is a practical case for us now.
> 
> The machinery is all there, so it seems an easy fix. I do not know, however, what is the best way to implement the functionality so it might be useful to everyone. I see the following options:
> 
> 1. Just always add the headers if set in the dialplan, just like it is done with the INVITE.
> 
> 2. Create an option in sip.conf that would enable behavior (1), default off.
> 
> 3. Extend Transfer() application with a flag argument, and a flag to enable sending the extra headers.
> 
> 4. Do not release a patch. Nobody would be interested anyway.
> 
> I would be all for the option (1); however, it might have regression implication, if someone's implementation depends on not sending the extra headers. Cannot think of an RFC compliant SIP implementation that would be really broken, but can cause e. g. unintended information leak.
> 
> (2) seems a good compromise in this case, while (3)seems overcomplicated to me.
> 
> What do you think?

1) Be careful with locking issues. I added something that checked channel variables during a call (MAX_FORWARDS) that we simply could not solve.
If you want to use this for a REFER during a call, you're in the same neighbourhood. That's no good.

2) Maybe we should consider a separate list of headers for REFER. THe proper way would be to store these in a channel storage unit, not in channel variables. The current sip-header implementation was done before we had data storage for channels.

3) Do not extend TRANSFER for this, it will be non-generic

4. Please work on a patch!

Regards,
/O


More information about the asterisk-dev mailing list