SIP Witch 1.9.15
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
eXosip2 INVITE and Call Management

Functions

int eXosip_call_set_reference (struct eXosip_t *excontext, int id, void *reference)
 Set a new application context for an existing call. More...
 
void * eXosip_call_get_reference (struct eXosip_t *excontext, int cid)
 Get the application context pointer for an existing call. More...
 
int eXosip_call_build_initial_invite (struct eXosip_t *excontext, osip_message_t **invite, const char *to, const char *from, const char *route, const char *subject)
 Build a default INVITE message for a new call. More...
 
int eXosip_call_send_initial_invite (struct eXosip_t *excontext, osip_message_t *invite)
 Initiate a call. More...
 
int eXosip_call_build_request (struct eXosip_t *excontext, int did, const char *method, osip_message_t **request)
 Build a default request within a call. More...
 
int eXosip_call_build_ack (struct eXosip_t *excontext, int did, osip_message_t **ack)
 Build a default ACK for a 200ok received. More...
 
int eXosip_call_send_ack (struct eXosip_t *excontext, int did, osip_message_t *ack)
 Send the ACK for the 200ok received. More...
 
int eXosip_call_build_refer (struct eXosip_t *excontext, int did, const char *refer_to, osip_message_t **request)
 Build a default REFER for a call transfer. More...
 
int eXosip_call_build_info (struct eXosip_t *excontext, int did, osip_message_t **request)
 Build a default INFO within a call. More...
 
int eXosip_call_build_options (struct eXosip_t *excontext, int did, osip_message_t **request)
 Build a default OPTIONS within a call. More...
 
int eXosip_call_build_update (struct eXosip_t *excontext, int did, osip_message_t **request)
 Build a default UPDATE within a call. More...
 
int eXosip_call_build_notify (struct eXosip_t *excontext, int did, int subscription_status, osip_message_t **request)
 Build a default NOTIFY within a call. More...
 
int eXosip_call_send_request (struct eXosip_t *excontext, int did, osip_message_t *request)
 send the request within call. More...
 
int eXosip_call_build_answer (struct eXosip_t *excontext, int tid, int status, osip_message_t **answer)
 Build default Answer for request. More...
 
int eXosip_call_send_answer (struct eXosip_t *excontext, int tid, int status, osip_message_t *answer)
 Send Answer for invite. More...
 
int eXosip_call_terminate (struct eXosip_t *excontext, int cid, int did)
 Terminate a call. More...
 
int eXosip_call_build_prack (struct eXosip_t *excontext, int tid, osip_message_t **prack)
 Build a PRACK for invite. More...
 
int eXosip_call_send_prack (struct eXosip_t *excontext, int tid, osip_message_t *prack)
 Send a PRACK for invite. More...
 
int eXosip_call_get_referto (struct eXosip_t *excontext, int did, char *refer_to, size_t refer_to_len)
 Get Refer-To header with Replace parameter from dialog. More...
 
int eXosip_call_find_by_replaces (struct eXosip_t *excontext, char *replaces)
 Return did (or cid) for the replace header. More...
 

Detailed Description

Function Documentation

int eXosip_call_build_ack ( struct eXosip_t *  excontext,
int  did,
osip_message_t **  ack 
)

#include <eX_call.h>

Build a default ACK for a 200ok received.

Parameters
excontexteXosip_t instance.
diddialog id of call.
ackThe sip request to build.
int eXosip_call_build_answer ( struct eXosip_t *  excontext,
int  tid,
int  status,
osip_message_t **  answer 
)

#include <eX_call.h>

Build default Answer for request.

Parameters
excontexteXosip_t instance.
tidid of transaction to answer.
statusStatus code to use.
answerThe sip answer to build.
int eXosip_call_build_info ( struct eXosip_t *  excontext,
int  did,
osip_message_t **  request 
)

#include <eX_call.h>

Build a default INFO within a call.

Parameters
excontexteXosip_t instance.
diddialog id of call.
requestThe sip request to build.
int eXosip_call_build_initial_invite ( struct eXosip_t *  excontext,
osip_message_t **  invite,
const char *  to,
const char *  from,
const char *  route,
const char *  subject 
)

#include <eX_call.h>

Build a default INVITE message for a new call.

Parameters
excontexteXosip_t instance.
invitePointer for the SIP element to hold.
toSIP url for callee.
fromSIP url for caller.
routeRoute header for INVITE. (optional)
subjectSubject for the call.
int eXosip_call_build_notify ( struct eXosip_t *  excontext,
int  did,
int  subscription_status,
osip_message_t **  request 
)

#include <eX_call.h>

Build a default NOTIFY within a call.

