iaxclient.h File Reference

Go to the source code of this file.

Data Structures

struct  iaxc_ev_levels
 A structure containing information about an audio level event. More...
struct  iaxc_ev_text
 A structure containing information about a text event. More...
struct  iaxc_ev_call_state
 A structure containing information about a call state change event. More...
struct  iaxc_netstat
 A structure containing information about a set of network statistics. More...
struct  iaxc_ev_netstats
 A structure containing information about a network statistics event. More...
struct  iaxc_video_stats
 A structure containing video statistics data. More...
struct  iaxc_ev_video_stats
 A structure containing information about a video statistics event. More...
struct  iaxc_ev_url
 A structure containing information about an URL event. More...
struct  iaxc_ev_video
 A structure containing data for a video event. More...
struct  iaxc_ev_audio
 A structure containing data for an audio event. More...
struct  iaxc_ev_registration
 A structure containing information about a registration event. More...
struct  iaxc_event
 A structure describing a single IAXClient event. More...
struct  iaxc_audio_device
 A structure containing information about an audio device. More...
struct  iaxc_sound
 A structure describing a sound to IAXClient. More...

Defines

#define IAXC_AUDIO_FORMAT_MASK   ((1<<16)-1)
 Mask containing all potentially valid audio formats.
#define IAXC_VIDEO_FORMAT_MASK   (((1<<25)-1) & ~IAXC_AUDIO_FORMAT_MASK)
 Mask containing all potentially valid video formats.
#define IAXC_FORMAT_G723_1   (1 << 0)
 G.723.1 compression.
#define IAXC_FORMAT_GSM   (1 << 1)
 GSM compression.
#define IAXC_FORMAT_ULAW   (1 << 2)
 Raw mu-law data (G.711).
#define IAXC_FORMAT_ALAW   (1 << 3)
 Raw A-law data (G.711).
#define IAXC_FORMAT_G726   (1 << 4)
 ADPCM, 32kbps.
#define IAXC_FORMAT_ADPCM   (1 << 5)
 ADPCM IMA.
#define IAXC_FORMAT_SLINEAR   (1 << 6)
 Raw 16-bit Signed Linear (8000 Hz) PCM.
#define IAXC_FORMAT_LPC10   (1 << 7)
 LPC10, 180 samples/frame.
#define IAXC_FORMAT_G729A   (1 << 8)
 G.729a Audio.
#define IAXC_FORMAT_SPEEX   (1 << 9)
 Speex Audio.
#define IAXC_FORMAT_ILBC   (1 << 10)
 iLBC Audio
#define IAXC_FORMAT_MAX_AUDIO   (1 << 15)
 Maximum audio format value.
#define IAXC_FORMAT_JPEG   (1 << 16)
 JPEG Images.
#define IAXC_FORMAT_PNG   (1 << 17)
 PNG Images.
#define IAXC_FORMAT_H261   (1 << 18)
 H.261 Video.
#define IAXC_FORMAT_H263   (1 << 19)
 H.263 Video.
#define IAXC_FORMAT_H263_PLUS   (1 << 20)
 H.263+ Video.
#define IAXC_FORMAT_H264   (1 << 21)
 H264 Video.
#define IAXC_FORMAT_MPEG4   (1 << 22)
 MPEG4 Video.
#define IAXC_FORMAT_THEORA   (1 << 24)
 Theora Video.
#define IAXC_FORMAT_MAX_VIDEO   (1 << 24)
 Maximum Video format value.
#define IAXC_EVENT_TEXT   1
 Indicates a text event.
#define IAXC_EVENT_LEVELS   2
 Indicates a level event.
#define IAXC_EVENT_STATE   3
 Indicates a call state change event.
#define IAXC_EVENT_NETSTAT   4
 Indicates a network statistics update event.
#define IAXC_EVENT_URL   5
 Indicates a URL push via IAX(2).
#define IAXC_EVENT_VIDEO   6
 Indicates a video event.
#define IAXC_EVENT_REGISTRATION   8
 Indicates a registration event.
#define IAXC_EVENT_DTMF   9
 Indicates a DTMF event.
#define IAXC_EVENT_AUDIO   10
 Indicates an audio event.
#define IAXC_EVENT_VIDEOSTATS   11
 Indicates a video statistics update event.
#define IAXC_CALL_STATE_FREE   0
 Indicates a call slot is free.
#define IAXC_CALL_STATE_ACTIVE   (1<<1)
 Indicates a call is active.
#define IAXC_CALL_STATE_OUTGOING   (1<<2)
 Indicates a call is outgoing.
#define IAXC_CALL_STATE_RINGING   (1<<3)
 Indicates a call is ringing.
#define IAXC_CALL_STATE_COMPLETE   (1<<4)
 Indicates a completed call.
