[asterisk-bugs] [LibPRI 0017594]: [patch] UUI Information is treated as a null terminated string, it's really a binary value.

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Sep 1 08:43:23 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17594 
====================================================================== 
Reported By:                mrwho
Assigned To:                
====================================================================== 
Project:                    LibPRI
Issue ID:                   17594
Category:                   General
Reproducibility:            always
Severity:                   tweak
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           SVN 
JIRA:                       SWP-1837 
libpri Version:             SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 1827 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2010-07-07 03:29 CDT
Last Modified:              2010-09-01 08:43 CDT
====================================================================== 
Summary:                    [patch] UUI Information is treated as a null
terminated string, it's really a binary value.
Description: 
  UUI is being treated in libpri as a null terminated string, The truth is
that the standard actually even defines "\000" to be a marker for user
specific data. The implementation as it is wouldn't work for several custom
uses of UUI.
  The patch included makes that field a binary value. I also have included
a patch for asterisk, since then it takes a different approach to getting
and setting the UUI from the channel: we need to take into account that
this variable is a binary one. I created two new functions that allow to
set and get a variable from the channel by coding it in base64. Possibly
not the most elegant way, but it does the job pretty well.
====================================================================== 

---------------------------------------------------------------------- 
 (0126523) mrwho (reporter) - 2010-09-01 08:43
 https://issues.asterisk.org/view.php?id=17594#c126523 
---------------------------------------------------------------------- 
The UUI variable as it is now is pretty much useless. By doing the encoding
as per SIP specifications it means it could be used in the dialplan to set
the headers on outgoing SIP calls coming in from an ISDN line by simply
using the variable as it is.

  If you need to use the variable in another piece of code you could
simple decode it and use it - I will create a couple of utility functions
that could take the string as it is and return the value in a binary array,
and viceversa. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-09-01 08:43 mrwho          Note Added: 0126523                          
======================================================================




More information about the asterisk-bugs mailing list