Table of Contents Index NMS Glossary Previous Page Next Page (Page 2 of 14 in this chapter) Version


mspConnect

Description

Connects a media channel between two endpoints.

Prototype

DWORD mspConnect (MSPHD ephd1,
MSPHD chnhd,
MSPHD ephd2)

ephd1 First MSPP endpoint handle.

chnhd MSPP channel handle.

ephd2 Second MSPP endpoint handle.

Return Values

Events

Details

When invoking mspConnect, specify two endpoint handles and a channel handle. These specify the endpoints through which the data will flow, and the processes that will take place (for example, encoding and decoding) as the transferred data flows through a channel. The order of the endpoints in the argument list must correspond to the channel type.

For voice channels, ephd1 must be associated with an RTP endpoint and ephd2 must be associated with a DS0 endpoint. For fax channels, ephd1 must be associated with a UDP endpoint and ephd2 must be associated with a DS0 endpoint.

See Also

mspCreateChannel, mspCreateEndpoint, mspDisconnect

Example

DWORD ret;
CTAHD hCtaHd[MAX_CONNECTIONS];
CTAQUEUEHD hCtaQueue;
CTA_EVENT Event;
MSPHD hEp1, hEp2, hChan;
ret = mspConnect(hEp1, hChan, hEp2);
if (ret != SUCCESS)
return FAILURE;
ctaWaitEvent( hCtaQueue, &Event, CTA_WAIT_FOREVER ); if ( Event.id != MSPEVN_CONNECT_DONE ||
Event.value != CTA_REASON_FINISHED )
return FAILURE;


Table of Contents Index NMS Glossary Previous Page Next Page (Page 2 of 14 in this chapter) Version


Want to send us feedback on our documentation? Email: Tech_Pubs@nmss.com
Copyright © 2000, Natural MicroSystems, Inc. All rights reserved.