amsip session interface
[SIP messages and call control API]


Functions

int am_session_start (const char *identity, const char *url, const char *proxy, const char *outbound_proxy)
int am_session_start_text_conversation (const char *identity, const char *url, const char *proxy, const char *outbound_proxy)
int am_session_start_file_transfer (const char *identity, const char *url, const char *proxy, const char *outbound_proxy)
int am_session_get_udpftp (int did, MST140Block *_blk)
int am_session_send_udpftp (int did, MST140Block *_blk)
int am_session_get_text (int did, MST140Block *_blk)
int am_session_send_text (int did, MST140Block *_blk)
void am_free_t140block (MST140Block *_blk)
int am_session_hold (int did, const char *wav_file)
int am_session_off_hold (int did)
int am_session_inactive (int did)
int am_session_inactive_0_0_0_0 (int did)
int am_session_mute (int did)
int am_session_unmute (int did)
int am_session_add_in_conference (const char *identity, const char *url, const char *proxy, const char *outbound_proxy, const char *conf_name)
int am_session_answer (int tid, int did, int code, int enable_audio)
int am_session_answer_with_video (int tid, int did, int code, int enable_audio, int enable_video)
int am_session_redirect (int tid, int did, int code, const char *url)
int am_session_stop (int cid, int did, int code)
int am_session_refer (int did, const char *url, const char *referred_by)
int am_session_get_referto (int did, char *refer_to, size_t refer_to_len)
int am_session_find_by_replaces (osip_message_t *request)
int am_session_answer_request (int tid, int did, int code)
int am_session_send_request (int did, const char *method, const char *content_type, const char *body, int size)
int am_session_play_file (int did, const char *wav_file)
int am_session_playfile (int did, const char *wav_file, int repeat, MSFilterNotifyFunc cb_fileplayer_eof)
int am_session_send_inband_dtmf (int did, char dtmf_number)
int am_session_send_rtp_dtmf (int did, char dtmf_number)
int am_session_send_dtmf (int did, char dtmf_number)
int am_session_send_dtmf_with_duration (int did, char dtmf_number, int duration)
int am_session_get_dtmf_event (int did, struct am_dtmf_event *dtmf_event)
int am_session_get_audio_remote (int did, char *remote_info)
int am_session_get_udpftp_bandwidth (int did, struct am_bandwidth_stats *band_stats)
int am_session_get_text_bandwidth (int did, struct am_bandwidth_stats *band_stats)
int am_session_get_audio_bandwidth (int did, struct am_bandwidth_stats *band_stats)
int am_session_get_audio_statistics (int did, struct am_audio_stats *audio_stats)
int am_session_modify_bitrate (int did, const char *preferred_codec, int compress_more)
int am_session_record (int did, const char *recfile)
int am_session_stop_record (int did)
int am_session_add_t140 (int did)
int am_session_receive_file (int cid, int did, const char *filename)
int am_session_file_info (int cid, int did, char *filename, int filename_size, int *file_size, int *bytes_sent, int *bytes_received)
int am_session_send_file (int cid, int did, const char *filename, const char *filename_short)
int am_session_stop_transfer (int cid, int did)
int am_session_add_external_rtpdata (int did, MSFilter *external_rtpdata)

Function Documentation

int am_session_start ( const char *  identity,
const char *  url,
const char *  proxy,
const char *  outbound_proxy 
)

Configure amsip to start a SIP session.

Parameters:
identity Caller SIP identity
url Callee SIP identity
proxy Set the proxy server
outbound_proxy OutBound Proxy

int am_session_start_text_conversation ( const char *  identity,
const char *  url,
const char *  proxy,
const char *  outbound_proxy 
)

Configure amsip to start a SIP session with text.

Parameters:
identity Caller SIP identity
url Callee SIP identity
proxy Set the proxy server
outbound_proxy OutBound Proxy

int am_session_start_file_transfer ( const char *  identity,
const char *  url,
const char *  proxy,
const char *  outbound_proxy 
)

Configure amsip to start a file transfer using UDP/RTP.

Parameters:
identity Caller SIP identity
url Callee SIP identity
proxy Set the proxy server
outbound_proxy OutBound Proxy

int am_session_get_udpftp ( int  did,
MST140Block *  _blk 
)

Get UDP/RTP data from remote party.

Parameters:
did Session identifier.
_blk Block that contains text data.

int am_session_send_udpftp ( int  did,
MST140Block *  _blk 
)

Send UDP/RTP data from remote party.

