You can access PBX features such as turning on and off a message waiting indicator, dialing programmable keys, and transferring calls, using dial strings in the dx_dial( ) function. dx_dial( ) is a D/4x voice function. For general information on how to use this function, see the Voice Software Reference.
Input parameters for the dx_dial( ) function are defined as follows:
dx_dial( )
Name: int dx_dial(chdev, dialstrp, capp, mode)
Inputs: int chdev _ channel descriptor
char *dialstrp _ pointer to ASCIIZ dial string
DX_CAP *capp _ pointer to Call Progress Analysis Parameter structure
unsigned short mode _ asynchronous/synchronous setting and call analysis flag
The dial string will accept escape sequences that are used to access PBX features. Acceptable ASCII characters for each dial string are the standard DTMF dialing and control characters described in the Voice Software Reference, and the additional characters described in the following paragraphs.
The procedure for accessing a feature is as follows:
4.2.1. Turn On the Message Waiting Indicator
DescriptionA dial string instructs the PBX to light the message waiting indicator on the specific extension. The dial string contains the following components:
|
<ESC> |
the ASCII escape character (0x1B). |
|
command |
an ASCII character that identifies the "turn on message waiting indicator" feature. |
, |
pause |
|
<extension> |
the number of the extension whose message waiting indicator is to be lit. |
The dial strings for specific PBXs are listed below.
MITEL PBX (D/42D-SX)The D/42D-SX channel must be off-hook when dialing this string.
On a SUPERSET 4 telephone, this dial string activates the message indicator on the specified extension. On a non-SUPERSET 4 telephone, message waiting indication can be controlled if the phone is equipped with a message waiting indicator or if it has been assigned to a COS with the Audible Message Waiting (AMW) feature enabled.
Northern Telecom SL-1 (D/42D-SL)<ESC>O,<extension>,<ESC>O
The D/42D-SL channel must be on-hook when dialing this string.
On an SL-1 phone, the message indicator is next to the Message Waiting Key (MWK), a feature key programmed on the telephone. On a non-SL-1 phone, the message waiting indicator can be turned on if the phone is equipped with a message waiting indicator or if it has been assigned to a COS with the Audible Message Waiting (AMW) feature enabled.
Northern Telecom Norstar (D/42-NS)<ESC>O,<extension>,<ESC>O
The D/42-NS channel must be on-hook when dialing this string.
NEC KTS (D/42-NE2)<ESC>O,<extension>,<ESC>O
The D/42-NE2 channel must be on-hook when dialing this string.
NEC PBX (D/42-NE2)<ESC>O,<extension>,<ESC>O
The D/42-NE2 channel must be off-hook when dialing this string.
Example#define ESC 0x1b
unsigned int devh; /* channel descriptor */
char digstr[40];
int turn_on_mwl( )
{
/* set up dial string */
switch (ATD4_CHTYPE(devh))
{
case TYP_SX:
sprintf(digstr,",555,%cO",ESC);
break;
case TYP_SL:
case TYP_NS:
case TYP_NE2KTS:
sprintf(digstr,"%c0,555,%cO",ESC,ESC);
break;
case TYP_NE2PBX:
sprintf(digstr,"%c0,555,%cO",ESC,ESC);
/* for the NEC PBX, channel must be off-hook before dialing */
if(dx_sethook(devh, DX_OFFHOOK, EV_SYNC)==-1)
{
/* Process error */
exit(1);
}
Sleep(1000); /* Allow 1 second for offhook to register */
break;
}
/* turn on message waiting indicator on ext. 555 */
if (dx_dial(devh,digstr,NULL,EV_SYNC) == -1)
{
printf("\nDial failed\n");
exit (1);
}
if(ATD4_CHTYPE(devh) == TYP_NE2PBX)
{
if (dx_sethook(devh,DX_ONHOOK, EV_SYNC)==-1)
{
/* Process error */
exit(1);
}
}
return (0);
}
4.2.2. Turn Off the Message Indicator
DescriptionA dial string instructs the PBX to turn off the message waiting indicator on the specific extension. The dial string contains the following components:
|
<ESC> |
the ASCII escape character (0x1B). |
|
command |
an ASCII character that identifies the "turn off message waiting indicator" feature. |
, |
pause |
|
<extension> |
the number of the extension whose message waiting indicator is to be turned off. |
The dial strings for specific PBXs are listed below.
MITEL PBX (D/42D-SX),<extension>,<ESC>F
The D/42D-SX channel must be off-hook when dialing this string.
Northern Telecom SL-1 (D/42D-SL)<ESC>F,<extension>,<ESC>F
The D/42D-SL channel must be on-hook when dialing this string.
Northern Telecom Norstar (D/42-NS)<ESC>F,<extension>,<ESC>F
The D/42-NS channel must be on-hook when dialing this string. A message waiting indicator can only be disabled by the extension that enables it.
NEC KTS (D/42-NE2)<ESC>F,<extension>,<ESC>F
The D/42-NE2 channel must be on-hook when dialing this string.
NEC PBX (D/42-NE2)<ESC>F,<extension>,<ESC>F
The D/42-NE2 channel must be off-hook when dialing this string.
Example#define ESC 0x1b
unsigned int devh; /* channel descriptor */
char digstr[40];
int turn_off_mwl( )
{
/* set up dial string */
switch (ATD4_CHTYPE(devh))
{
case TYP_SX:
sprintf(digstr,",555,%cF",ESC);
break;
case TYP_SL:
case TYP_NS:
case TYP_NE2KTS:
sprintf(digstr,"%cF,555,%cF",ESC,ESC);
break;
case TYP_NE2PBX:
sprintf(digstr,"%cF,555,%cF",ESC,ESC);
/* for the NEC PBX, channel must be off-hook before dialing */
if(dx_sethook(devh, DX_OFFHOOK, EV_SYNC)==-1)
{
/* Process error */
exit(1);
}
Sleep(1000); /* Allow 1 second for offhook to register */
break;
}
/* turn off message waiting indicator on ext. 555 */
if (dx_dial(devh,digstr,NULL,EV_SYNC) == -1)
{
printf("\nDial failed\n");
exit (1);
}
if(ATD4_CHTYPE(devh) == TYP_NE2PBX)
{
if (dx_sethook(devh,DX_ONHOOK, EV_SYNC)==-1)
{
/* Process error */
exit(1);
}
}
return (0);
}
4.2.3. Dial Programmable Keys
DescriptionThe dial string <ESC>K<key>, enables the D/42-xx boards to access features programmed into the programmable keys available to extensions on the PBX. The dial string contains the following components:
|
<ESC> |
the ASCII escape character (0x1B) |
|
K |
identifies the Dial Programmable Key feature |
|
<key> |
indicates which programmable feature key to access |
|
, |
pause (optional) |
MITEL PBX (D/42D-SX)To access the dial string features on a MITEL SUPERSET 4 Phone, refer Figure 7 to and use the direct key dialing sequences listed in Table 6. Also, refer to the D/42 Series User's Guide for more detailed information about programmable keys.
Figure 7. MITEL SUPERSET 4 Telephone

