Index: pbx.c =================================================================== RCS file: /usr/cvsroot/asterisk/pbx.c,v retrieving revision 1.300 diff -u -r1.300 pbx.c --- pbx.c 9 Nov 2005 01:51:46 -0000 1.300 +++ pbx.c 9 Nov 2005 16:30:53 -0000 @@ -187,9 +187,6 @@ int ast_pbx_outgoing_cdr_failed(void); -static int pbx_builtin_prefix(struct ast_channel *, void *); -static int pbx_builtin_suffix(struct ast_channel *, void *); -static int pbx_builtin_stripmsd(struct ast_channel *, void *); static int pbx_builtin_answer(struct ast_channel *, void *); static int pbx_builtin_goto(struct ast_channel *, void *); static int pbx_builtin_hangup(struct ast_channel *, void *); @@ -349,18 +346,6 @@ " NoOp(): No-operation; Does nothing." }, - { "Prefix", pbx_builtin_prefix, - "Prepend leading digits", - " Prefix(digits): Prepends the digit string specified by digits to the\n" - "channel's associated extension. For example, the number 1212 when prefixed\n" - "with '555' will become 5551212. This app always returns 0, and the PBX will\n" - "continue processing at the next priority for the *new* extension.\n" - " So, for example, if priority 3 of 1212 is Prefix 555, the next step\n" - "executed will be priority 4 of 5551212. If you switch into an extension\n" - "which has no first step, the PBX will treat it as though the user dialed an\n" - "invalid extension.\n" - }, - { "Progress", pbx_builtin_progress, "Indicate progress", " Progress(): Request that the channel indicate in-band progress is \n" @@ -482,30 +467,6 @@ "present in any descendent channel of this one.\n" }, - { "StripMSD", pbx_builtin_stripmsd, - "Strip leading digits", - " StripMSD(count): Strips the leading 'count' digits from the channel's\n" - "associated extension. For example, the number 5551212 when stripped with a\n" - "count of 3 would be changed to 1212. This app always returns 0, and the PBX\n" - "will continue processing at the next priority for the *new* extension.\n" - " So, for example, if priority 3 of 5551212 is StripMSD 3, the next step\n" - "executed will be priority 4 of 1212. If you switch into an extension which\n" - "has no first step, the PBX will treat it as though the user dialed an\n" - "invalid extension.\n" - }, - - { "Suffix", pbx_builtin_suffix, - "Append trailing digits", - " Suffix(digits): Appends the digit string specified by digits to the\n" - "channel's associated extension. For example, the number 555 when suffixed\n" - "with '1212' will become 5551212. This app always returns 0, and the PBX will\n" - "continue processing at the next priority for the *new* extension.\n" - " So, for example, if priority 3 of 555 is Suffix 1212, the next step\n" - "executed will be priority 4 of 5551212. If you switch into an extension\n" - "which has no first step, the PBX will treat it as though the user dialed an\n" - "invalid extension.\n" - }, - { "Wait", pbx_builtin_wait, "Waits for some time", " Wait(seconds): Waits for a specified number of seconds, then returns 0.\n" @@ -5491,51 +5452,6 @@ return -1; } -static int pbx_builtin_stripmsd(struct ast_channel *chan, void *data) -{ - char newexten[AST_MAX_EXTENSION] = ""; - - if (!data || !atoi(data)) { - ast_log(LOG_DEBUG, "Ignoring, since number of digits to strip is 0\n"); - return 0; - } - if (strlen(chan->exten) > atoi(data)) { - ast_copy_string(newexten, chan->exten + atoi(data), sizeof(newexten)); - } - ast_copy_string(chan->exten, newexten, sizeof(chan->exten)); - return 0; -} - -static int pbx_builtin_prefix(struct ast_channel *chan, void *data) -{ - char newexten[AST_MAX_EXTENSION]; - - if (ast_strlen_zero(data)) { - ast_log(LOG_DEBUG, "Ignoring, since there is no prefix to add\n"); - return 0; - } - snprintf(newexten, sizeof(newexten), "%s%s", (char *)data, chan->exten); - ast_copy_string(chan->exten, newexten, sizeof(chan->exten)); - if (option_verbose > 2) - ast_verbose(VERBOSE_PREFIX_3 "Prepended prefix, new extension is %s\n", chan->exten); - return 0; -} - -static int pbx_builtin_suffix(struct ast_channel *chan, void *data) -{ - char newexten[AST_MAX_EXTENSION]; - - if (ast_strlen_zero(data)) { - ast_log(LOG_DEBUG, "Ignoring, since there is no suffix to add\n"); - return 0; - } - snprintf(newexten, sizeof(newexten), "%s%s", chan->exten, (char *)data); - ast_copy_string(chan->exten, newexten, sizeof(chan->exten)); - if (option_verbose > 2) - ast_verbose(VERBOSE_PREFIX_3 "Appended suffix, new extension is %s\n", chan->exten); - return 0; -} - static int pbx_builtin_gotoiftime(struct ast_channel *chan, void *data) { int res=0;