[asterisk-dev] SIPAdd/RemoveHeader apps

Chris Tooley chris at tooley.com
Tue Jan 20 14:04:02 CST 2009


On Tue, Jan 20, 2009 at 1:59 PM, Tilghman Lesher
<tilghman at mail.jeffandtilghman.com> wrote:
> On Tuesday 20 January 2009 11:10:07 Klaus Darilion wrote:
>> Chris Tooley schrieb:
>> > On Tue, Jan 20, 2009 at 9:42 AM, Tilghman Lesher
>> >
>> > <tilghman at mail.jeffandtilghman.com> wrote:
>> >> On Friday 16 January 2009 16:50:18 Benny Amorsen wrote:
>> >>> Russell Bryant <russell at digium.com> writes:
>> >>>> This is pretty much what I had in mind originally.  Reading headers
>> >>>> would work as it does today, but the write version of the function
>> >>>> would be the same as SIPAddHeader, unless the value is empty, in which
>> >>>> case it would do what SIPRemoveHeader does.
>> >>>
>> >>> I like the current SIPAddHeader because it applies to new SIP packets
>> >>> for outgoing connections, whereas SIP_HEADER applies to packets
>> >>> received from existing connections.
>> >>
>> >> Perhaps if we created a function to do this, it would be
>> >> SIP_OUTGOING_HEADER().
>> >
>> > I like this option too.  I often have to handle this sort of
>> > situation.  If we're going to replace SipAddHeader/SipRemoveHeader,
>> > there needs to be some function to perform the same task.
>>
>> Actually I still favor the applications - as a function usually also
>> provides reading which in this case is not useful, and on the other way
>> a function does not solve the "removing" issue)
>
> As I said previously in this thread, setting it to blank is the equivalent of
> removing it.

I personally find setting something to blank causing something to be
deleted as non-intuitive.  However, I realize there are two camps on
it.



More information about the asterisk-dev mailing list