Parameters:
did Session identifier.
_blk Block that contains text data.

int am_session_get_text ( int  did,
MST140Block *  _blk 
)

Get UDP/RTP text from remote party.

Parameters:
did Session identifier.
_blk Block that contains text data.

int am_session_send_text ( int  did,
MST140Block *  _blk 
)

Send UDP/RTP text from remote party.

Parameters:
did Session identifier.
_blk Block that contains text data.

void am_free_t140block ( MST140Block *  _blk  ) 

Release allocated string inside MST140Block.

Parameters:
_blk Block that contains text data.

int am_session_hold ( int  did,
const char *  wav_file 
)

Configure amsip to put on hold a SIP session. (send wav_file)

Parameters:
did Session identifier.
wav_file Wav file to play.

int am_session_off_hold ( int  did  ) 

Configure amsip to put off hold a SIP session.

Parameters:
did Session identifier.

int am_session_inactive ( int  did  ) 

Configure amsip to make streams inactive.

Parameters:
did Session identifier.

int am_session_inactive_0_0_0_0 ( int  did  ) 

Configure amsip to make streams inactive. Note: put ip=0_0_0_0 and port=0 for the audio SDP media block. Note2: THIS IS NOT POSSIBLE TO RETREIVE BACK THIS CALL. THIS METHOD MUST ONLY BE USED BEFORE MAKING A CALL TRANSFER WITH SOME UNCOMPLIANT SIP-PBX.

Parameters:
did Session identifier.

int am_session_mute ( int  did  ) 

Configure amsip to mute a SIP session. (send silence)

Parameters:
did Session identifier.

int am_session_unmute ( int  did  ) 

Configure amsip to unmute a SIP session.

Parameters:
did Session identifier.

int am_session_add_in_conference ( const char *  identity,
const char *  url,
const char *  proxy,
const char *  outbound_proxy,
const char *  conf_name 
)

Configure amsip to start a SIP session and add user in an existing conference.

Parameters:
identity Caller SIP identity
url Callee SIP identity
proxy Set the proxy server
outbound_proxy OutBound Proxy
conf_name Conference name

int am_session_answer ( int  tid,
int  did,
int  code,
int  enable_audio 
)

Configure amsip to establish a SIP session.

Parameters:
tid Transaction identifier.
did Session identifier.
code Code to use.
enable_audio start audio if available.

int am_session_answer_with_video ( int  tid,
int  did,
int  code,
int  enable_audio,
int  enable_video 
)

Configure amsip to establish a SIP session.

Parameters:
tid Transaction identifier.
did Session identifier.
code Code to use.
enable_audio start audio if available.
enable_video start video if available.

int am_session_redirect ( int  tid,
int  did,
int  code,
const char *  url 
)

Configure amsip to redirect a SIP session.

Parameters:
tid Transaction identifier.
did Session identifier.
code Code to use.
url SIP (or other url) address for redirection.

int am_session_stop ( int  cid,
int  did,
int  code 
)

Configure amsip to establish a SIP session.

Parameters:
cid dialog identifier.
did Session identifier.
code Code to use (if answer needed).

int am_session_refer ( int  did,
const char *  url,
const char *  referred_by 
)

Configure amsip to transfer a SIP session.

Parameters:
did Session identifier.
url SIP (or other url) address for redirection.

int am_session_get_referto ( int  did,
char *  refer_to,
size_t  refer_to_len 
)

Add Replaces parameter to refer-to url.

Parameters:
did Session identifier.
refer_to String to carry refer_to.
refer_to_len Size of refer_to string.

int am_session_find_by_replaces ( osip_message_t *  request  ) 

Find the call that relates to the Replaces header.

Parameters:
request requet containging a replace header.

int am_session_answer_request ( int  tid,
int  did,
int  code 
)

Configure amsip to establish a SIP session.

Parameters:
tid Transaction identifier.
did Session identifier.
code Code to use.

int am_session_send_request ( int  did,
const char *  method,
const char *  content_type,
const char *  body,
int  size 
)

Send a request during a session

Parameters:
did Session identifier.
method SIP method (e.g. INVITE)
content_type Content-type of the body
body Attached content
size Size of body

int am_session_play_file ( int  did,
const char *  wav_file 
)

Configure amsip to play a file in an outgoing RTP session.

Parameters:
did Session identifier.
wav_file File to play.

int am_session_playfile ( int  did,
const char *  wav_file,
int  repeat,
MSFilterNotifyFunc  cb_fileplayer_eof 
)

Configure amsip to play a file in an outgoing RTP session.

