[asterisk-bugs] [Asterisk 0019062]: [patch] PRI party subaddress odd_even_indicator inconsitency / undocumented

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Apr 6 13:11:47 CDT 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=19062 
====================================================================== 
Reported By:                festr
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   19062
Category:                   Channels/chan_dahdi
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     confirmed
Asterisk Version:           SVN 
JIRA:                       SWP-3302 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 311931 
Request Review:              
====================================================================== 
Date Submitted:             2011-04-04 06:35 CDT
Last Modified:              2011-04-06 13:11 CDT
====================================================================== 
Summary:                    [patch] PRI party subaddress odd_even_indicator
inconsitency / undocumented
Description: 
I'm playing with party subaddress -> Call(DAHDI/g1/1234:u0a23a4)

this syntax should set party subaddress to user specified and
odd_even_indicator to 0. Unfortunatly, odd_even_indicator is overwritten in
channels/sig_pri.c in function sig_pri_party_subaddress_from_ast:
pri_subaddress->odd_even_indicator = (length & 1); 

So you cannot set your own odd_even_indicator specified by prefix 'u' or
'U' as it depends always on string length. I've hecked it by uncommenting
"pri_subaddress->odd_even_indicator = (length & 1);" 
====================================================================== 

---------------------------------------------------------------------- 
 (0133463) rmudgett (administrator) - 2011-04-06 13:11
 https://issues.asterisk.org/view.php?id=19062#c133463 
---------------------------------------------------------------------- 
Do you mean way 1 verses way 3?

Way 1 is the safest. The odd/even flag cannot be wrong and eliminates
dialplan programming error by making the u and U prefix identical.

Way 3 leaves it up to the user to either get it right or allow him to play
games with the odd/even flag.  Trust the source. :)

Way 1 should really be done because of its advantages over the other ways
even though it is slightly more complicated.  It involves fixing the
odd/even calculation in sig_pri_party_subaddress_from_ast() and updating
the subaddress parsing code/comments in sig_pri_call(). 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-04-06 13:11 rmudgett       Note Added: 0133463                          
======================================================================




More information about the asterisk-bugs mailing list