[asterisk-bugs] [Asterisk 0015801]: chan_sip.c : SIP_PAGE2_CALL_ONHOLD* flags missing a bit

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Aug 31 09:09:24 CDT 2009


The following issue has been ASSIGNED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15801 
====================================================================== 
Reported By:                pherman
Assigned To:                dvossel
====================================================================== 
Project:                    Asterisk
Issue ID:                   15801
Category:                   Channels/chan_sip/General
Reproducibility:            N/A
Severity:                   minor
Priority:                   normal
Status:                     assigned
Asterisk Version:           1.6.1.5 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-08-31 08:31 CDT
Last Modified:              2009-08-31 09:09 CDT
====================================================================== 
Summary:                    chan_sip.c : SIP_PAGE2_CALL_ONHOLD*  flags missing a
bit
Description: 
here's an easy one.  In chan_sip.c, we have:

#define SIP_PAGE2_CALL_ONHOLD           (3 << 23)       /*!< D: Call hold
states: */
#define SIP_PAGE2_CALL_ONHOLD_ACTIVE    (1 << 23)       /*!< D: Active
hold */
#define SIP_PAGE2_CALL_ONHOLD_ONEDIR    (2 << 23)       /*!< D: One
directional hold */
#define SIP_PAGE2_CALL_ONHOLD_INACTIVE  (3 << 23)       /*!< D: Inactive
hold */

I'm not aware of any bugs this may cause, but this can't be correct, can
it?  I suggest:

#define SIP_PAGE2_CALL_ONHOLD           (7 << 22)       /*!< D: Call hold
states: */
#define SIP_PAGE2_CALL_ONHOLD_ACTIVE    (1 << 22)       /*!< D: Active
hold */
#define SIP_PAGE2_CALL_ONHOLD_ONEDIR    (2 << 22)       /*!< D: One
directional hold */
#define SIP_PAGE2_CALL_ONHOLD_INACTIVE  (4 << 22)       /*!< D: Inactive
hold */

and moving the other flags down one bit.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-08-31 09:09 lmadsen        Status                   new => assigned     
2009-08-31 09:09 lmadsen        Assigned To               => dvossel         
======================================================================




More information about the asterisk-bugs mailing list