(Page 15 of 17 in this chapter) Version
typedef struct
{
DWORD switch_number;
DWORD bus;
DWORD stream;
DWORD timeslot;
} PPX_MVIP_ADDR
void WhileTheyWait( MYCONTEXT *cx )
{
DWORD e;
char ppxname [20];
DemoStartProtocol( cx->hd, cx->protocol, NULL, NULL );
/* Allocate a connection */
sprintf( ppxname, "ppxdemo%01d", cx->id );
e = ppxCreateConnection( cx->hd, ppxname, &ppx_parms,
&(ppxhd[cx->id]) );
if (e != SUCCESS)
{
printf("Unable to create a connection ; returns: %d\n",e);
exit(-1);
}
/*
* Set this port as the talker on this "Please hold...will try
* that extension now" connection
*/
talkers[cx->id].switch_number = cx->swi;
talkers[cx->id].bus = MVIP95_LOCAL_BUS;
talkers[cx->id].stream = dsp_stream;
talkers[cx->id].timeslot = cx->time_slot;
e = ppxSetTalker( ppxhd[cx->id], &talkers[cx->id] );
if( e != SUCCESS )
{
printf("Could not set talker\n");
exit(-1);
}
(Page 15 of 17 in this chapter) Version