Table 6. MITEL Direct Key Dialing Sequences
Dial Code |
Key Description |
<ESC>K0 |
Soft Key 1 |
<ESC>K1 |
Soft Key 2 |
<ESC>K2 |
Soft Key 3 |
<ESC>K3 |
Soft Key 4 |
<ESC>K4 |
Soft Key 5 |
<ESC>K5 |
Soft Key 6 |
<ESC>K6 |
Feature Key 0 (display) |
<ESC>K7 |
Feature Key 1 (select features) |
<ESC>K8 |
Feature Key 2 (speaker on/off) |
<ESC>K9 |
Feature Key 3 (mic. on/off) |
<ESC>KA |
Line Key 0 (hold) |
<ESC>KB |
Line Key 1 (prime line) |
<ESC>KC |
Line Key 2 (line or speed dial) |
<ESC>KD |
Line Key 3 (line or speed dial) |
<ESC>KE |
Line Key 4 (line or speed dial) |
<ESC>KF |
Line Key 5 (line or speed dial) |
<ESC>KG |
Line Key 6 (line or speed dial) |
<ESC>KH |
Line Key 7 (line or speed dial) |
<ESC>KI |
Line Key 8 (line or speed dial) |
<ESC>KJ |
Line Key 9 (line or speed dial) |
<ESC>KK |
Line Key 10 (line or speed dial) |
<ESC>KL |
Line Key 11 (line or speed dial) |
<ESC>KM |
Line Key 12 (line or speed dial) |
<ESC>KN |
Line Key 13 (line or speed dial) |
<ESC>KO |
Line Key 14 (line or speed dial) |
<ESC>KP |
Line Key 15 (line or speed dial) |
Northern Telecom SL-1 (D/42D-SL)To access the dial string features on a Northern Telecom Digit Display Phone, refer Figure 8 to and use the direct key dialing sequences listed in Table 7. Also, refer to the D/42 Series User's Guide for more detailed information about programmable keys.
Figure 8. Northern Telecom Digit Display Telephone

