Chinese Yellow Pages | Classifieds | Knowledge | Tax | IME

SIP protocol always seems to be complicated than I thought/expected.

one example : Sip header Privacy

This header is like this:

Privacy: value
the value could be:

header, session, user, none, and critical ( defined in RFC 3323)

id ( defined in RFC 3325 )
history ( defined RFC 4244 )

The basic idea seems to be simple, based on those value, we should obscured some target information ( header or SDP) while processing sip messages.

 

Here are some explanations:

   Privacy Type  Description                             Reference
   ------------- ----------------------------------      ----------
   user          Request that privacy services           [RFC3323]
                 provide a user-level privacy function

   header        Request that privacy services modify    [RFC3323]
                 headers that cannot be set arbitrarily
                 by the user (Contact/Via).

   session       Request that privacy services provide   [RFC3323]
                 privacy for session media

   none          Privacy services must not perform any   [RFC3323]
                 privacy function

   critical      Privacy service must perform the        [RFC3323]
                 specified services or fail the request

   id            Privacy requested for Third-Party       [RFC3325]
                 Asserted Identity
   history       Privacy requested for                   [RFC4244]
                 History-Info header(s)
   for id:  RFC 3325 defines the P-Asserted-Identity header
   and a priv-value "id", which is used to request privacy for only the
   P-Asserted-Identity header, but it does not specify how other priv-
   values may impact the privacy handling of the P-Asserted-Identity
   header.

If you want to really understand what those means, you should take a look at:  https://tools.ietf.org/html/rfc5379



In asterisk, you can get this header using SIP_HEADER ( only from invite method )

exten => _X.,n,Set(Privacy=${SIP_HEADER(Privacy)})


Leave a Reply

Your email address will not be published. Required fields are marked *