[asterisk-dev] [Code Review] Mapping of extension states

David Vossel dvossel at digium.com
Tue Jun 30 13:01:50 CDT 2009



> On 2009-06-30 12:31:16, Russell Bryant wrote:
> > Does the output from your test remain the same after these changes?  I actually expected it to change a bit.
> 
> Russell Bryant wrote:
>     Specifically, I just made a change in this code in trunk to make "Unknown" map to "Unavailable".
>     
>     I suppose that may have actually been in a different part of the code.  Regardless, I think we should get the states between 1.4 and trunk in sync, because I don't think they are right now.
>     
>     Here are the instances that I would have expected to be different on a first pass.  Whether any version does this, we'll see...
>     
>      Exten:          Idle Dev1:     Unknown	Dev2:     Unknown
>       -> Unavailable
>     
>      Exten:          Idle Dev1:     Invalid	Dev2:     Unknown
>       -> Unavailable
>     
>      Exten:          Idle Dev1: Unavailable	Dev2:     Unknown
>       -> Unavailable
>     
>      Exten:          Idle Dev1:     Unknown	Dev2:     Invalid
>       -> Unavailable
>     
>      Exten:          Idle Dev1:     Unknown	Dev2: Unavailable
>       -> Unavailable

Ahh yes, you are correct.  This will be fixed shortly.  My plan is to get it right in 1.4 and merge the exact same logic into trunk/1.6.x so every branch will have the same behavior.  As it is now, all the branches behave differently and in some cases incorrectly.  


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/301/#review913
-----------------------------------------------------------


