[asterisk-dev] SIPAdd/RemoveHeader apps

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Tue Jan 20 13:59:21 CST 2009


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.

-- 
Tilghman



More information about the asterisk-dev mailing list