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

Russell Bryant russell at digium.com
Wed Jul 1 17:16:09 CDT 2009


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

Ship it!


 Exten:   Unavailable  CombinedDevice: Unavailable  Dev1:     Unknown  Dev2:     Unknown
 
I would have expected the combined devstate to be "Unknown" here.  The extension state is still what I would expect, though.  All of the other states look good.

- Russell


On 2009-07-01 17:08:18, David Vossel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.digium.com/r/301/
> -----------------------------------------------------------
> 
> (Updated 2009-07-01 17:08:18)
> 
> 
> 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:   Unavailable  CombinedDevice: Unavailable  Dev1:     Unknown  Dev2:     Unknown
>  Exten:          Idle  CombinedDevice:  Not in use  Dev1:  Not in use  Dev2:     Unknown
>  Exten:         InUse  CombinedDevice:      In use  Dev1:      In use  Dev2:     Unknown
>  Exten:          Busy  CombinedDevice:        Busy  Dev1:        Busy  Dev2:     Unknown
>  Exten:   Unavailable  CombinedDevice: Unavailable  Dev1:     Invalid  Dev2:     Unknown
>  Exten:   Unavailable  CombinedDevice: Unavailable  Dev1: Unavailable  Dev2:     Unknown
>  Exten:       Ringing  CombinedDevice:     Ringing  Dev1:     Ringing  Dev2:     Unknown
>  Exten: InUse&Ringing  CombinedDevice:  Ring+Inuse  Dev1:  Ring+Inuse  Dev2:     Unknown
>  Exten:          Hold  CombinedDevice:     On Hold  Dev1:     On Hold  Dev2:     Unknown
>  Exten:          Idle  CombinedDevice:  Not in use  Dev1:     Unknown  Dev2:  Not in use
>  Exten:          Idle  CombinedDevice:  Not in use  Dev1:  Not in use  Dev2:  Not in use
>  Exten:         InUse  CombinedDevice:      In use  Dev1:      In use  Dev2:  Not in use
>  Exten:          Busy  CombinedDevice:        Busy  Dev1:        Busy  Dev2:  Not in use
>  Exten:          Idle  CombinedDevice:  Not in use  Dev1:     Invalid  Dev2:  Not in use
>  Exten:          Idle  CombinedDevice:  Not in use  Dev1: Unavailable  Dev2:  Not in use
>  Exten:       Ringing  CombinedDevice:     Ringing  Dev1:     Ringing  Dev2:  Not in use
>  Exten: InUse&Ringing  CombinedDevice:  Ring+Inuse  Dev1:  Ring+Inuse  Dev2:  Not in use
>  Exten:          Hold  CombinedDevice:     On Hold  Dev1:     On Hold  Dev2:  Not in use
>  Exten:         InUse  CombinedDevice:      In use  Dev1:     Unknown  Dev2:      In use
>  Exten:         InUse  CombinedDevice:      In use  Dev1:  Not in use  Dev2:      In use
>  Exten:         InUse  CombinedDevice:      In use  Dev1:      In use  Dev2:      In use
>  Exten:          Busy  CombinedDevice:        Busy  Dev1:        Busy  Dev2:      In use
>  Exten:         InUse  CombinedDevice:      In use  Dev1:     Invalid  Dev2:      In use
>  Exten:         InUse  CombinedDevice:      In use  Dev1: Unavailable  Dev2:      In use
>  Exten: InUse&Ringing  CombinedDevice:  Ring+Inuse  Dev1:     Ringing  Dev2:      In use
>  Exten: InUse&Ringing  CombinedDevice:  Ring+Inuse  Dev1:  Ring+Inuse  Dev2:      In use
>  Exten:         InUse  CombinedDevice:      In use  Dev1:     On Hold  Dev2:      In use
>  Exten:          Busy  CombinedDevice:        Busy  Dev1:     Unknown  Dev2:        Busy
>  Exten:          Busy  CombinedDevice:        Busy  Dev1:  Not in use  Dev2:        Busy
>  Exten:          Busy  CombinedDevice:        Busy  Dev1:      In use  Dev2:        Busy
>  Exten:          Busy  CombinedDevice:        Busy  Dev1:        Busy  Dev2:        Busy
>  Exten:          Busy  CombinedDevice:        Busy  Dev1:     Invalid  Dev2:        Busy
>  Exten:          Busy  CombinedDevice:        Busy  Dev1: Unavailable  Dev2:        Busy
>  Exten: InUse&Ringing  CombinedDevice:  Ring+Inuse  Dev1:     Ringing  Dev2:        Busy
>  Exten: InUse&Ringing  CombinedDevice:  Ring+Inuse  Dev1:  Ring+Inuse  Dev2:        Busy
>  Exten:          Busy  CombinedDevice:        Busy  Dev1:     On Hold  Dev2:        Busy
>  Exten:   Unavailable  CombinedDevice: Unavailable  Dev1:     Unknown  Dev2:     Invalid
>  Exten:          Idle  CombinedDevice:  Not in use  Dev1:  Not in use  Dev2:     Invalid
>  Exten:         InUse  CombinedDevice:      In use  Dev1:      In use  Dev2:     Invalid
>  Exten:          Busy  CombinedDevice:        Busy  Dev1:        Busy  Dev2:     Invalid
>  Exten:   Unavailable  CombinedDevice: Unavailable  Dev1:     Invalid  Dev2:     Invalid
>  Exten:   Unavailable  CombinedDevice: Unavailable  Dev1: Unavailable  Dev2:     Invalid
>  Exten:       Ringing  CombinedDevice:     Ringing  Dev1:     Ringing  Dev2:     Invalid
>  Exten: InUse&Ringing  CombinedDevice:  Ring+Inuse  Dev1:  Ring+Inuse  Dev2:     Invalid
>  Exten:          Hold  CombinedDevice:     On Hold  Dev1:     On Hold  Dev2:     Invalid
>  Exten:   Unavailable  CombinedDevice: Unavailable  Dev1:     Unknown  Dev2: Unavailable
>  Exten:          Idle  CombinedDevice:  Not in use  Dev1:  Not in use  Dev2: Unavailable
>  Exten:         InUse  CombinedDevice:      In use  Dev1:      In use  Dev2: Unavailable
>  Exten:          Busy  CombinedDevice:        Busy  Dev1:        Busy  Dev2: Unavailable
>  Exten:   Unavailable  CombinedDevice: Unavailable  Dev1:     Invalid  Dev2: Unavailable
>  Exten:   Unavailable  CombinedDevice: Unavailable  Dev1: Unavailable  Dev2: Unavailable
>  Exten:       Ringing  CombinedDevice:     Ringing  Dev1:     Ringing  Dev2: Unavailable
>  Exten: InUse&Ringing  CombinedDevice:  Ring+Inuse  Dev1:  Ring+Inuse  Dev2: Unavailable
>  Exten:          Hold  CombinedDevice:     On Hold  Dev1:     On Hold  Dev2: Unavailable
>  Exten:       Ringing  CombinedDevice:     Ringing  Dev1:     Unknown  Dev2:     Ringing
>  Exten:       Ringing  CombinedDevice:     Ringing  Dev1:  Not in use  Dev2:     Ringing
>  Exten: InUse&Ringing  CombinedDevice:  Ring+Inuse  Dev1:      In use  Dev2:     Ringing
>  Exten: InUse&Ringing  CombinedDevice:  Ring+Inuse  Dev1:        Busy  Dev2:     Ringing
>  Exten:       Ringing  CombinedDevice:     Ringing  Dev1:     Invalid  Dev2:     Ringing
>  Exten:       Ringing  CombinedDevice:     Ringing  Dev1: Unavailable  Dev2:     Ringing
>  Exten:       Ringing  CombinedDevice:     Ringing  Dev1:     Ringing  Dev2:     Ringing
>  Exten: InUse&Ringing  CombinedDevice:  Ring+Inuse  Dev1:  Ring+Inuse  Dev2:     Ringing
>  Exten: InUse&Ringing  CombinedDevice:  Ring+Inuse  Dev1:     On Hold  Dev2:     Ringing
>  Exten: InUse&Ringing  CombinedDevice:  Ring+Inuse  Dev1:     Unknown  Dev2:  Ring+Inuse
>  Exten: InUse&Ringing  CombinedDevice:  Ring+Inuse  Dev1:  Not in use  Dev2:  Ring+Inuse
>  Exten: InUse&Ringing  CombinedDevice:  Ring+Inuse  Dev1:      In use  Dev2:  Ring+Inuse
>  Exten: InUse&Ringing  CombinedDevice:  Ring+Inuse  Dev1:        Busy  Dev2:  Ring+Inuse
>  Exten: InUse&Ringing  CombinedDevice:  Ring+Inuse  Dev1:     Invalid  Dev2:  Ring+Inuse
>  Exten: InUse&Ringing  CombinedDevice:  Ring+Inuse  Dev1: Unavailable  Dev2:  Ring+Inuse
>  Exten: InUse&Ringing  CombinedDevice:  Ring+Inuse  Dev1:     Ringing  Dev2:  Ring+Inuse
>  Exten: InUse&Ringing  CombinedDevice:  Ring+Inuse  Dev1:  Ring+Inuse  Dev2:  Ring+Inuse
>  Exten: InUse&Ringing  CombinedDevice:  Ring+Inuse  Dev1:     On Hold  Dev2:  Ring+Inuse
>  Exten:          Hold  CombinedDevice:     On Hold  Dev1:     Unknown  Dev2:     On Hold
>  Exten:          Hold  CombinedDevice:     On Hold  Dev1:  Not in use  Dev2:     On Hold
>  Exten:         InUse  CombinedDevice:      In use  Dev1:      In use  Dev2:     On Hold
>  Exten:          Busy  CombinedDevice:        Busy  Dev1:        Busy  Dev2:     On Hold
>  Exten:          Hold  CombinedDevice:     On Hold  Dev1:     Invalid  Dev2:     On Hold
>  Exten:          Hold  CombinedDevice:     On Hold  Dev1: Unavailable  Dev2:     On Hold
>  Exten: InUse&Ringing  CombinedDevice:  Ring+Inuse  Dev1:     Ringing  Dev2:     On Hold
>  Exten: InUse&Ringing  CombinedDevice:  Ring+Inuse  Dev1:  Ring+Inuse  Dev2:     On Hold
>  Exten:          Hold  CombinedDevice:     On Hold  Dev1:     On Hold  Dev2:     On Hold
> 
> 
> Thanks,
> 
> David
> 
>




More information about the asterisk-dev mailing list