On 2009-06-30 11:04:07, David Vossel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.digium.com/r/301/
> -----------------------------------------------------------
> 
> (Updated 2009-06-30 11:04:07)
> 
> 
> Review request for Asterisk Developers and Mark Michelson.
> 
> 
> Summary
> -------
> 
> Mapping extension states is tricky.  This patch fixes a few issues with incorrect extension states and adds a cli command to display all possible state mappings.  Look at the test output below and confirm each mapped extension state for the two device states is as expected.
> 
> 
> This addresses bug 15413.
>     https://issues.asterisk.org/view.php?id=15413
> 
> 
> Diffs
> -----
> 
>   /branches/1.4/include/asterisk/devicestate.h 204194 
>   /branches/1.4/include/asterisk/pbx.h 204194 
>   /branches/1.4/main/devicestate.c 204194 
>   /branches/1.4/main/pbx.c 204194 
> 
> Diff: http://reviewboard.digium.com/r/301/diff
> 
> 
> Testing
> -------
> 
> 
>  Exten:          Idle Dev1:     Unknown	Dev2:     Unknown
>  Exten:          Idle Dev1:  Not in use	Dev2:     Unknown
>  Exten:         InUse Dev1:      In use	Dev2:     Unknown
>  Exten:          Busy Dev1:        Busy	Dev2:     Unknown
>  Exten:          Idle Dev1:     Invalid	Dev2:     Unknown
>  Exten:          Idle Dev1: Unavailable	Dev2:     Unknown
>  Exten:       Ringing Dev1:     Ringing	Dev2:     Unknown
>  Exten: InUse&Ringing Dev1:  Ring+Inuse	Dev2:     Unknown
>  Exten:          Hold Dev1:     On Hold	Dev2:     Unknown
>  Exten:          Idle Dev1:     Unknown	Dev2:  Not in use
>  Exten:          Idle Dev1:  Not in use	Dev2:  Not in use
>  Exten:         InUse Dev1:      In use	Dev2:  Not in use
>  Exten:          Busy Dev1:        Busy	Dev2:  Not in use
>  Exten:          Idle Dev1:     Invalid	Dev2:  Not in use
>  Exten:          Idle Dev1: Unavailable	Dev2:  Not in use
>  Exten:       Ringing Dev1:     Ringing	Dev2:  Not in use
>  Exten: InUse&Ringing Dev1:  Ring+Inuse	Dev2:  Not in use
>  Exten:          Hold Dev1:     On Hold	Dev2:  Not in use
>  Exten:         InUse Dev1:     Unknown	Dev2:      In use
>  Exten:         InUse Dev1:  Not in use	Dev2:      In use
>  Exten:         InUse Dev1:      In use	Dev2:      In use
>  Exten:          Busy Dev1:        Busy	Dev2:      In use
>  Exten:         InUse Dev1:     Invalid	Dev2:      In use
>  Exten:         InUse Dev1: Unavailable	Dev2:      In use
>  Exten: InUse&Ringing Dev1:     Ringing	Dev2:      In use
>  Exten: InUse&Ringing Dev1:  Ring+Inuse	Dev2:      In use
>  Exten:         InUse Dev1:     On Hold	Dev2:      In use
>  Exten:          Busy Dev1:     Unknown	Dev2:        Busy
>  Exten:          Busy Dev1:  Not in use	Dev2:        Busy
>  Exten:          Busy Dev1:      In use	Dev2:        Busy
>  Exten:          Busy Dev1:        Busy	Dev2:        Busy
>  Exten:          Busy Dev1:     Invalid	Dev2:        Busy
>  Exten:          Busy Dev1: Unavailable	Dev2:        Busy
>  Exten: InUse&Ringing Dev1:     Ringing	Dev2:        Busy
>  Exten: InUse&Ringing Dev1:  Ring+Inuse	Dev2:        Busy
>  Exten:          Busy Dev1:     On Hold	Dev2:        Busy
>  Exten:          Idle Dev1:     Unknown	Dev2:     Invalid
>  Exten:          Idle Dev1:  Not in use	Dev2:     Invalid
>  Exten:         InUse Dev1:      In use	Dev2:     Invalid
>  Exten:          Busy Dev1:        Busy	Dev2:     Invalid
>  Exten:   Unavailable Dev1:     Invalid	Dev2:     Invalid
>  Exten:   Unavailable Dev1: Unavailable	Dev2:     Invalid
>  Exten:       Ringing Dev1:     Ringing	Dev2:     Invalid
>  Exten: InUse&Ringing Dev1:  Ring+Inuse	Dev2:     Invalid
>  Exten:          Hold Dev1:     On Hold	Dev2:     Invalid
>  Exten:          Idle Dev1:     Unknown	Dev2: Unavailable
>  Exten:          Idle Dev1:  Not in use	Dev2: Unavailable
>  Exten:         InUse Dev1:      In use	Dev2: Unavailable
>  Exten:          Busy Dev1:        Busy	Dev2: Unavailable
>  Exten:   Unavailable Dev1:     Invalid	Dev2: Unavailable
>  Exten:   Unavailable Dev1: Unavailable	Dev2: Unavailable
>  Exten:       Ringing Dev1:     Ringing	Dev2: Unavailable
>  Exten: InUse&Ringing Dev1:  Ring+Inuse	Dev2: Unavailable
>  Exten:          Hold Dev1:     On Hold	Dev2: Unavailable
>  Exten:       Ringing Dev1:     Unknown	Dev2:     Ringing
>  Exten:       Ringing Dev1:  Not in use	Dev2:     Ringing
>  Exten: InUse&Ringing Dev1:      In use	Dev2:     Ringing
>  Exten: InUse&Ringing Dev1:        Busy	Dev2:     Ringing
>  Exten:       Ringing Dev1:     Invalid	Dev2:     Ringing
>  Exten:       Ringing Dev1: Unavailable	Dev2:     Ringing
>  Exten:       Ringing Dev1:     Ringing	Dev2:     Ringing
>  Exten: InUse&Ringing Dev1:  Ring+Inuse	Dev2:     Ringing
>  Exten: InUse&Ringing Dev1:     On Hold	Dev2:     Ringing
>  Exten: InUse&Ringing Dev1:     Unknown	Dev2:  Ring+Inuse
>  Exten: InUse&Ringing Dev1:  Not in use	Dev2:  Ring+Inuse
>  Exten: InUse&Ringing Dev1:      In use	Dev2:  Ring+Inuse
>  Exten: InUse&Ringing Dev1:        Busy	Dev2:  Ring+Inuse
>  Exten: InUse&Ringing Dev1:     Invalid	Dev2:  Ring+Inuse
>  Exten: InUse&Ringing Dev1: Unavailable	Dev2:  Ring+Inuse
>  Exten: InUse&Ringing Dev1:     Ringing	Dev2:  Ring+Inuse
>  Exten: InUse&Ringing Dev1:  Ring+Inuse	Dev2:  Ring+Inuse
>  Exten: InUse&Ringing Dev1:     On Hold	Dev2:  Ring+Inuse
>  Exten:          Hold Dev1:     Unknown	Dev2:     On Hold
>  Exten:          Hold Dev1:  Not in use	Dev2:     On Hold
>  Exten:         InUse Dev1:      In use	Dev2:     On Hold
>  Exten:          Busy Dev1:        Busy	Dev2:     On Hold
>  Exten:          Hold Dev1:     Invalid	Dev2:     On Hold
>  Exten:          Hold Dev1: Unavailable	Dev2:     On Hold
>  Exten: InUse&Ringing Dev1:     Ringing	Dev2:     On Hold
>  Exten: InUse&Ringing Dev1:  Ring+Inuse	Dev2:     On Hold
>  Exten:          Hold Dev1:     On Hold	Dev2:     On Hold
> 
> 
> Thanks,
> 
> David
> 
>




More information about the asterisk-dev mailing list