A technique for use in controlling routing of a call in a communications system is provided. In one embodiment of the technique, a call routing script is used. The script includes at least one call routing instruction that refers to a variable whose value is stored externally to the script. The value of the variable is determined by the system when the system executes the script for determining a destination for the call. The value of the variable is stored in a database, and the database is read to determine the value of the variable.