![]() |
Configuring Dynamic Prompts, Customizing Accounting Templates, and Directing AAA Requests for Voice Gateways
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Cisco IOS Configuration
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Table of ContentsCisco IOS ConfigurationRetrieving System Time and Date using TCL Clock Commands Playing Information through Dynamic Prompts Directing AAA Requests to a RADIUS Server Directing AAA Requests using Account Numbers
Enabling and Disabling Accounting for any Call LegDirecting AAA Requests using Called Party Number Directing AAA Requests using Trunk Groups Customizing Accounting Packets Cisco IOS ConfigurationThe configuration tasks for each feature are in the following sections: Retrieving System Time and Date using TCL Clock CommandsRefer to the TCL IVR API Version 2.0 Programmer's Guide for information about creating and implementing Tool Command Language (TCL) IVR scripts. To retrieve the system time and date, use the following clock commands: Step 1 To retrieve the system time and date, enter the clock format TCL verb. This command converts an integer time value returned by clock seconds, clock scan, or the atime, mtime, or ctime options of the file command, to human-readable form. If the -format argument is present, the next argument is a string that describes how the date and time are to be formatted. Field descriptors consist of a % followed by a field descriptor character. All other characters are copied into the result. Valid field descriptors are: %a Abbreviated weekday name (Mon, Tue, etc.). %A Full weekday name (Monday, Tuesday, etc.). %b Abbreviated month name (Jan, Feb, etc.). %c Locale specific date and time. %H Hour in 24-hour format (00 - 23). %I Hour in 12-hour format (00 - 12). %U Week of year (01 - 52), Sunday is the first day of the week. %w Weekday number (Sunday = 0). %W Week of year (01 - 52), Monday is the first day of the week. %x Locale specific date format. %X Locale specific time format. %y Year without century (00 - 99). %Y Year with century (for example, 1990) The following field descriptors may not be supported on all operating systems. For example, they may be supported on UNIX and not be supported on Microsoft Windows systems. Cisco IOS software supports the following field descriptors: %e Day of month (1 - 31), no leading zeros. If the -format argument is not specified, the format string %a %b %d %H:%M:%S %Z %Y is used. If the -gmt argument is specified, the next argument must be a boolean. If the argument is true, it specifies that the time will be formatted as Greenwich Mean Time. If the argument is false, the local time-zone will be used as defined by the operating environment. Step 2 To return the current date and time as a system-dependent integer value, enter the clock seconds TCL verb. The unit of the integer value is seconds, allowing it to be used for relative time calculations. The integer value is defined as total elapsed time from an epoch. An epoch is not specified in this command. Playing Information through Dynamic PromptsThis section describes the TCL commands used to retrieve information on a voice gateway and then play them out using dynamic prompts. To play the new dynamic prompts mentioned in the section "Playing System Time and Date using the Media Play Command" below, first download the multi-language script and enable it using the following command:
Step 1 Enter the call language voice command in global configuration mode. Enter en for the argument language. URL is the address where you store the multi-language script. Playing System Time and Date using the Media Play CommandTo play a specific dynamic prompt, use the following TCL verb: Step 1 Enter the media play TCL verb. Assign an incoming or outgoing leg ID, or an information tag.
"d" "a" "n" "n" "y" single-quote "s" space "e" "x" "a" "m" "p" "l" "e"
The prompt names for playable characters are shown in "ASCII Table" Directing AAA Requests to a RADIUS ServerYou can use TCL scripts or the CLI to direct AAA requests to a specific RADIUS server based on: You must perform the following prerequisite tasks before you start directing AAA requests to a RADIUS server: Step 1 Define a RADIUS server by entering the following command: Step 2 Use the RADIUS server defined in Step 1 above to define a AAA group.
b. To configure the IP address of the RADIUS server for the group server, enter the following command in group server configuration mode: Step 3 Use the AAA group defined in Step 2 above to define an AAA method list. a. For voice authentication, enter the aaa authentication login command in global configuration mode. Directing AAA Requests using Account NumbersIt is easier to use TCL scripts instead of the CLI to direct AAA requests using account numbers. To use TCL scripts for directing AAA requests using account numbers, follow the steps below: Step 1 Before you start using TCL scripts to direct AAA requests using account numbers, you must define and apply the interactive voice response (IVR) application on the dial peer. Step 2 Use the authentication, authorization, and accounting TCL verbs to customize your TCL scripts. Refer to the Accounting Template in "An Overview of Dynamic Prompts, Accounting Templates, and Directing AAA Requests" for an example of a TCL script. The authentication, accounting, and authorization TCL verbs are: Step 3 (Optional). If you use the accounting TCL verb, then use the accounting suppress command to suppress accounting on the same dial peer on which you have specified your application. Follow the steps below to suppress accounting on the dial peer: Directing AAA Requests using Called Party NumberYou can use the called party number to direct AAA requests in dial peer mode as follows: Step 1 Define dial peer. a. Enter dial peer configuration mode using the dial peer voice command. The argument number defines a particular dial peer. b. Specify the incoming called number using the incoming called number command in dial peer configuration mode. The argument string is a series of digits that specifies the incoming called number. Step 2 Define the voice class. a. Enter the voice class aaa command in global configuration mode. The argument tag identifies the dial peer. b. Define authentication, authorization, and accounting methods. Enter the authentication, authorization and accounting commands in voice class mode. The argument methodListName is used to name the list of authentication, authorization or accounting methods applicable to each command. c. Define voice class in dial peer mode. Enter dial peer configuration mode and then define the voice class in that mode. The argument tag identifes the same dial peer as in step a above. Directing AAA Requests using Trunk GroupsTo direct AAA requests using trunk groups, a trunk group must first associate with a dial peer. To use this method, group all the interfaces using one trunk group and define only one dial peer instead of individual ports for the interfaces using that trunk group. You can direct AAA requests using trunk groups in dial peer mode as follows: Step 1 Define the trunk group by entering the trunk group command in global configuration mode. The argument tag is a number. Step 2 Use the trunk group tag in Step 1 to group the interfaces. a. Enter the interface serial command in global configuration mode to specify a serial interface on the channelized T1 or E1 controller. The argument slot/port denotes the slot and port number where the channelized T1 or E1 controller is located. The argument timeslot denotes the ISDN D channel timeslot which is 15 for channelized E1 and 23 for channelized T1. Step 3 Use the tag defined in Step 2-b above in dial peer mode. b. Define authentication, accounting, and authorization methods. Enter the authentication method, accounting method, and authorization method commands in voice class mode. The argument methodListName is used to name the list of authentication, accounting, or authorization methods applicable to each command. d. Define the voice class in dial peer mode. The argument tag identifes the same dial peer as in Step a above. e. Define the trunk group in dial peer mode. The argument tag is the the same number as in Step 2-b above. Enabling and Disabling Accounting for any Call LegEnabling voice accounting by using the gw-accounting aaa command will send only the default list of VSAs to the accounting server. Global Configuration ModeTo enable and disable accounting for any call leg in global configuration mode, follow these steps: Step 1 To enable accounting for any call leg, enter the gw-accounting aaa command in global configuration mode. Use the no form of the command to disable accounting. To disable accounting based on the type of dial peer, use the following command: Step 2 To disable accounting based on the type of dial peer, use the following commands: You have a choice of entering pots or voip, based on the type of dial peer. Dial Peer ModeTo disable accounting in dial peer mode, follow these steps: Step 1 Enter the voice class aaa command in global configuration mode. Step 2 Enter the accounting suppress command in voice class aaa mode. Step 3 Enter the voice class aaa command in dial peer mode. Customizing Accounting PacketsThis section contains the following sub-sections: Configuration OverviewAccounting packets for voice calls consist of non voice-specific and voice-specific attributes. This document focuses only on voice-specific attributes. With the introduction of the TCL accounting verb, you can now add some application level attributes through the TCL script and fine-tune the attribute list created by the system to create an accounting template that is customized to your accounting needs. To customize your accounting packets, you must first create accounting templates. If you do not want to customize your accounting packets, enable voice accounting by using the gw-accounting aaa command to generate accounting packets. A specific set of attributes, which include both non voice-specific and voice-specific attributes, is automatically sent by the gateway to the RADIUS server. To view the current list of these VSAs, refer to the RADIUS Vendor Specific Attributes Voice Implementation Guide. For example, in the Accounting Template of "An Overview of Dynamic Prompts, Accounting Templates, and Directing AAA Requests", the default attributes are: In addition to these default VSAs, a new set of voice-specific VSAs is introduced in Cisco IOS Release 12.2(2) XU. Refer to the RADIUS Vendor Specific Attributes Voice Implementation Guide for the current list of VSAs. The Accounting Template in "An Overview of Dynamic Prompts, Accounting Templates, and Directing AAA Requests" lists these new voice-specific VSAs, reproduced here below:
To send all the VSAs to the accounting server use the template callhistory-detail command in global configuration mode. The list of VSAs includes both the default attributes and the new attributes introduced in Cisco IOS Release 12.2(2) XU. The Accounting Template in "An Overview of Dynamic Prompts, Accounting Templates, and Directing AAA Requests" includes the default and new VSAs. Refer to the "Using Callhistory-detail to Send All VSAs" section for configuration details. For the latest list of VSAs, refer to RADIUS Vendor-Specific Attributes Voice Implementation Guide . To fine-tune your accounting packets based on your billing needs, you must create accounting templates using specific VSAs that are applicable to your accounting needs. For example, to target different accounting servers for incoming calls from different trunks, you must define multiple accounting templates and associate them with different sets of incoming dial peers. To create a template, remove the attributes that are not applicable by adding the # sign in front of each of those attributes. To fine-tune your accounting packets, remove attributes that do not apply to your billing needs. Deleting these attributes creates a custom accounting template that acts as a filter, allowing only the defined attributes to be sent to the accounting server. To apply your customized template, first define the template using the call accounting template voice command in global configuration mode, and then apply it using either TCL scripts or the CLI. If you are using the CLI, you can apply the template either in global configuration or dial peer mode. Refer to the "Defining and Applying Customized Accounting Templates" section for configuraion details. Specific VSAs that cannot be controlled by the accounting template are sent as attribute-value (AV) pairs through the avlistSend argument of the TCL verbs used in the script, and they are: Configuration Tasks for Customizing Accounting PacketsUse the "Configuration Overview" section to plan your customizing needs before you begin the applicable configuration tasks below. Generate Accounting Packets by Enabling Voice AccountingTo automatically generate accounting packets by enabling voice accounting, enter the gw-accounting aaa command in global configuration mode. Using Callhistory-detail to Send All VSAsTo send all VSAs (default and new) to the accounting server: Step 1 Enter the gw-accounting aaa command to enter gw accounting aaa mode. Step 2 Enter the acct-template callhistory-detail command in gw accounting aaa mode. Defining and Applying Customized Accounting TemplatesDefining a Customized Accounting TemplateTo define an accounting template: Step 1 Enter the call accounting-template voice command in global configuration mode. Enter the template name for acctTempName. The url is the address where you store the template. Always assign a .cdr extension to the filename in the URL.
Applying a Customized Accounting Template through the CLI in Global Configuration ModeYou can use an accounting template through the CLI (in global configuration or dial peer mode), or by using TCL verbs. To use an accounting template through the CLI in global configuration mode, use the following commands: Step 1 Enter the gw-accounting aaa command to enter gw accounting aaa mode. Step 2 Enter the acct-template command. Assign your template name to acctTempName. Applying a Customized Accounting Template through the CLI in Dial Peer Mode:To apply a customized accounting template through the CLI in dial peer mode, follow these steps: Step 1 Enter the call accounting-template voice command in global configuration mode. Assign your template name to acctTempName and your template address (usually your tftp address) to url. Step 2 Enter the voice class aaa command in global configuration mode. Assign a numerical value to tag. Step 3 Enter the accounting-template command in voice class aaa mode. Assign your template name to acctTempName. Step 4 Change configuration mode from global to dial peer and using the dial peer voice command, enter the voice class aaa command in dial peer mode. The numerical value of tag is the same value of tag in Step 2 above. Applying a Customized Acounting Template through a TCL ScriptYou can use the accounting template through TCL verbs as follows: Step 1 Use the aaa accounting start TCL verb. Assign an incoming or outgoing call leg, or assign an information tag. Assign your template name to acctTempName. Adding Attributes to Accounting Packets through TCL scriptsTo add attributes to accounting packets through TCL scripts, follow these steps: Step 1 Use the avlistSend argument in the TCL verbs to send the following attributes: Step 2 Use TCL verbs for authentication, authorization, and accounting.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|