Parameters:
did Session identifier.
wav_file File to play.
repeat repeat: -2 to play once, >0 delai between replay
cb_fileplayer_eof callback to indicate endoffile

int am_session_send_inband_dtmf ( int  did,
char  dtmf_number 
)

Configure amsip to send an in-band DTMF in an outgoing RTP session.

Parameters:
did Session identifier.
dtmf_number DTMF to send.

int am_session_send_rtp_dtmf ( int  did,
char  dtmf_number 
)

Configure amsip to send a RTP telephone-event in an outgoing RTP session.

Parameters:
did Session identifier.
dtmf_number DTMF to send.

int am_session_send_dtmf ( int  did,
char  dtmf_number 
)

Configure amsip to send an INFO with dtmf attachement.

Parameters:
did Session identifier.
dtmf_number DTMF to send.

int am_session_send_dtmf_with_duration ( int  did,
char  dtmf_number,
int  duration 
)

Configure amsip to send an INFO with dtmf attachement.

Parameters:
did Session identifier.
dtmf_number DTMF to send.
duration DTMF duration.

int am_session_get_dtmf_event ( int  did,
struct am_dtmf_event *  dtmf_event 
)

Get dtmf from RTP session.

Parameters:
did Session identifier.
dtmf_event dtmf_event structure.

int am_session_get_audio_remote ( int  did,
char *  remote_info 
)

Find out the destination IP/PORT for audio stream. return >0 remote SDP ip/port used return ==0 remote SDP candidate ip/port used (probably for direct comunication) return <0 undefined error.

Parameters:
did Session identifier.
remote_info string of size 256 to get the remote IP/PORT for audio stream.

int am_session_get_udpftp_bandwidth ( int  did,
struct am_bandwidth_stats *  band_stats 
)

Get statistics for RTP udpftp stream.

Parameters:
did Session identifier.
band_stats struct to hold information.

int am_session_get_text_bandwidth ( int  did,
struct am_bandwidth_stats *  band_stats 
)

Get statistics for RTP text stream.

Parameters:
did Session identifier.
band_stats struct to hold information.

int am_session_get_audio_bandwidth ( int  did,
struct am_bandwidth_stats *  band_stats 
)

Get statistics for RTP audio stream.

Parameters:
did Session identifier.
band_stats struct to hold information.

int am_session_get_audio_statistics ( int  did,
struct am_audio_stats audio_stats 
)

Get statistics for RTP audio stream.

Parameters:
did Session identifier.
audio_stats struct to hold statistics.

int am_session_modify_bitrate ( int  did,
const char *  preferred_codec,
int  compress_more 
)

Get statistics for RTP audio stream.

Parameters:
did Session identifier.
preferred_codec Preferred codec to use.
compress_more compress_more. (0 means you want to use more bandwidth)

int am_session_record ( int  did,
const char *  recfile 
)

Record both audio stream (incoming+outgoing).

Parameters:
did Session identifier.
recfile File Name for recording.

int am_session_stop_record ( int  did  ) 

Stop recording the call.

Parameters:
did Session identifier.

int am_session_add_t140 ( int  did  ) 

Add t140 chat session in the call.

Parameters:
did Session identifier.

int am_session_receive_file ( int  cid,
int  did,
const char *  filename 
)

Receive file within a text conversation (t140) established call.

Parameters:
cid Session identifier.
did Session identifier.
filename filename of the file to receive.

int am_session_file_info ( int  cid,
int  did,
char *  filename,
int  filename_size,
int *  file_size,
int *  bytes_sent,
int *  bytes_received 
)

Receive file within a text conversation (t140) established call.

Parameters:
cid Session identifier.
did Session identifier.
filename filename of the file to receive.
filename_size length of filename string.
file_size size of file.
bytes_sent bytes sent.
bytes_received bytes received.

int am_session_send_file ( int  cid,
int  did,
const char *  filename,
const char *  filename_short 
)

Send file within a text conversation (t140) established call.

Parameters:
cid Session identifier.
did Session identifier.
filename filename of the file to receive.

int am_session_stop_transfer ( int  cid,
int  did 
)

Release udpftp transfer resources.

Parameters:
cid Session identifier.
did Session identifier.

int am_session_add_external_rtpdata ( int  did,
MSFilter *  external_rtpdata 
)

Add new source for sending RTP data.

Parameters:
did Session identifier.
external_rtpdata External filter.


Generated on Tue Jun 16 19:18:37 2009 for libamsip by  doxygen 1.5.9