Dialogic Voice Cards - Setting MWI via NCAS ISDN call on JCT boards

Dialogic Voice Cards - Setting MWI via NCAS ISDN call on JCT boards

Overview:

The Dialogic Global Call API provides a way to exchange non call-associated information over an ISDN network by sending and retrieving NCAS messages with arbitrary content. The implementation is slightly different for Dialogic JCT Media Boards. This article provides instructions for this on JCT Media Boards.

1. Selecting a device to make NCAS call

On Dialogic JCT Media Boards the application opens a dtiBxT24 device and uses the handle of this device when sending or receiving NCAS messages (x denotes the virtual board number). This handle must be used as a line device argument in gc_MakeCall( ); the application should enable event processing on this device.

2. Setting information elements

Since NCAS is not associated with a B-channel, it doesn't provide a means for media exchange. For this reason the Info Transfer Rate octet should be set to 0. Info Transfer Cap may be set to 0 as well, although most protocols/switches disregard this octet in non-call messages. 

IE_BLK ieBlk; IE_BLK * ie = &ieBlk; GC_IE_BLK gcIeBlk; gcIeBlk.gclib = NULL; gcIeBlk.cclib = &ieBlk; int x = 0; ie->data[x++] = BEARER_CAPABILITY_IE; ie->data[x++] = 2; ie->data[x++] = 0x80 |0x28; // 10101000 = A8 ie->data[x++] = 0x80; // 0000000

These settings produce the following IE: 

1: BEARER CAPABILITY(0x0 2: IE Length(0x02) 3: 1------- Extension Bit -01----- Coding Standard ---01000 Info. Transfer Cap. 4: 1------- Extension Bit -00----- Transfer Mode ---00000 Info. Transfer Rate

 

Now we have to set CHANNEL ID info element. This step may be omitted on JCT.
We simply continue the code:     

ie->data[x++] = CHANNEL_ID_IE; ie->data[x++] = 1; ie->data[x++] = 0x80 | 0x2c;

It results in the following IE: 

1: CHANNEL ID(0x18) 2: IE Length(0x01) 3: 1------- Extension Bit -0------ Interface ID Present --1----- Interface Type ---0---- Spare ----1--- Preferred/Exclusive -----1-- D-Channel Indicator ------00 Info. Channel Sel.

 

Note that if you work in an NFAS environment, you may need to alternate your Interface ID present bit and add the Interface ID octet to the code above.

Now we configure the FACILITY Info element - the information we want to send. In the example below the FACILITY will turn MWI on, if this feature is supported on the PBX:
 

// set the NETWORK FACILITY info element ie->data[x++] = FACILITY_IE; //0x1C ie->data[x++] = 0x1f; ie->data[x++] = 0x80 | 0x1f; ie->data[x++] = 0xaa; ie->data[x++] = 0x06; ie->data[x++] = 0x80; ie->data[x++] = 0x01; ie->data[x++] = 0x00; ie->data[x++] = 0x82; ie->data[x++] = 0x01; ie->data[x++] = 0x00;// 0xA1; ie->data[x++] = 0x8b;//0x14; ie->data[x++] = 0x01; ie->data[x++] = 0x02; ie->data[x++] = 0xA1; ie->data[x++] = 0x11; ie->data[x++] = 0x02; ie->data[x++] = 0x01; ie->data[x++] = 0x18; ie->data[x++] = 0x02; ie->data[x++] = 0x01; ie->data[x++] = 0x50; ie->data[x++] = 0x30; ie->data[x++] = 0x09; ie->data[x++] = 0x80; ie->data[x++] = 0x04; ie->data[x++] = 0x33; ie->data[x++] = 0x30; ie->data[x++] = 0x30; ie->data[x++] = 0x30; ie->data[x++] = 0x0A; ie->data[x++] = 0x01; ie->data[x++] = 0x01;

3.  Uploading the message content to the channel info buffer

Before making a call, we need to upload the just configured info elements to the calling device memory.
 

ie->length = x; if(gc_SetInfoElem(callingDev, &gcIeBlk) == -1) checkError("gc_SetInfoElem");

4. Making the NCAS call

At this stage, we are ready to make a call:
 

GC_MAKECALL_BLK gcMakeCallBlk; GC_MAKECALL_BLK * callBlk = &gcMakeCallBlk; MAKECALL_BLK makeCallBlk; gcMakeCallBlk.gclib = NULL; gcMakeCallBlk.cclib = &makeCallBlk; makeCallBlk.isdn.destination_number_type = EN_BLOC_NUMBER; makeCallBlk.isdn.destination_number_plan = UNKNOWN_NUMB_PLAN; makeCallBlk.isdn.origination_number_type = 0x0; makeCallBlk.isdn.origination_number_plan = 0x0; strcpy(makeCallBlk.isdn.origination_phone_number, "3099"); makeCallBlk.isdn.usrinfo_bufp = NULL; makeCallBlk.isdn.nsfc_bufp = NULL; retVal = gc_MakeCall (callingDev, &m_crn, callNum, callBlk, 90, EV_ASYNC);

 

callingDev is a D-channel device handle (dtiBxT24) when using a Dialogic JCT-series Media Board,.

5. Retrieving inbound NCAS information.

After a successful outbound NCAS call, the application must store the CRN generated by this call, and be ready to receive a reply from network. This will be CONNECT (GCEV_CONNECTED) if the message is accepted, or RELEASE or REL COMP (GCEV_DISCONNECT) if the message is rejected by the network. If the call is connected, the application uses the same CRN for all subsequent operations.  

When NCAS is initiated by the network, the app will receive GCEV_OFFERED event on dtiBxT24 or dtiBx, depending on board type. The application then retrieves information via gc_GetSigInfo( ) and accepts (gc_AnswerCall( )) or rejects (gc_DropCall) the NCAS call.

Attached to this article are a NCAS_MakeCall source code (cpp) file:  and the ISDN trace:  generated by this call.

Product List

Dialogic JCT Digital Media Boards

Glossary of Acronyms / Terms

NCAS - Non Call Associated Signalling
MWI - Message Waiting Indicator