#define IAXC_CALL_STATE_SELECTED   (1<<5)
 Indicates the call is selected.
#define IAXC_CALL_STATE_BUSY   (1<<6)
 Indicates a call is busy.
#define IAXC_CALL_STATE_TRANSFER   (1<<7)
 Indicates the call transfer has been released.
#define IAXC_TEXT_TYPE_STATUS   1
 Indicates that text is for an IAXClient status change.
#define IAXC_TEXT_TYPE_NOTICE   2
 Indicates that text is an IAXClient warning message.
#define IAXC_TEXT_TYPE_ERROR   3
 Represents that text is for an IAXClient error message.
#define IAXC_TEXT_TYPE_FATALERROR   4
 Represents that text is for an IAXClient fatal error message.
#define IAXC_TEXT_TYPE_IAX   5
 Represents a message sent from the server across the IAX stream.
#define IAXC_REGISTRATION_REPLY_ACK   18
 Indicates the registration was accepted (See IAX_EVENT_REGACC).
#define IAXC_REGISTRATION_REPLY_REJ   30
 Indicates the registration was rejected (See IAX_EVENT_REGREJ).
#define IAXC_REGISTRATION_REPLY_TIMEOUT   6
 Indicates the registration timed out (See IAX_EVENT_TIMEOUT).
#define IAXC_URL_URL   1
 URL received.
#define IAXC_URL_LDCOMPLETE   2
 URL loading complete.
#define IAXC_URL_LINKURL   3
 URL link request.
#define IAXC_URL_LINKREJECT   4
 URL link reject.
#define IAXC_URL_UNLINK   5
 URL unlink.
#define IAXC_SOURCE_LOCAL   1
 Indicates that the event data source is local.
#define IAXC_SOURCE_REMOTE   2
 Indicates that the event data source is remote.
#define IAXC_EVENT_BUFSIZ   256
 The maximum size of a string contained within an event.
#define IAXC_AD_INPUT   (1<<0)
 Device is usable for input.
#define IAXC_AD_OUTPUT   (1<<1)
 Device is usable for output.
#define IAXC_AD_RING   (1<<2)
 Device is usable for ring.
#define IAXC_AD_INPUT_DEFAULT   (1<<3)
 Indicates the default input device.
#define IAXC_AD_OUTPUT_DEFAULT   (1<<4)
 Indicates the default output device.
#define IAXC_AD_RING_DEFAULT   (1<<5)
 Indicates the default ring device.
#define IAXC_FILTER_DENOISE   (1<<0)
 Noise reduction filter.
#define IAXC_FILTER_AGC   (1<<1)
 Automatic Gain Control.
#define IAXC_FILTER_ECHO   (1<<2)
 Echo cancellation filter.
#define IAXC_FILTER_AAGC   (1<<3)
 Analog (mixer-based) Automatic Gain Control.
#define IAXC_FILTER_CN   (1<<4)
 Send Comfort Noise (CN) frames when silence is detected.
#define IAXC_AUDIO_PREF_RECV_LOCAL_RAW   (1 << 0)
 Indicates the preference that local audio should be passed to the registered callback in a raw 8KHz 16-bit signed format.
#define IAXC_AUDIO_PREF_RECV_LOCAL_ENCODED   (1 << 1)
 Indicates the preference that local audio should be passed to the registered callback in the current encoded format.
#define IAXC_AUDIO_PREF_RECV_REMOTE_RAW   (1 << 2)
 Indicates the preference that remote audio should be passed to the registered callback in a raw 8KHz 16-bit signed format.
#define IAXC_AUDIO_PREF_RECV_REMOTE_ENCODED   (1 << 3)
 Indicates the preference that remote audio should be passed to the registered callback in the current encoded format.
#define IAXC_AUDIO_PREF_SEND_DISABLE   (1 << 4)
 Indicates the preference that sending of audio should be disabled.
#define IAXC_VIDEO_MAX_WIDTH   704
 Maximum video width.
#define IAXC_VIDEO_MAX_HEIGHT   576
 Maximum video height.
#define IAXC_VIDEO_MIN_WIDTH   80
 Minimum video width.
#define IAXC_VIDEO_MIN_HEIGHT   60
 Minimum video height.
#define IAXC_VIDEO_PREF_RECV_LOCAL_RAW   (1 << 0)
 Indicates the preference that local video should be passed to the registered callback in a raw format (typically YUV420).
#define IAXC_VIDEO_PREF_RECV_LOCAL_ENCODED   (1 << 1)
 Indicates the preference that local video should be passed to the registered callback in the current encoded format.
#define IAXC_VIDEO_PREF_RECV_REMOTE_RAW   (1 << 2)
 Indicates the preference that remote video should be passed to the registered callback in a raw format (typically YUV420).
