[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 07:21:07 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 07:21 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.
====================================================================== 

---------------------------------------------------------------------- 
 (0126521) mrwho (reporter) - 2010-09-01 07:21
 https://issues.asterisk.org/view.php?id=17594#c126521 
---------------------------------------------------------------------- 
I see your point. I think it makes sense. Should we at this point implement
simply the whole sheez-bang? I mean: should we generate and set the UUI
variable as per the definition of the header in chapter 5?

       UUI         = "User-to-User" HCOLON uui-data *(SEMI uui-param)
       uui-data    = token
       uui-param   = enc-param | cont-param | purp-param | generic-param
       enc-param   = "encoding=" ("hex" | token)
       cont-param  = "content=" ("isdn-uui" | token)
       purp-param  = "purpose=" ("isdn-interwork" | token)

  In this way we can simply parse and set the channel variable using the
format:

    
56a390f3d2b7310023a;encoding=hex;purpose=isdn-interwork;content=isdn-uui

  Before I get started on this: is there an hex encoder/decoder already or
do I have to implement one? 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-09-01 07:21 mrwho          Note Added: 0126521                          
======================================================================




More information about the asterisk-bugs mailing list