Table 7. Northern Telecom SL-1 Direct Key Dialing Sequences
Northern Telecom Norstar (D/42-NS)To access the dial string features on a Northern Telecom Model 7310 telephone, refer to Figure 9 and use the direct key dialing sequences listed in Table 8. Also, refer to the D/42 Series User's Guide for more detailed information about programmable keys.
Figure 9. Northern Telecom Model 7310 Telephone

Table 8. Northern Telecom Norstar Direct Key Dialing Sequences
Dial Code |
Key Description |
<ESC>K0 |
Memory Button 00 - Handsfree/Mute |
<ESC>K1 |
Memory Button 01 - Intercom |
<ESC>K2 |
Memory Button 02 - Intercom |
<ESC>K3 |
Memory Button 03 - Transfer |
<ESC>K4 |
Memory Button 04 |
<ESC>K5 |
Memory Button 05 |
<ESC>K6 |
Memory Button 06 |
<ESC>K7 |
Memory Button 07 |
<ESC>K8 |
Memory Button 08 |
<ESC>K9 |
Memory Button 09 |
<ESC>KA |
Dialpad 0 |
<ESC>KB |
Dialpad 1 |
<ESC>KC |
Dialpad 2 |
<ESC>KD |
Dialpad 3 |
<ESC>KE |
Dialpad 4 |
<ESC>KF |
Dialpad 5 |
<ESC>KG |
Dialpad 6 |
<ESC>KH |
Dialpad 7 |
<ESC>KI |
Dialpad 8 |
<ESC>KJ |
Dialpad 9 |
<ESC>KK |
Dialpad * |
<ESC>KL |
Dialpad # |
<ESC>KM |
Release |
<ESC>KN |
Feature |
<ESC>KO |
Hold |
<ESC>KP |
Display button 00 |
<ESC>KQ |
Display button 01 |
<ESC>KR |
Display button 02 |
<ESC>KS |
Dual Memory button #0 |
<ESC>KT |
Dual Memory button #1 |
<ESC>KU |
Dual Memory button #2 |
<ESC>KV |
Dual Memory button #3 |
<ESC>KW |
Dual Memory button #4 |
<ESC>KX |
Dual Memory button #5 |
<ESC>KY |
Dual Memory button #6 |
<ESC>KZ |
Dual Memory button #7 |
<ESC>Ka |
Dual Memory button #8 |
<ESC>Kb |
Dual Memory button #9 |
<ESC>Kc |
Dual Memory button #10 |
<ESC>Kd |
Dual Memory button #11 |
<ESC>Ke |
Dual Memory button #12 (Shifted button #0) |
<ESC>Kf |
Dual Memory button #13 (Shifted button #1) |
<ESC>Kg |
Dual Memory button #14 (Shifted button #2) |
<ESC>Kh |
Dual Memory button #15 (Shifted button #3) |
<ESC>Ki |
Dual Memory button #16 (Shifted button #4) |
<ESC>Kj |
Dual Memory button #17 (Shifted button #5) |
<ESC>Kk |
Dual Memory button #18 (Shifted button #6) |
<ESC>Kl |
Dual Memory button #19 (Shifted button #7) |
<ESC>Km |
Dual Memory button #20 (Shifted button #8) |
<ESC>Kn |
Dual Memory button #21 (Shifted button #9) |
<ESC>Ko |
Dual Memory button #22 (Shifted button #10) |
<ESC>Kp |
Dual Memory button #23 (Shifted button #11) |
<ESC>DI |
Enable in-band DTMF signaling |
<ESC>DO |
NEC KTS/PBX (D/42-NE2)To access the dial string features on a Dterm Series III telephone, refer to Figure 10 and use the direct key dialing sequences listed in Table 9. Also, refer to the D/42 Series User's Guide for more detailed information about programmable keys.
Figure 10. NEC Dterm III Telephone