#define IAXC_VIDEO_PREF_RECV_REMOTE_ENCODED   (1 << 3)
 Indicates the preference that remote video should be passed to the registered callback in the current encoded format.
#define IAXC_VIDEO_PREF_SEND_DISABLE   (1 << 4)
 Indicates the preference that sending of video should be disabled.
#define IAXC_VIDEO_PREF_RECV_RGB32   (1 << 5)
 This flag specifies that you want raw video in RGB32 format.
#define IAXC_VIDEO_PREF_CAPTURE_DISABLE   (1 << 6)
 Use this flag to disable/enable camera hardware.

Typedefs

typedef int(* iaxc_sendto_t )(int, const void *, size_t, int, const struct sockaddr *, socklen_t)
 Defines the portotype for an application provided sendto implementation.
typedef int(* iaxc_recvfrom_t )(int, void *, size_t, int, struct sockaddr *, socklen_t *)
 Defines the portotype for an application provided recvfrom implementation.
typedef int(* iaxc_event_callback_t )(iaxc_event e)
 Defines the prototype for event callback handlers.

Functions

void iaxc_set_event_callback (iaxc_event_callback_t func)
 Sets the callback to call with IAXClient events.
int iaxc_set_event_callpost (void *handle, int id)
 Sets iaxclient to post a pointer to a copy of event using o/s specific Post method.
void iaxc_free_event (iaxc_event *e)
 frees event delivered via o/s specific Post method
struct iaxc_ev_levelsiaxc_get_event_levels (iaxc_event *e)
 Returns the levels data associated with event e.
struct iaxc_ev_textiaxc_get_event_text (iaxc_event *e)
 Returns the text data associated with event e.
struct
iaxc_ev_call_state
iaxc_get_event_state (iaxc_event *e)
 Returns the event state data associated with event e.
void iaxc_set_preferred_source_udp_port (int sourceUdpPort)
 Set Preferred UDP Port:.
short iaxc_get_bind_port ()
 Returns the UDP port that has been bound to.
int iaxc_initialize (int num_calls)
 Initializes the IAXClient library.
void iaxc_shutdown ()
 Shutsdown the IAXClient library.
void iaxc_set_formats (int preferred, int allowed)
 Sets the formats to be used.
void iaxc_set_min_outgoing_framesize (int samples)
 Sets the minimum outgoing frame size.
void iaxc_set_callerid (const char *name, const char *number)
 Sets the caller id name and number.
int iaxc_start_processing_thread ()
 Starts all the internal processing thread(s).
int iaxc_stop_processing_thread ()
 Stops all the internal processing thread(s).
int iaxc_call (const char *num)
 Initiates a call to an end point.
int iaxc_call_ex (const char *num, const char *callerid_name, const char *callerid_number, int video)
 Initiates a call to an end point.
int iaxc_unregister (int id)
 Unregisters IAXClient from a server.
int iaxc_register (const char *user, const char *pass, const char *host)
 Registers the IAXClient instance with an IAX server.
void iaxc_send_busy_on_incoming_call (int callNo)
 Respond to incoming call callNo as busy.
void iaxc_answer_call (int callNo)
 Answers the incoming call callNo.
void iaxc_blind_transfer_call (int callNo, const char *number)
 Initiate a blind call transfer of callNo to number.
void iaxc_setup_call_transfer (int sourceCallNo, int targetCallNo)
 Setup a transfer of sourceCallNo to targetCallNo.
void iaxc_dump_all_calls (void)
 Hangs up and frees all non-free calls.
void iaxc_dump_call (void)
 Hangs up and frees the currently selected call.
void iaxc_reject_call (void)
 Rejects the currently selected call.
void iaxc_reject_call_number (int callNo)
 Rejects the incoming call callNo.
void iaxc_send_dtmf (char digit)
 Sends a DTMF digit to the currently selected call.
void iaxc_send_text (const char *text)
 Sends text to the currently selected call.
void iaxc_send_url (const char *url, int link)
 Sends a URL across the currently selected call.
void iaxc_millisleep (long ms)
 Suspends thread execution for an interval measured in milliseconds.
void iaxc_set_silence_threshold (float thr)
 Sets the silence threshold to thr.
void iaxc_set_audio_output (int mode)
 Sets the audio output to mode.
int iaxc_select_call (int callNo)
 Sets callNo as the currently selected call.
int iaxc_first_free_call ()
 Returns the first free call number.
int iaxc_selected_call ()
 Returns the number of the currently selected call.
int iaxc_quelch (int callNo, int MOH)
 Causes the audio channel for callNo to QUELCH (be squelched).
int iaxc_unquelch (int callNo)
 Causes the audio channel for callNo to be UNQUELCH (unsquelched).
int iaxc_mic_boost_get (void)
 Returns the current mic boost setting.