Parameters
excontexteXosip_t instance.
diddialog id of call.
subscription_statusSubscription status of the request.
requestThe sip request to build.
int eXosip_call_build_options ( struct eXosip_t *  excontext,
int  did,
osip_message_t **  request 
)

#include <eX_call.h>

Build a default OPTIONS within a call.

Parameters
excontexteXosip_t instance.
diddialog id of call.
requestThe sip request to build.
int eXosip_call_build_prack ( struct eXosip_t *  excontext,
int  tid,
osip_message_t **  prack 
)

#include <eX_call.h>

Build a PRACK for invite.

Parameters
excontexteXosip_t instance.
tidid of the invite transaction.
prackThe sip prack to build.
int eXosip_call_build_refer ( struct eXosip_t *  excontext,
int  did,
const char *  refer_to,
osip_message_t **  request 
)

#include <eX_call.h>

Build a default REFER for a call transfer.

Parameters
excontexteXosip_t instance.
diddialog id of call.
refer_tourl for call transfer (Refer-To header).
requestThe sip request to build.
int eXosip_call_build_request ( struct eXosip_t *  excontext,
int  did,
const char *  method,
osip_message_t **  request 
)

#include <eX_call.h>

Build a default request within a call.

(INVITE, OPTIONS, INFO, REFER)

Parameters
excontexteXosip_t instance.
diddialog id of call.
methodrequest type to build.
requestThe sip request to build.
int eXosip_call_build_update ( struct eXosip_t *  excontext,
int  did,
osip_message_t **  request 
)

#include <eX_call.h>

Build a default UPDATE within a call.

Parameters
excontexteXosip_t instance.
diddialog id of call.
requestThe sip request to build.
int eXosip_call_find_by_replaces ( struct eXosip_t *  excontext,
char *  replaces 
)

#include <eX_call.h>

Return did (or cid) for the replace header.

Parameters
excontexteXosip_t instance.
replacesbuffer to be filled with refer-to info.
void* eXosip_call_get_reference ( struct eXosip_t *  excontext,
int  cid 
)

#include <eX_call.h>

Get the application context pointer for an existing call.

Parameters
excontexteXosip_t instance.
cidid of the call.
Returns
Application context reference
int eXosip_call_get_referto ( struct eXosip_t *  excontext,
int  did,
char *  refer_to,
size_t  refer_to_len 
)

#include <eX_call.h>

Get Refer-To header with Replace parameter from dialog.

Parameters
excontexteXosip_t instance.
didid of the dialog.
refer_tobuffer to be filled with refer-to info.
refer_to_lensize of refer_to buffer.
int eXosip_call_send_ack ( struct eXosip_t *  excontext,
int  did,
osip_message_t ack 
)

#include <eX_call.h>

Send the ACK for the 200ok received.

Parameters
excontexteXosip_t instance.
diddialog id of call.
ackSIP ACK message to send.
int eXosip_call_send_answer ( struct eXosip_t *  excontext,
int  tid,
int  status,
osip_message_t answer 
)

#include <eX_call.h>

Send Answer for invite.

Parameters
excontexteXosip_t instance.
tidid of transaction to answer.
statusresponse status if answer is NULL. (not allowed for 2XX)
answerThe sip answer to send.
int eXosip_call_send_initial_invite ( struct eXosip_t *  excontext,
osip_message_t invite 
)

#include <eX_call.h>

Initiate a call.

Parameters
excontexteXosip_t instance.
inviteSIP INVITE message to send.
int eXosip_call_send_prack ( struct eXosip_t *  excontext,
int  tid,
osip_message_t prack 
)

#include <eX_call.h>

Send a PRACK for invite.

Parameters
excontexteXosip_t instance.
tidid of the invite transaction.
prackThe sip prack to send.
int eXosip_call_send_request ( struct eXosip_t *  excontext,
int  did,
osip_message_t request 
)

#include <eX_call.h>

send the request within call.

(INVITE, OPTIONS, INFO, REFER, UPDATE)

Parameters
excontexteXosip_t instance.
diddialog id of call.
requestThe sip request to send.
int eXosip_call_set_reference ( struct eXosip_t *  excontext,
int  id,
void *  reference 
)

#include <eX_call.h>

Set a new application context for an existing call.

Parameters
excontexteXosip_t instance.
idcall-id or dialog-id of call
referenceNew application context.
int eXosip_call_terminate ( struct eXosip_t *  excontext,
int  cid,
int  did 
)

#include <eX_call.h>

Terminate a call.

send CANCEL, BYE or 603 Decline.

Parameters
excontexteXosip_t instance.
cidcall id of call.
diddialog id of call.