Skip to content

Parameters

Scott Godin edited this page Oct 14, 2025 · 1 revision

Table of Contents

Parameters

Parameters are accessed from headers. The syntax is similar to header access. Like headers, there is an overloaded accessor method. For parameters, this method is param. The argument to param is a parameter type token indicating the parameter to be accessed. The parameter type token always begins with "p_" and the rest is camelCase starting with a lowercase.

For example:

 const Data& tag = msg->header(h_To).param(p_tag);

Like headers, there is also an overloaded exists method and an overloaded remove method. For both methods, the argument is again the parameter type token.

According to the grammar, each header has a set of acceptable parameters. Some headers accept no parameters. reSIP makes a simplifying assumption; all headers can have all parameters. While it is the goal of reSIP that every legal SIP message be parseable, reSIP does not strictly enforce production of legal SIP. In practice, correct usage will result in legal SIP, but it is not very difficult to use reSIP to produce a problematic message. Take home lesson -- the reSIP programmer must take responsibilty when adding parameters to a header.

A corollary to this simplifying assumption is that the form of a parameter is independent of the header it appears in. A ttl parameter must always be followed by an integer even when used in a header that does not specify the syntax for a ttl parameter. (!dlb! potential compatibility issue)

Parameters, like headers, corresponds to a small set of classes that manage parsing, accesing, and serializing to text.

RFC Name reSIP Access Token reSIP Type
+sip.instance p_Instance QuotedDataParameter
access-type p_accessType DataParameter
actor p_actor QuotedDataParameter
algorithm p_algorithm DataParameter
app-id p_appId DataParameter
application p_application ExistsParameter
boundary p_boundary DataParameter
branch p_branch BranchParameter
charset p_charset DataParameter
cnonce p_cnonce QuotedDataParameter
comp p_comp DataParameter
control p_control ExistsParameter
d-alg p_dAlg DataParameter
d-qop p_dQop DataParameter
d-ver p_dVer QuotedDataParameter
data p_data ExistsParameter
description p_description QuotedDataParameter
directory p_directory DataParameter
document p_document DataParameter
domain p_domain QuotedDataParameter
duration p_duration UInt32Parameter
early-only p_earlyOnly ExistsParameter
effective-by p_effectiveBy UInt32Parameter
events p_events QuotedDataParameter
expiration p_expiration QuotedDataParameter
expires p_expires UInt32Parameter
ext p_extension DataParameter
extensions p_extensions QuotedDataParameter
filename p_filename DataParameter
from-tag p_fromTag DataParameter
gr p_gr ExistsOrDataParameter
handling p_handling DataParameter
id p_id DataParameter
isfocus p_isfocus ExistsParameter
language p_language QuotedDataParameter
lr p_lr ExistsParameter
maddr p_maddr DataParameter
method p_method DataParameter
methods p_methods QuotedDataParameter
micalg p_micalg DataParameter
mobility p_mobility QuotedDataParameter
mode p_mode DataParameter
model p_model QuotedDataParameter
name p_name DataParameter
nc p_nc DataParameter
network-user p_networkUser DataParameter
nonce p_nonce QuotedDataParameter
ob p_ob ExistsParameter
opaque p_opaque QuotedDataParameter
permission p_permission DataParameter
priority p_priority QuotedDataParameter
profile-type p_profileType DataParameter
protocol p_protocol QuotedDataParameter
pub-gruu p_pubGruu QuotedDataParameter
purpose p_purpose DataParameter
q p_q QValueParameter
qop p_qop DataParameter
realm p_realm QuotedDataParameter
reason p_reason DataParameter
received p_received DataParameter
refresher p_refresher DataParameter
reg-id p_regid UInt32Parameter
response p_response QuotedDataParameter
retry-after p_retryAfter UInt32Parameter
rinstance p_rinstance DataParameter
rport p_rport RportParameter
schemes p_schemes QuotedDataParameter
server p_server DataParameter
sigcomp-id p_sigcompId QuotedDataParameter
site p_site DataParameter
size p_size DataParameter
smime-type p_smimeType DataParameter
stale p_stale DataParameter
tag p_tag DataParameter
temp-gruu p_tempGruu QuotedDataParameter
text p_text ExistsOrDataParameter
to-tag p_toTag DataParameter
transport p_transport DataParameter
ttl p_ttl UInt32Parameter
type p_type QuotedDataParameter
uri p_uri QuotedDataParameter
url p_url QuotedDataParameter
user p_user DataParameter
username p_username DataParameter or QuotedDataParameter
vendor p_vendor QuotedDataParameter
version p_version QuotedDataParameter
video p_video ExistsParameter