int iaxc_mic_boost_set (int enable)
 Sets the mic boost setting.
char * iaxc_version (char *ver)
 Returns a copy of IAXClient library version.
void iaxc_set_jb_target_extra (long value)
 Fine tune jitterbuffer control.
void iaxc_set_networking (iaxc_sendto_t st, iaxc_recvfrom_t rf)
 Application-defined networking; give substitute sendto and recvfrom functions.
int iaxc_get_netstats (int call, int *rtt, struct iaxc_netstat *local, struct iaxc_netstat *remote)
 wrapper for libiax2 get_netstats
int iaxc_audio_devices_get (struct iaxc_audio_device **devs, int *nDevs, int *input, int *output, int *ring)
 Get audio device information:.
int iaxc_audio_devices_set (int input, int output, int ring)
 Sets the current audio devices.
float iaxc_input_level_get ()
 Get the audio device input level.
float iaxc_output_level_get ()
 Get the audio device output level.
int iaxc_input_level_set (float level)
 Sets the audio input level to level.
int iaxc_output_level_set (float level)
 Sets the audio output level to level.
int iaxc_play_sound (struct iaxc_sound *sound, int ring)
 Play a sound.
int iaxc_stop_sound (int id)
 Stop sound id from being played.
int iaxc_get_filters (void)
 Returns the set of audio filters being applied.
void iaxc_set_filters (int filters)
 Sets the current audio filters to apply.
void iaxc_set_speex_settings (int decode_enhance, float quality, int bitrate, int vbr, int abr, int complexity)
 Sets speex specific codec settings.
unsigned int iaxc_get_audio_prefs (void)
 Returns the various audio delivery preferences.
int iaxc_set_audio_prefs (unsigned int prefs)
 Set the various audio delivery preferences.
unsigned int iaxc_get_video_prefs (void)
 Returns the current video preferences.
int iaxc_set_video_prefs (unsigned int prefs)
 Sets the current video preferences.
void iaxc_video_format_get_cap (int *preferred, int *allowed)
 Returns the video format settings.
void iaxc_video_format_set_cap (int preferred, int allowed)
 Sets the video format capabilities.
void iaxc_video_format_set (int preferred, int allowed, int framerate, int bitrate, int width, int height, int fs)
 Sets the allowed/preferred video formats.
void iaxc_video_params_change (int framerate, int bitrate, int width, int height, int fs)
 Change video params for the current call on the fly This will destroy the existing encoder and create a new one use negative values for parameters that should not change.
int iaxc_set_holding_frame (char *)
 Set holding frame to be used in some kind of video calls.
int iaxc_video_bypass_jitter (int)
 Helper function to control use of jitter buffer for video events.
int iaxc_is_camera_working ()
 Returns 1 if the default camera is working; 0 otherwise.
void iaxc_YUV420_to_RGB32 (int width, int height, char *src, char *dest)
 Converts a YUV420 image to RGB32.


Detailed Description

The IAXClient API
Note:
This is the include file which declares all external API functions to IAXClient. It should include all functions and declarations needed by IAXClient library users, but not include internal structures, or require the inclusion of library internals (or sub-libraries)

Definition in file iaxclient.h.


Define Documentation

#define IAXC_TEXT_TYPE_FATALERROR   4

Represents that text is for an IAXClient fatal error message.

The User Agent should probably display error message text, then die

Definition at line 156 of file iaxclient.h.

#define IAXC_VIDEO_PREF_RECV_RGB32   (1 << 5)

This flag specifies that you want raw video in RGB32 format.

RGB32: FFRRGGBB aligned 4 bytes per pixel When this flag is set, iaxclient will convert YUV420 raw video into RGB32 before passing it to the main app.

Definition at line 1139 of file iaxclient.h.


Typedef Documentation

typedef int(* iaxc_event_callback_t)(iaxc_event e)

Defines the prototype for event callback handlers.

Parameters:
e The event structure being passed to the callback
Returns:
The result of processing the event; > 0 if successfully handled the event, 0 if not handled, < 0 to indicate an error occurred processing the event.

Definition at line 582 of file iaxclient.h.


Function Documentation

void iaxc_answer_call ( int  callNo  ) 

Answers the incoming call callNo.

Parameters:
callNo The number of the call to answer.

Definition at line 1412 of file iaxclient_lib.c.

int iaxc_audio_devices_get ( struct iaxc_audio_device **  devs,
int *  nDevs,
int *  input,
int *  output,
int *  ring 
)

Get audio device information:.

Parameters:
devs Returns an array of iaxc_audio_device structures. The array will will be valid as long as iaxc is initialized.
nDevs Returns the number of devices in the devs array
input Returns the currently selected input device
output Returns the currently selected output device
ring Returns the currently selected ring device

Definition at line 1784 of file iaxclient_lib.c.

