backup
[lcr.git] / route.c
diff --git a/route.c b/route.c
index 7bbae0c..97c61a6 100644 (file)
--- a/route.c
+++ b/route.c
@@ -222,6 +222,9 @@ struct param_defs param_defs[] = {
        { PARAM_NOPASSWORD,
          "nopassword", PARAM_TYPE_NULL,
          "nopassword", "Don't ask for password. Be sure to authenticate right via real caller ID."},
+       { PARAM_STRIP,
+         "strip",      PARAM_TYPE_NULL,
+         "strip", "Remove digits that were required to match this rule."},
        { 0, NULL, 0, NULL, NULL}
 };
 
@@ -309,7 +312,7 @@ struct action_defs action_defs[] = {
 //       "Caller calls the timer."},
        { ACTION_GOTO,
          "goto",       NULL, &EndpointAppPBX::action_dialing_goto, NULL,
-         PARAM_CONNECT | PARAM_RULESET | PARAM_SAMPLE,
+         PARAM_CONNECT | PARAM_RULESET | PARAM_STRIP | PARAM_SAMPLE,
          "Jump to given ruleset and optionally play sample. Dialed digits are not flushed."},
        { ACTION_MENU,
          "menu",       NULL, &EndpointAppPBX::action_dialing_menu, NULL,
@@ -361,7 +364,7 @@ struct action_defs action_defs[] = {
        { ACTION_EFI,
          "efi",        &EndpointAppPBX::action_init_efi, NULL, NULL,
          PARAM_PROCEEDING | PARAM_ALERTING | PARAM_CONNECT,
-         "Elektronische Fernsprecher Identifikation."},
+         "Elektronische Fernsprecher Identifikation - announces caller ID."},
        { -1,
          NULL, NULL, NULL, NULL, 0, NULL}
 };
@@ -2044,7 +2047,7 @@ struct route_action *EndpointAppPBX::route(struct route_ruleset *ruleset)
                                goto match_string;
 
                                case MATCH_DIALING:
-                               string = e_dialinginfo.number;
+                               string = e_dialinginfo.id;
                                goto match_string_prefix;
 
                                case MATCH_ENBLOCK:
@@ -2384,7 +2387,7 @@ struct route_action *EndpointAppPBX::route(struct route_ruleset *ruleset)
                        /* set timeout in the furture */
                        e_match_timeout = timeout;
                        e_match_to_action = rule->action_first;
-                       e_match_to_extdialing = e_dialinginfo.number + dialing_required;
+                       e_match_to_extdialing = e_dialinginfo.id + dialing_required;
                        match = 0; /* matches in the future */
                }
                if (match == 1)
@@ -2393,7 +2396,7 @@ struct route_action *EndpointAppPBX::route(struct route_ruleset *ruleset)
                        action = rule->action_first;
                        e_match_timeout = 0; /* no timeout */
                        e_match_to_action = NULL;
-                       e_extdialing = e_dialinginfo.number + dialing_required;
+                       e_extdialing = e_dialinginfo.id + dialing_required;
                        break;
                }
                if (match == 2)