BranchParameter

  Description:
    May have RFC 3261 marker, may have reSIP specific data, may have client
    data.
  Example:
    Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bK776asdhds
  Parts:
    accessor                    reSIP type      settable
    ----------------------------------------------------
    hasMagicCookie()            bool            no
    getTransactionId()          Data            no
    incrementTransportSequence  void            no
    reset(const Data&)          void            yes
    clientData()                Data            yes
 

RCF Parameters:

  • branch

DataParameter

  RFC name:
    token
  Description:
    Quoted or unquoted. Unquoted must be single word.
  Example:
    Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bK776asdhds
  Parts:
    accessor                reSIP type      settable
    ------------------------------------------------
    value()                 Data            yes
    isQuoted()              bool            no
    setQuoted(bool)         void            yes

RFC parameters:

  • access-type
  • algorithm
  • boundary
  • charset
  • comp
  • d-alg
  • d-qop
  • directory
  • filename
  • from-tag
  • handling
  • id
  • maddr
  • method
  • micalg
  • mode
  • name
  • nc
  • permission
  • purpose
  • reason
  • received
  • require
  • rinstance
  • server
  • site
  • size
  • smime-type
  • stale
  • tag
  • to-tag
  • transport
  • user
  • extension
  • username
  • refresher
  • profile-type
  • document
  • app-id
  • network-user
  • qop

ExistsOrDataParameter

  Description:
    Either has no value; and is not followed by "=" or 
    contains a Data token Quoted or unquoted. Unquoted must be single word.
  Example:
    Reason: SIP ;cause=200 ;text="Call completed elsewhere"
  Parts:
    accessor                reSIP type      settable
    ------------------------------------------------
    value()                 Data            yes
    isQuoted()              bool            no
    setQuoted(bool)         void            yes

RFC parameters:

  • text
  • gr

ExistsParameter

  Description:
    Has no value; is not followed by "=".
  Example:
    Record-Route: <sip:p1.example.com;lr>
  Parts:
    accessor                reSIP type      settable
    ------------------------------------------------
    value()                 bool            yes

RFC parameters:

  • data
  • control
  • application
  • video
  • isfocus
  • ob
  • lr
  • early-only

IntegerParameter

  Description:
    Integer
  Example:
    sip:alice@atlanta.com;maddr=239.255.255.1;ttl=15
  Parts:
    accessor                reSIP type      settable
    ------------------------------------------------
    value()                 int             yes

RFC parameters:

QValueParameter

  RFC name:
    qvalue
  Description:
    0-1 inclusive, up to three digits after decimal point.
  Example:
    Accept-Language: da, en-gb;q=0.8, en;q=0.7
  Parts:
    accessor                reSIP type      settable
    ------------------------------------------------
    value()                 QValue          yes
    qval()                  int (0-1000)    yes

RFC parameters:

  • q

QuotedDataParameter

  RFC name:
    quoted-string
  Description:
    Quoted text.
  Example:
    Authorization: Digest username="bob",
                   realm="biloxi.com",
                   nonce="dcd98b7102dd2f0e8b11d0f600bfb0c093",
                   uri="sip:bob@biloxi.com",
                   qop=auth,
                   nc=00000001,
                   cnonce="0a4f113b",
                   response="6629fae49393a05397450978507c4ef1",
                   opaque="5ccc069c403ebaf9f0171e9517f40e41"
  Parts:
    accessor                reSIP type      settable
    ------------------------------------------------
    value()                 Data             yes

RFC Parameters:

  • mobility
  • description
  • events
  • priority
  • methods
  • schemes
  • language
  • type
  • actor
  • extensions
  • +sip.instance
  • pub-gruu
  • temp-gruu
  • cnonce
  • d-ver
  • domain
  • expiration
  • nonce
  • opaque
  • protocol
  • realm
  • response
  • uri
  • vendor
  • model
  • version
  • url
  • sigcomp-id

RportParameter

  RFC name:
    rport
  Description:
    May have a value or not.
  Example:
    Via: SIP/2.0/UDP whistler.gloo.net:6064;rport=6064;received=192.168.2.220;branch=z9hG4bK-kcD23-4-1
  Parts:
    accessor            reSIP type      settable
    --------------------------------------------
     port()             int             yes
     hasValue()         bool            no

RFC Parameters:

  • rport

UInt32Parameter

  Description:
    Integer
  Example:
    sip:alice@atlanta.com;maddr=239.255.255.1;ttl=15
  Parts:
    accessor                reSIP type      settable
    ------------------------------------------------
    value()                 UInt32          yes

RFC Parameters:

  • reg-id
  • duration
  • expires
  • retry-after
  • ttl
  • effective-by

Clone this wiki locally