int iaxc_audio_devices_set ( int  input,
int  output,
int  ring 
)

Sets the current audio devices.

Parameters:
input The device to use for audio input
output The device to use for audio output
ring The device to use to present ring sounds

Definition at line 1793 of file iaxclient_lib.c.

void iaxc_blind_transfer_call ( int  callNo,
const char *  number 
)

Initiate a blind call transfer of callNo to number.

Parameters:
callNo The active call to transfer.
number The number to transfer the call to. See draft-guy-iax-03 section 8.4.1 for further details.

Definition at line 1422 of file iaxclient_lib.c.

int iaxc_call ( const char *  num  ) 

Initiates a call to an end point.

Parameters:
num The entity to call in the format of [user[:password]]@peer[:portno][/exten[@context]]
Returns:
The call number upon sucess; -1 otherwise.
Note:
This is the same as calling iaxc_call_ex(num, NULL, NULL, 1).

Definition at line 1310 of file iaxclient_lib.c.

int iaxc_call_ex ( const char *  num,
const char *  callerid_name,
const char *  callerid_number,
int  video 
)

Initiates a call to an end point.

Parameters:
num The entity to call in the format of [user[:password]]@peer[:portno][/exten[@context]]
callerid_name The local caller id name to use
callerid_number The local caller id number to use
video 0 indicates no-video. Any non-zero value indicates video is requested
Returns:
The call number upon sucess; -1 otherwise.

Definition at line 1315 of file iaxclient_lib.c.

void iaxc_free_event ( iaxc_event e  ) 

frees event delivered via o/s specific Post method

Parameters:
e The event to free

Definition at line 196 of file iaxclient_lib.c.

unsigned int iaxc_get_audio_prefs ( void   ) 

Returns the various audio delivery preferences.

The preferences are represented using the AIXC_AUDIO_PREF_{} family of defines.

Definition at line 1874 of file iaxclient_lib.c.

short iaxc_get_bind_port (  ) 

Returns the UDP port that has been bound to.

Returns:
The UDP port bound to; -1 if no port or

Definition at line 554 of file iaxclient_lib.c.

struct iaxc_ev_levels* iaxc_get_event_levels ( iaxc_event e  )  [read]

Returns the levels data associated with event e.

Parameters:
e The event to retrieve the levels from.

Definition at line 201 of file iaxclient_lib.c.

struct iaxc_ev_call_state* iaxc_get_event_state ( iaxc_event e  )  [read]

Returns the event state data associated with event e.

Parameters:
e The event to retrieve call state from.

Definition at line 211 of file iaxclient_lib.c.

struct iaxc_ev_text* iaxc_get_event_text ( iaxc_event e  )  [read]

Returns the text data associated with event e.

Parameters:
e The event to retrieve text from.

Definition at line 206 of file iaxclient_lib.c.

int iaxc_get_filters ( void   ) 

Returns the set of audio filters being applied.

The IAXC_FILTER_{} defines are used to specify the filters.

See also:
IAXC_FILTER_DENOISE, IAXC_FILTER_AGC, IAXC_FILTER_ECHO, IAXC_FILTER_AAGC, IAXC_FILTER_CN

Definition at line 387 of file audio_encode.c.

int iaxc_get_netstats ( int  call,
int *  rtt,
struct iaxc_netstat local,
struct iaxc_netstat remote 
)

wrapper for libiax2 get_netstats

Parameters:
call 
rtt 
local 
remote 

Definition at line 1000 of file iaxclient_lib.c.

unsigned int iaxc_get_video_prefs ( void   ) 

Returns the current video preferences.

The preferences are represented using the AIXC_VIDEO_PREF_{} family of macros.

See also:
IAXC_VIDEO_PREF_RECV_LOCAL_RAW, IAXC_VIDEO_PREF_RECV_LOCAL_ENCODED, IAXC_VIDEO_PREF_RECV_REMOTE_RAW, IAXC_VIDEO_PREF_RECV_REMOTE_ENCODED, IAXC_VIDEO_PREF_SEND_DISABLE, IAXC_VIDEO_PREF_RECV_RGB32, IAXC_VIDEO_PREF_CAPTURE_DISABLE

Definition at line 75 of file video.c.

int iaxc_initialize ( int  num_calls  ) 

Initializes the IAXClient library.

Parameters:
num_calls The maximum number of simultaneous calls to handle.
This initializes the IAXClient

Definition at line 559 of file iaxclient_lib.c.

float iaxc_input_level_get (  ) 

Get the audio device input level.

Returns:
the input level in the range of 0.0f minimum to 1.0f maximum.

Definition at line 1802 of file iaxclient_lib.c.

int iaxc_input_level_set ( float  level  ) 

Sets the audio input level to level.

