[asterisk-dev] number lookup functions

Steve Underwood steveu at coppice.org
Sat Feb 4 23:51:41 MST 2006


Hi,

Asterisk has the following functions:

int ast_canmatch_extension(struct ast_channel *c, const char *context, 
const char *exten, int priority, const char *callerid);
int ast_matchmore_extension(struct ast_channel *c, const char *context, 
const char *exten, int priority, const char *callerid);
int ast_extension_match(const char *pattern, const char *extension);

These are all yes/no type tests. In the general case what most things 
need is a three way decision:
    - it matches now
    - it could match if there were some more digits
    - it does not match.

To get this effect things like chan_zap need to call 2 of the above 
functions. This seems rather inefficient. Is there a good reason why a 
three way function does not exist? Is it just that nobody ever bothered 
to code one?


*By the by, "\return" is missing from the description of every return 
value in pbx.h**. Hence, the doxygen documentation comes out really jumbled.

Regards,
Steve

*



More information about the asterisk-dev mailing list