The setstring instruction sets string parameter associated with a script.
Synopsis
#include "tas_defs.h"
setstring (type.src, ctype.dst)
Description
The setstring instruction sets a string parameter associated with a script. For example, setstring can be used to set the calling party number on outbound calls by setting the OUTBOUND_ANI parameter. After setstring is invoked, subsequent outbound calls use the ctype.dst argument as the outbound calling party number.
Register 0 is set to -1 if the ctype.dst argument is too long or if the type.src argument is invalid. Register 0 is set to -2 if the ctype.dst argument is not a valid number.
Examples
The following examples set the calling party number of an outbound call to (614) 555-1212:
Example 1:
setstring (OUTBOUND_ANI,"6145551212")
Example 2:
load (int.STRINGTYPE OUTBOUND_ANI)
strcpy (ch.CPN "6145551212")
setstring (int.STRINGTYPE ch.CPN)