Parameters:
level The level in the range from 0.0f (min) to 1.0f (max).

Definition at line 1812 of file iaxclient_lib.c.

int iaxc_mic_boost_get ( void   ) 

Returns the current mic boost setting.

Returns:
0 if mic boost is disabled; otherwise non-zero.

Definition at line 1854 of file iaxclient_lib.c.

int iaxc_mic_boost_set ( int  enable  ) 

Sets the mic boost setting.

Parameters:
enable If non-zero enable the mic boost; otherwise disable.

Definition at line 1859 of file iaxclient_lib.c.

void iaxc_millisleep ( long  ms  ) 

Suspends thread execution for an interval measured in milliseconds.

Parameters:
ms The number of milliseconds to sleep

Definition at line 44 of file unixfuncs.c.

float iaxc_output_level_get (  ) 

Get the audio device output level.

Returns:
the input level in the range of 0.0f minimum to 1.0f maximum.

Definition at line 1807 of file iaxclient_lib.c.

int iaxc_output_level_set ( float  level  ) 

Sets the audio output level to level.

Parameters:
level The level in the range from 0.0f (min) to 1.0f (max).

Definition at line 1817 of file iaxclient_lib.c.

int iaxc_play_sound ( struct iaxc_sound sound,
int  ring 
)

Play a sound.

Parameters:
sound An iaxc_sound structure.
ring 0 to play through output device or 1 to play through the "ring" device.
Returns:
The id number of the sound being played

Definition at line 1822 of file iaxclient_lib.c.

int iaxc_quelch ( int  callNo,
int  MOH 
)

Causes the audio channel for callNo to QUELCH (be squelched).

Parameters:
callNo The number of the active, accepted call to quelch.
MOH If non-zero Music On Hold should be played on the QUELCH'd call.

Definition at line 1840 of file iaxclient_lib.c.

int iaxc_register ( const char *  user,
const char *  pass,
const char *  host 
)

Registers the IAXClient instance with an IAX server.

Parameters:
user The username to register as
pass The password to register with
host The address of the host/peer to register with
Returns:
The registration id number upon success; -1 otherwise.

Definition at line 1247 of file iaxclient_lib.c.

void iaxc_reject_call ( void   ) 

Rejects the currently selected call.

Note:
This is pretty much a useless API, since the act of selecting a call will answer it.

Definition at line 1473 of file iaxclient_lib.c.

void iaxc_reject_call_number ( int  callNo  ) 

Rejects the incoming call callNo.

Parameters:
callNo The call number to reject.

Definition at line 1481 of file iaxclient_lib.c.

int iaxc_select_call ( int  callNo  ) 

Sets callNo as the currently selected call.

Parameters:
callNo The call to select or < 0 to indicate no selected call.
Note:
Will answer an incoming ringing call as a side effect. Personally I believe this behavior is undesirable and feel it renders iaxc_reject_call pretty much useless.

Definition at line 424 of file iaxclient_lib.c.

void iaxc_send_dtmf ( char  digit  ) 

Sends a DTMF digit to the currently selected call.

