beautypg.com

Dialogic 6.2 User Manual

Page 208

background image

Transferring Calls Using Release Link Trunk Transfer

November 2009

208

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

/********** Send alerting ****/

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

void send_alert(int spy_chan, int call_ref)

{

L4_to_L3_struct *L4L3cntlp;

L4_to_L3_struct msg;

L4L3cntlp = &msg;

zero_msg(L4L3cntlp);

L4L3cntlp->lapdid = spy_chan;

L4L3cntlp->L4_ref = 0;

L4L3cntlp->call_ref = call_ref;

printf("%d: Snd L4L3mALERTING_REQUEST \n", spy_chan);

L4L3cntlp->msgtype = L4L3mALERTING_REQUEST;

if (spy_chan == NETWORK) /* we know the net is sending a facility */

{

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

L4L3cntlp->data.al_con_data.bchannel= g_bchan;

L4L3cntlp->data.al_con_data.ie_count = 1;

L4L3cntlp->data.al_con_data.ie.ie_id = 0x1c; /* facility */

L4L3cntlp->data.al_con_data.ie.ie_length = 0x0e;

L4L3cntlp->data.al_con_data.ie.ie_data[0] = 0x91; /*rose*/

L4L3cntlp->data.al_con_data.ie.ie_data[1] = 0xbe; /*rlt*/

L4L3cntlp->data.al_con_data.ie.ie_data[2] = 0xa2; /*RR*/

L4L3cntlp->data.al_con_data.ie.ie_data[3] = 0x09; /*length*/

L4L3cntlp->data.al_con_data.ie.ie_data[4] = 0x02; /*id tag*/

L4L3cntlp->data.al_con_data.ie.ie_data[5] = 0x01; /*id len*/

L4L3cntlp->data.al_con_data.ie.ie_data[6] = 0x01; /*inv id*/

L4L3cntlp->data.al_con_data.ie.ie_data[7] = 0x02; /*seq tag*/

L4L3cntlp->data.al_con_data.ie.ie_data[8] = 0x01; /*seq len*/

L4L3cntlp->data.al_con_data.ie.ie_data[9] = 0x01; /*op tag*/

L4L3cntlp->data.al_con_data.ie.ie_data[11] = 0x01;/*op len*/

L4L3cntlp->data.al_con_data.ie.ie_data[12] = 0x80; /*op val*/

L4L3cntlp->data.al_con_data.ie.ie_data[13] = 0; /*callid*/

L4L3cntlp->data.al_con_data.ie.ie_data[14] = 0;

}

pridrv_tx_cntl_buf( L4L3cntlp);

}