beautypg.com

Sample application – Dialogic 6.2 User Manual

Page 207

background image

Transferring Calls Using Release Link Trunk Transfer

November 2009

207

Sample Application

The following code fragments show the relevant BSMI control

messages used in RLT transfer.

/***********************************************************************/

/********** send_call_req ****/

/***********************************************************************/

void send_call_req(int spyder_chan,int bchan,unsigned char rlt)

{

L4_to_L3_struct *L4L3cntlp;

L4_to_L3_struct msg;

L4L3cntlp = &msg;

/* Populate the header stuff here */

zero_msg(L4L3cntlp);

L4L3cntlp->lapdid = spyder_chan;

L4L3cntlp->msgtype = L4L3mCALL_REQUEST;

L4L3cntlp->L4_ref = 1;

L4L3cntlp->call_ref = 0;

/* Populate the call request stuff here */

L4L3cntlp->data.call_req_data.bchannel = bchan;

L4L3cntlp->data.call_req_data.interface = 0xff;

L4L3cntlp->data.call_req_data.call_type = PRIcalltyp64K;

L4L3cntlp->data.call_req_data.rlt_service = rlt;

L4L3cntlp->data.call_req_data.called_party.num_digits = 6;

L4L3cntlp->data.call_req_data.called_party.num_type = PRInumtUNKNOWN;

L4L3cntlp->data.call_req_data.called_party.num_plan = PRInumpUNKNOWN;

L4L3cntlp->data.call_req_data.called_party.digits[0] = '6';

L4L3cntlp->data.call_req_data.called_party.digits[1] = '0';

L4L3cntlp->data.call_req_data.called_party.digits[2] = '3';

L4L3cntlp->data.call_req_data.called_party.digits[3] = '8';

L4L3cntlp->data.call_req_data.called_party.digits[4] = '9';

L4L3cntlp->data.call_req_data.called_party.digits[5] = '8';

L4L3cntlp->data.call_req_data.redirect_num.num_digits = 0;

pridrv_tx_cntl_buf( L4L3cntlp);

printf("%d: Snd L4L3mCALL_REQUEST \n", spyder_chan);

} /* end of send_call_req */