X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=route.h;h=3530ef45a7ab948b86182b48dc9b7d815f26ee0b;hp=b88712515cc07f5c39fc4e697288f77911b1b99c;hb=b0bd74e35e935aa976b68c594def4e8d2c22ef95;hpb=0a0643e3a561de5f34927ea80c2bd0ce6405fd3c diff --git a/route.h b/route.h index b887125..3530ef4 100644 --- a/route.h +++ b/route.h @@ -41,6 +41,7 @@ enum { /* what to check during runtime */ MATCH_PORT, MATCH_INTERFACE, MATCH_CALLERID, + MATCH_CALLERID2, MATCH_EXTENSION, MATCH_DIALING, MATCH_ENBLOCK, @@ -88,6 +89,12 @@ enum { /* how to parse text file during startup */ PARAM_TYPE_PORTS, PARAM_TYPE_TYPE, PARAM_TYPE_CALLERIDTYPE, + PARAM_TYPE_ON, +}; + +enum { /* defines when a statement should be executed */ + INFO_ON_INIT, + INFO_ON_HANGUP, }; /* parameter ID bits */ @@ -131,11 +138,15 @@ enum { /* how to parse text file during startup */ #define PARAM_CALLERIDTYPE (1LL<<37) #define PARAM_CALLTO (1LL<<38) #define PARAM_ROOM (1LL<<39) -#define PARAM_TIMEOUT (1LL<<40) -#define PARAM_NOPASSWORD (1LL<<41) -#define PARAM_STRIP (1LL<<42) -#define PARAM_APPLICATION (1LL<<43) - +#define PARAM_JINGLE (1LL<<40) +#define PARAM_TIMEOUT (1LL<<41) +#define PARAM_NOPASSWORD (1LL<<42) +#define PARAM_STRIP (1LL<<43) +#define PARAM_APPLICATION (1LL<<44) +#define PARAM_CONTEXT (1LL<<45) +#define PARAM_EXTEN (1LL<<46) +#define PARAM_ON (1LL<<47) +#define PARAM_KEYPAD (1LL<<48) /* action index * NOTE: The given index is the actual entry number of action_defs[], so add/remove both lists!!! @@ -222,29 +233,29 @@ struct route_ruleset { /* the ruleset is a list of rules */ }; struct cond_defs { /* defintion of all conditions */ - char *name; /* item's name */ + const char *name; /* item's name */ int match; /* what to check */ int type; /* type of value (COND_TYPE) */ - char *doc; /* syntax */ - char *help; /* short help */ + const char *doc; /* syntax */ + const char *help; /* short help */ }; struct param_defs { /* definition of all options */ unsigned long long id; /* ID of parameter (just for checking) */ - char *name; /* name of parameter */ + const char *name; /* name of parameter */ int type; /* type of value (PARAM_TYPE_*) */ - char *doc; /* syntax */ - char *help; /* quick help */ + const char *doc; /* syntax */ + const char *help; /* quick help */ }; struct action_defs { /* definition of all actions */ int id; /* ID of parameter (just for checking) */ - char *name; + const char *name; void (EndpointAppPBX::*init_func)(void); void (EndpointAppPBX::*dialing_func)(void); void (EndpointAppPBX::*hangup_func)(void); unsigned long long params; - char *help; + const char *help; }; @@ -270,5 +281,5 @@ void ruleset_free(struct route_ruleset *ruleset_start); void ruleset_debug(struct route_ruleset *ruleset_start); extern char ruleset_error[256]; struct route_ruleset *ruleset_parse(void); -struct route_ruleset *getrulesetbyname(char *name); +struct route_ruleset *getrulesetbyname(const char *name);