[asterisk-dev] Clearing pick-up groups on Zap/ channels

Olle E Johansson oej at edvina.net
Mon Nov 6 07:16:26 MST 2006


5 nov 2006 kl. 16.43 skrev Gil Kloepfer:

> I've discovered that in configuration files such as the one for
> chan_zap (where all the options "cascade down" rather than being
> specific for each category, there is no way to indicate that
> channels have no pick-up group after the first group has been
> set.  For example (simplified), in zapata.conf:
>
>   [channels]
>   ; These two phones are in call group/pick-up group #1
>   callerid="Green Phone"<(256) 428-6121>
>   callgroup=1
>   pickupgroup=1
>   channel => 1
>   callerid="Black Phone"<(256) 428-6122>
>   channel => 2
>
>   ; These three channels should not be in ANY pick-up groups, but  
> there
>   ; is no way to clear the previous settings
>   callerid="CallerID Phone" <(256) 428-6123>
>   channel => 3
>   callerid="CallerID Phone" <(256) 704-4666>
>   channel => 4
>   callerid="CallerID Phone" <(630) 372-1564>
>   channel => 5
>
> In the case of channels 3, 4, and 5, there is no valid way to  
> "clear out"
> the "current" callgroup / pickupgroup without encountering an error
> (you could say pickupgroup=none, but that actually throws an error
> from ast_get_group(), although it happens to work).
>
> I'd like to propose making a change to ast_get_group() to allow
> the option "none" that returns a ast_group_t containing no groups set,
> basically zero.  So you could say 'callgroup=none' for example.
>
> Note that callgroup=0 would not do what I am suggesting because 0 is
> a valid group number.  The group/callgroup/pickupgroup is actually a
> bit mask (bits numbered 0 to 63).
>
> If this seems reasonable, please indicate so and I will submit a patch
> for both 1.2 and -trunk (they are essentially the same patch).
Sounds very reasonable. Whether we can see this as a bug or a new
feature is up to Russell to decide. If it's a bug fix, which I think,  
we need
patches for the 1.2 and 1.4 branches plus trunk. Please open an issue
in the bug tracker, upload patches and we'll discuss there.

/O


More information about the asterisk-dev mailing list