# Outbound call example

The following example shows typical output generated by ctasip when the program places an outbound call.

To run the program, enter the following command:

ctasip –P mysip.cfg

ctasip displays information similar to the following:

===============================================================================
SIP Demo Program
===============================================================================
Dialogic Corporation, 2009
===============================================================================
Type 'h' for help.
op
ok
Event: CTAEVN_OPEN_SERVICES_DONE, Finished
sp
Enter protocol name ['sip0']:
ok
Event: NCCEVN_START_PROTOCOL_DONE, CTA_REASON_FINISHED
ru
Contact ['sip:4801@10.122.20.20']:
ok
Event: NCCEVN_REGISTER_USER
pc
To ['sip:4800@sipserver.dialogic.com']:
==> Add SDP using SIP IEs...
ok
Event: NCCEVN_PLACING_CALL
Event: NCCEVN_CALL_PROCEEDING
Event: NCCEVN_REMOTE_ALERTING
Event: NCCEVN_CALL_CONNECTED
MSPP : Created: PM endpont, slot 0 board 0
MSPP : Created: RTP endpont, 10.122.20.20:8004 -> 10.122.20.22:5004
MSPP : Created: channel
MSPP : Channel: connected and enabled
dc
ok
Event: NCCEVN_CALL_DISCONNECTED
MSPP : Channel: disabled and disconnected
MSPP : Destroyed: RTP endpoint
MSPP : Destroyed: PM endpoint
MSPP : Destroyed: channel
rc
ok
Event: NCCEVN_CALL_RELEASED

The following table describes the sequence of commands:

Sequence | Command | Description
1 | op | Opens a port as specified in the configuration file. The CTAEVN_OPEN_SERVICES_DONE event is returned.
2 | sp | Starts the SIP protocol. The NCCEVN_START_PROTOCOL_DONE event is returned.
3 | ru | Registers this user with the SIP server. The NCCEVN_REGISTER_USER event is returned.
4 | pc | Places a call. The following events are returned: NCCEVN_PLACING_CALL: SIP stack sent out the request. NCCEVN_CALL_PROCEEDING: Remote side sent a Trying response. NCCEVN_REMOTE_ALERTING: Remote side sent a 180 Ringing response. NCCEVN_CALL_CONNECTED: Remote side responded with a 200 OK response to the INVITE generated by nccPlaceCall.
5 | dc | Disconnects the call. The remote side responds to the BYE message with a 200 OK response that generates the NCCEVN_CALL_DISCONNECTED event.
6 | rc | Releases the call context. The SIP stack internally generates the NCCEVN_CALL_RELEASED response to nccReleaseCall.