To set the target for diverted calls, send 9 in the first byte and 6 in the second. The following bytes must be a character string representing the divert destination extension. For example, to set the divert destination to extension 236, use the following function:
unsigned char buf[6];
int len = 6;
buf[0] = 9; // The first two bytes are devspecific constants
buf[1] = 6;
buf[2] = '2';
buf[3] = '3';
buf[4] = '6';
buf[5] = 0; // Don't forget the null terminator