[sr-dev] [kamailio] modules/uac: Record-Route header parameter format for replace_uri (#455)

Dmitri Savolainen notifications at github.com
Sun Dec 27 14:38:27 CET 2015


Module uac use some kind of Base64 for SipUri saving in Record-Route header parameter "rr_from_store_param" 
Base64 is case sensitive, but according to rfc3261:
```
   When comparing header fields, field names are always case-
   insensitive  Unless otherwise stated in the definition of a
   particular header field, field values, parameter names, and parameter
   values are case-insensitive  Tokens are always case-insensitive
   Unless specified otherwise, values expressed as quoted strings are
   case-sensitive For example,

      Contact: <sip:alice at atlantacom>;expires=3600

   is equivalent to

      CONTACT: <sip:alice at atlantacom>;ExPiReS=3600

   and

      Content-Disposition: session;handling=optional

   is equivalent to

      content-disposition: Session;HANDLING=OPTIONAL

   The following two header fields are not equivalent:

      Warning: 370 devnull "Choose a bigger pipe"
      Warning: 370 devnull "CHOOSE A BIGGER PIPE"
```
Ok " values expressed as quoted strings are case-sensitive", so I thought to make a quoted string like
```
Record-Route: <sip:xxxxxxxxxxxx:5071;lr;ftag=SDj3nsa01-78422015;vsf="baSE64strinG";nat=yes>
```
but according to rfc3261 DQUATE is not possible here:
```
other-param       =  pname [ "=" pvalue ]
pname             =  1*paramchar
pvalue            =  1*paramchar
paramchar         =  param-unreserved / unreserved / escaped
param-unreserved  =  "[" / "]" / "/" / ":" / "&" / "+" / "$"
```
Some devices in my network convert "rr_from_store_param" to lower-case letters, so there is trash in To/From headers after restore,  It is not wise behaviour, but is rfc compliant 

So any idea for using Base32 instead of Base64?

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/455
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20151227/7e520caa/attachment.html>


More information about the sr-dev mailing list