Parameters:
digit The DTMF digit to send (0-9, A-D, *, #).

Definition at line 1492 of file iaxclient_lib.c.

void iaxc_send_url ( const char *  url,
int  link 
)

Sends a URL across the currently selected call.

Parameters:
url The URL to send across.
link If non-zero the URL is a link

Definition at line 1514 of file iaxclient_lib.c.

void iaxc_set_audio_output ( int  mode  ) 

Sets the audio output to mode.

Parameters:
mode The audio mode 0 indicates remote audio should be played; non-zero prevents remote audio from being played.

Definition at line 168 of file iaxclient_lib.c.

int iaxc_set_audio_prefs ( unsigned int  prefs  ) 

Set the various audio delivery preferences.

Parameters:
prefs The desired preferences to use. They are represented using the AIXC_AUDIO_PREF_{} family of defines.
Returns:
0 on success and -1 on error.
See also:
IAXC_AUDIO_PREF_RECV_LOCAL_RAW, IAXC_AUDIO_PREF_RECV_LOCAL_ENCODED, IAXC_AUDIO_PREF_RECV_REMOTE_RAW, IAXC_AUDIO_PREF_RECV_REMOTE_ENCODED, IAXC_AUDIO_PREF_SEND_DISABLE

Definition at line 1879 of file iaxclient_lib.c.

void iaxc_set_callerid ( const char *  name,
const char *  number 
)

Sets the caller id name and number.

Parameters:
name The caller id name.
number The caller id number.

Definition at line 690 of file iaxclient_lib.c.

void iaxc_set_event_callback ( iaxc_event_callback_t  func  ) 

Sets the callback to call with IAXClient events.

Parameters:
func The callback function to call with events

Definition at line 183 of file iaxclient_lib.c.

int iaxc_set_event_callpost ( void *  handle,
int  id 
)

Sets iaxclient to post a pointer to a copy of event using o/s specific Post method.

Parameters:
handle 
id 

Definition at line 188 of file iaxclient_lib.c.

void iaxc_set_filters ( int  filters  ) 

Sets the current audio filters to apply.

Parameters:
filters The combination of all the audio filters to use (IAXC_FILTER_{} defines).
The IAXC_FILTER_{} defines are used to specify the filters.
See also:
IAXC_FILTER_DENOISE, IAXC_FILTER_AGC, IAXC_FILTER_ECHO, IAXC_FILTER_AAGC, IAXC_FILTER_CN

Definition at line 392 of file audio_encode.c.

void iaxc_set_formats ( int  preferred,
int  allowed 
)

Sets the formats to be used.

Parameters:
preferred The single preferred audio format
allowed A mask containing all audio formats to allow
See also:
IAXC_FORMAT_G723_1, IAXC_FORMAT_GSM, IAXC_FORMAT_ULAW, IAXC_FORMAT_ALAW, IAXC_FORMAT_G726, IAXC_FORMAT_ADPCM, IAXC_FORMAT_SLINEAR, IAXC_FORMAT_LPC10, IAXC_FORMAT_G729A, IAXC_FORMAT_SPEEX, IAXC_FORMAT_ILBC, IAXC_FORMAT_MAX_AUDIO

Definition at line 679 of file iaxclient_lib.c.

void iaxc_set_jb_target_extra ( long  value  ) 

Fine tune jitterbuffer control.

Parameters:
value 

Definition at line 484 of file iaxclient_lib.c.

void iaxc_set_min_outgoing_framesize ( int  samples  ) 

Sets the minimum outgoing frame size.

Parameters:
samples The minimum number of samples to include in an outgoing frame.

Definition at line 685 of file iaxclient_lib.c.

void iaxc_set_networking ( iaxc_sendto_t  st,
iaxc_recvfrom_t  rf 
)

Application-defined networking; give substitute sendto and recvfrom functions.

Parameters:
st The send function to use.
rf The receive function to use.
Note:
Must be called before iaxc_initialize!

Definition at line 478 of file iaxclient_lib.c.

void iaxc_set_preferred_source_udp_port ( int  sourceUdpPort  ) 

Set Preferred UDP Port:.

Parameters:
sourceUdpPort The source UDP port to prefer 0 Use the default port (4569), <0 Uses a dynamically assigned port, and >0 tries to bind to the specified port
Note:
must be called before iaxc_initialize()

Definition at line 535 of file iaxclient_lib.c.

void iaxc_set_silence_threshold ( float  thr  ) 

Sets the silence threshold to thr.

Parameters:
thr The threshold value in dB. A value of 0.0f effectively mutes audio input.

Definition at line 398 of file audio_encode.c.

void iaxc_set_speex_settings ( int  decode_enhance,
float  quality,
int  bitrate,
int  vbr,
int  abr,
int  complexity 
)

Sets speex specific codec settings.

Parameters:
decode_enhance 1/0 perceptual enhancement for decoder
quality,: Generally, set either quality (0-9) or bitrate. -1 for "default"
bitrate in kbps. Applies to CBR only; -1 for default. (overrides "quality" for CBR mode)
vbr Variable bitrate mode: 0/1
abr mode/rate: 0 for not ABR, bitrate for ABR mode
complexity Algorithmic complexity. Think -N for gzip. Higher numbers take more CPU for better quality. 3 is default and good choice.
A good choice is (1,-1,-1,0,8000,3): 8kbps ABR

Definition at line 244 of file audio_encode.c.

int iaxc_set_video_prefs ( unsigned int  prefs  ) 

Sets the current video preferences.

Parameters:
prefs The desired preferences to use. They are represented using the IAXC_VIDEO_PREF_{} family of defines.
Please note that this overwrites all previous preferences. In other words, a read-modify-write must be done to change a single preference.

Returns:
0 on success and -1 on error.
See also:
IAXC_VIDEO_PREF_RECV_LOCAL_RAW, IAXC_VIDEO_PREF_RECV_LOCAL_ENCODED, IAXC_VIDEO_PREF_RECV_REMOTE_RAW, IAXC_VIDEO_PREF_RECV_REMOTE_ENCODED, IAXC_VIDEO_PREF_SEND_DISABLE, IAXC_VIDEO_PREF_RECV_RGB32, IAXC_VIDEO_PREF_CAPTURE_DISABLE

Definition at line 80 of file video.c.

void iaxc_setup_call_transfer ( int  sourceCallNo,
int  targetCallNo 
)

Setup a transfer of sourceCallNo to targetCallNo.

Parameters:
sourceCallNo The number of the active call session to transfer.
targetCallNo The active call session to be transferred to.
This is used in performing as the final step in an attended call transfer.

Definition at line 1431 of file iaxclient_lib.c.

void iaxc_shutdown (  ) 

Shutsdown the IAXClient library.

This should be called by applications utilizing iaxclient before they exit. It dumps all calls, and releases any audio/video drivers being used.

Note:
It is unsafe to call most IAXClient API's after calling this!

Definition at line 656 of file iaxclient_lib.c.

int iaxc_start_processing_thread (  ) 

Starts all the internal processing thread(s).

Note:
Should be called after iaxc_initialize, but before any call processing related functions.

Definition at line 799 of file iaxclient_lib.c.

int iaxc_stop_processing_thread (  ) 

Stops all the internal processing thread(s).

Note:
Should be called before iaxc_shutdown.

Definition at line 818 of file iaxclient_lib.c.

int iaxc_stop_sound ( int  id  ) 

Stop sound id from being played.

Parameters:
id The id of a sound to stop as returned from iaxc_play_sound.

Definition at line 1831 of file iaxclient_lib.c.

int iaxc_unregister ( int  id  ) 

Unregisters IAXClient from a server.

Parameters:
id The registration number returned by iaxc_register.

Definition at line 1238 of file iaxclient_lib.c.

char* iaxc_version ( char *  ver  ) 

Returns a copy of IAXClient library version.

Parameters:
ver A buffer to store the version string in. It MUST be at least IAXC_EVENT_BUFSIZ bytes in size.
Returns:
the version string (as stored in ver).

int iaxc_video_bypass_jitter ( int   ) 

Helper function to control use of jitter buffer for video events.

Todo:
make this a video pref, perhaps?

Definition at line 541 of file iaxclient_lib.c.

void iaxc_video_format_get_cap ( int *  preferred,
int *  allowed 
)

Returns the video format settings.

Parameters:
preferred Receives the single preferred video format
allowed Receives the mask of the allowed video formats
See also:
IAXC_FORMAT_JPEG, IAXC_FORMAT_PNG, IAXC_FORMAT_H261, IAXC_FORMAT_H263, IAXC_FORMAT_H263_PLUS, IAXC_FORMAT_H264, IAXC_FORMAT_MPEG4, IAXC_FORMAT_THEORA, IAXC_FORMAT_MAX_VIDEO

Definition at line 132 of file video.c.

void iaxc_video_format_set ( int  preferred,
int  allowed,
int  framerate,
int  bitrate,
int  width,
int  height,
int  fs 
)

Sets the allowed/preferred video formats.

Parameters:
preferred The single preferred video format
allowed The mask of the allowed video formats
framerate The video frame rate in fps.
bitrate The video bitrate in bps.
width The width of the video.
height The height of the video.
fs The video fragment size.
See also:
IAXC_FORMAT_JPEG, IAXC_FORMAT_PNG, IAXC_FORMAT_H261, IAXC_FORMAT_H263, IAXC_FORMAT_H263_PLUS, IAXC_FORMAT_H264, IAXC_FORMAT_MPEG4, IAXC_FORMAT_THEORA, IAXC_FORMAT_MAX_VIDEO

Definition at line 138 of file video.c.

void iaxc_video_format_set_cap ( int  preferred,
int  allowed 
)

Sets the video format capabilities.

Parameters:
preferred The single preferred video format
allowed The mask of the allowed video formats
See also:
IAXC_FORMAT_JPEG, IAXC_FORMAT_PNG, IAXC_FORMAT_H261, IAXC_FORMAT_H263, IAXC_FORMAT_H263_PLUS, IAXC_FORMAT_H264, IAXC_FORMAT_MPEG4, IAXC_FORMAT_THEORA, IAXC_FORMAT_MAX_VIDEO

Definition at line 126 of file video.c.

void iaxc_video_params_change ( int  framerate,
int  bitrate,
int  width,
int  height,
int  fs 
)

Change video params for the current call on the fly This will destroy the existing encoder and create a new one use negative values for parameters that should not change.

Parameters:
framerate The video frame rate in fps.
bitrate The video bitrate in bps.
width The width of the video.
height The height of the video.
fs The video fragment size.

Definition at line 248 of file video.c.

void iaxc_YUV420_to_RGB32 ( int  width,
int  height,
char *  src,
char *  dest 
)

Converts a YUV420 image to RGB32.

Parameters:
width The width of the image
height The height of the image
src The buffer containing the source image
dest The buffer to write the converted image to. The buffer should be width * height * 4 bytes in size.
Converts the image based on the forumulas found at http://en.wikipedia.org/wiki/YUV

Definition at line 786 of file video.c.


Generated on Mon Sep 24 15:43:29 2007 for IAXClient by  doxygen 1.5.3