Table 9. NEC KTS/PBX Direct Key Dialing Sequences
Dial Code |
Key Description |
<ESC>K1 |
Dialpad 1 |
<ESC>K2 |
Dialpad 2 |
<ESC>K3 |
Dialpad 3 |
<ESC>K4 |
Dialpad 4 |
<ESC>K5 |
Dialpad 5 |
<ESC>K6 |
Dialpad 6 |
<ESC>K7 |
Dialpad 7 |
<ESC>K8 |
Dialpad 8 |
<ESC>K9 |
Dialpad 9 |
<ESC>KA |
Dialpad 0 |
<ESC>KB |
Dialpad * |
<ESC>KC |
Dialpad # |
<ESC>KF |
Key release |
<ESC>KG |
Function key 0 - TRF |
<ESC>KH |
Function key 1 - LNR |
<ESC>KI |
Function key 2 - CNF |
<ESC>KJ |
Function key 3 - HOLD |
<ESC>KK |
Function key 4 - RECALL |
<ESC>KL |
Function key 5 - FNC |
<ESC>KM |
Function key 6 - ANS |
<ESC>KN |
Function key 7 - SPKR |
<ESC>KU |
Volume up |
<ESC>KV |
Volume down |
<ESC>KW |
Line key 1 |
<ESC>KX |
Line key 2 |
<ESC>KY |
Line key 3 |
<ESC>KZ |
Line key 4 |
<ESC>Ka |
Line key 5 |
<ESC>Kb |
Line key 6 |
<ESC>Kc |
Line key 7 |
<ESC>Kd |
Line key 8 |
<ESC>Ke |
Line key 9 |
<ESC>Kf |
Line key 10 |
<ESC>Kg |
Line key 11 |
<ESC>Kh |
Line key 12 |
<ESC>Ki |
Line key 13 |
<ESC>Kj |
Line key 14 |
<ESC>Kk |
Line key 15 |
<ESC>Kl |
Line key 16 |
<ESC>Km |
Direct Station Select (DDS) key 1 |
<ESC>Kn |
Direct Station Select (DDS) key 2 |
<ESC>Ko |
Direct Station Select (DDS) key 3 |
<ESC>Kp |
Direct Station Select (DDS) key 4 |
<ESC>Kq |
Direct Station Select (DDS) key 5 |
<ESC>Kr |
Direct Station Select (DDS) key 6 |
<ESC>Ks |
Direct Station Select (DDS) key 7 |
<ESC>Kt |
Direct Station Select (DDS) key 8 |
<ESC>Ku |
Direct Station Select (DDS) key 9 |
<ESC>Kv |
Direct Station Select (DDS) key 10 |
<ESC>Kw |
Direct Station Select (DDS) key 11 |
<ESC>Kx |
Direct Station Select (DDS) key 12 |
<ESC>Ky |
Direct Station Select (DDS) key 13 |
<ESC>Kz |
Direct Station Select (DDS) key 14 |
<ESC>K( |
Direct Station Select (DDS) key 15 |
<ESC>K) |
Direct Station Select (DDS) key 16 |
<ESC>K+ |
Direct Station Select (DDS) key 17 |
<ESC>K/ |
Direct Station Select (DDS) key 18 |
<ESC>K< |
Direct Station Select (DDS) key 19 |
<ESC>K> |
Direct Station Select (DDS) key 20 |
<ESC>DI |
Enable in-band DTMF signaling |
<ESC>DO |
Example#define ESC 0x1b
int devh; /* channel descriptor */
char digstr[40];
int set_spk( )
{
/* set up dial string to press Speaker key */
switch (ATD4_CHTYPE(devh))
{
case TYP_SX:
sprintf(digstr,"%cK8",ESC);
break;
case TYP_SL:
case TYP_NS:
sprintf(digstr,"%cK0",ESC);
break;
case TYP_NE2KTS:
case TYP_NE2PBX:
sprintf(digstr,"%cKN",ESC);
break;
}
/* Program dial programmable key */
if (dx_dial(devh,digstr,NULL, EV_SYNC))
{
printf("\nDial failed\n");
exit(1);
}
return(0);
}
4.2.4. Transferring a Call
DescriptionThe hook flash character ("&" by default) is used to initiate a transfer instead of an escape sequence as in the other feature dial strings. The hook flash is used because many PBX switches commonly use a hook flash as a transfer key. The following procedure is used by an application to transfer a call:
&,<extension>
where "&" is the hook flash character, the comma (",") is a pause, and <extension> is the extension to which the call is being transferred.
The pause in the dial string is required. The pause gives the PBX time to activate the feature. Instead of a pause, you can use Dialogic Enhanced Call Progress Analysis (ECPA) to detect a dial tone before dialing an extension. By using the control character "L" in the dial string, the dx_dial( ) function will wait for a dial tone before dialing. For example, to transfer to extension 555:
dx_initcallp(devh) dx_dial(devh, "&L555",NULL, EV_SYNC)
You can also use Dialogic Global Tone Detection (GTD) to detect a dial tone before dialing an extension. For example, to transfer to extension 555:
dx_dial(devh, "&",NULL, EV_SYNC) */ add code here to wait for tone event /* dx_dial (devh, "555" ,NULL, EV_SYNC)
Refer to the Voice Software Reference for more information about using ECPA and GTD.
Exampleint devh; /* channel descriptor */
char digstr[40];
int transfer_call( )
{
/* transfer the call */
if (dx_dial(devh,"&,555",NULL,EV_SYNC) == -1)
{
printf("\nDial failed\n");
exit (1);
}
/* set the channel onhook after the transfer */
if (dx_sethook(devh, DX_ONHOOK, EV_SYNC) == -1)
{
/* process error */
exit(1);
}
return (0);
}
4.2.5. In-Band/Out-of-Band SignalingIn-band signaling is a method used by analog (2500) telephones to communicate with PBXs (e.g., calling into a PBX and using DTMF to respond to voice prompts). In-band signals use the same band of frequencies as the voice signal. This method provides limited integration because there are no standards and different PBXs provide varying levels of control.
Out-of-band signaling is used by PBXs to communicate with their station sets or a CT computer. Out-of-band signals do not use the band of frequencies use by the voice signals. The PBX transmits data that can include information such as called/calling number ID. Because of its versatility, out-of-band signaling is the preferred method.
In-band signaling must be used when DTMF tones are required to communicate
(e.g., connecting two voice mail systems through a CO using AMIS - Automated Messaging Interchange Specification). If out-of-band signaling is used, timing problems may occur because digit data (dial pad) sent from the station set (or D/42-xx board) to the PBX are converted to DTMF and then sent to the CO.
D/42-xx boards can be set to communicate using either in-band or out-of-band signaling - refer to Table 10.
Table 10. Setting In-band and Out-of-band Signaling
DTMF Signaling |
|||
D/42-xx Board |
In-band |
Out-of-band |
Default Signaling |
D/42D-SX |
N/A |
N/A |
In-band only |
D/42D-SL |
<ESC>DI |
<ESC>DO |
Out-of-band |
D/42-NS |
<ESC>DI |
<ESC>DO |
Out-of-band |
D/42-NE2 (PBX) |
<ESC>DI |
<ESC>DO |
Out-of-band |
D/42-NE2 (KTS) |
<ESC>DI |
<ESC>DO |
Out-of-band |
4.2.6. Disconnect Supervision
DescriptionDisconnect supervision for D/42-xx boards functions the same as other D/4x boards. Refer to the Voice Software Reference for a description on using I/O terminations to perform disconnect supervision in your application.
As part of disconnect supervision, the D/42-xx boards monitor communications with the PBX. If communication is lost with the PBX for 60 seconds, the D/42-xx firmware will force a loop current drop condition until communication is re-established.
Northern Telecom Norstar (D/42-NS)Not all trunks allow trunk disconnect. Consult your Norstar Hardware Manual to determine if the trunk used allows trunk disconnect. If it does not provide disconnect supervision, you will need to use another method to determine disconnect (e.g., GTD-Global Tone Detection).
NEC NEAX 2400 IMS and NEAX 2000 IVS PBX (D/42-NE2)The NEAX 2400 IMS and NEAX 2000 IVS do not support disconnect supervision (loop current drop). When the calling party hangs up, the PBXs issue a reorder tone. You will need to use another method (e.g., GTD-Global Tone Detection) to detect a disconnect.
4.2.7. Converting Existing D/4x Applications
DescriptionThe D/42-xx board and the D/4x voice board use the same D/4x voice runtime library and supporting library. Therefore, only minor modifications are required to convert an existing D/4x application into a D/42 application. This conversion only includes new functions provided by the D/42 runtime library. Use the following guidelines to convert an existing D/4x application to an application that uses the D/42 runtime library:
Click here to contact Dialogic Customer Engineering
Copyright 2000, Dialogic Corporation