[asterisk-dev] Applicationmap and multiple Key/ActivatedBy entries.

Russell Bryant russell at digium.com
Mon Sep 17 11:58:17 CDT 2007


Atis wrote:
> [applicationmap]
> nway_start_target => 00,self/callee,Macro,nway_start
> nway_start_source => 00,self/caller,Macro,nway_start

<snip>

> if (!strcmp(feature->exten, code)) {
>   if (option_verbose > 2)
>     ast_verbose(VERBOSE_PREFIX_3 " Feature Found: %s exten:
> %s\n",feature->sname, tok);
>   res = feature->operation(chan, peer, config, code, sense, feature);
>   AST_LIST_UNLOCK(&feature_list);
>   break;
> 
> So, it just calls first feature and activatedby checking is done
> inside. I would be willing to play with this, but my C experience is
> quite limited. So, how should this be best done - create function for
> checking that feature can be used, and do operation() only then. Or
> check some result codes of operation() (for now i got 21 and 23 - they
> are meaningless to me).

I would consider this a valid bug.  In the case that the feature doesn't execute
because of the activated on/by setting, it should return a result that indicates
that the code should keep trying other features for a match.

I went ahead and just fixed it.  See 1.4 and trunk revisions 82594 and 82595.

Thank you for describing the problem extremely well!

-- 
Russell Bryant
Software Engineer
Digium, Inc.



More information about the asterisk-dev mailing list