---
name: "eXosip2_call"
section: "3"
platform: "linux"
package: "libexosip2-dev"
version: "4.1.0-2.1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/eXosip2_call"
---

# eXosip2\_call(3)

eXosip2 INVITE and Call Management

## NAME

eXosip2\_call - eXosip2 INVITE and Call Management

### Functions

int **eXosip\_call\_set\_reference** (struct eXosip\_t \*excontext, int id, void \*reference)\
 void \* **eXosip\_call\_get\_reference** (struct eXosip\_t \*excontext, int cid)\
 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)\
 int **eXosip\_call\_send\_initial\_invite** (struct eXosip\_t \*excontext, osip\_message\_t \*invite)\
 int **eXosip\_call\_build\_request** (struct eXosip\_t \*excontext, int did, const char \*method, osip\_message\_t \*\*request)\
 int **eXosip\_call\_build\_ack** (struct eXosip\_t \*excontext, int did, osip\_message\_t \*\*ack)\
 int **eXosip\_call\_send\_ack** (struct eXosip\_t \*excontext, int did, osip\_message\_t \*ack)\
 int **eXosip\_call\_build\_refer** (struct eXosip\_t \*excontext, int did, const char \*refer\_to, osip\_message\_t \*\*request)\
 int **eXosip\_call\_build\_info** (struct eXosip\_t \*excontext, int did, osip\_message\_t \*\*request)\
 int **eXosip\_call\_build\_options** (struct eXosip\_t \*excontext, int did, osip\_message\_t \*\*request)\
 int **eXosip\_call\_build\_update** (struct eXosip\_t \*excontext, int did, osip\_message\_t \*\*request)\
 int **eXosip\_call\_build\_notify** (struct eXosip\_t \*excontext, int did, int subscription\_status, osip\_message\_t \*\*request)\
 int **eXosip\_call\_send\_request** (struct eXosip\_t \*excontext, int did, osip\_message\_t \*request)\
 int **eXosip\_call\_build\_answer** (struct eXosip\_t \*excontext, int tid, int status, osip\_message\_t \*\*answer)\
 int **eXosip\_call\_send\_answer** (struct eXosip\_t \*excontext, int tid, int status, osip\_message\_t \*answer)\
 int **eXosip\_call\_terminate** (struct eXosip\_t \*excontext, int cid, int did)\
 int **eXosip\_call\_build\_prack** (struct eXosip\_t \*excontext, int tid, osip\_message\_t \*\*prack)\
 int **eXosip\_call\_send\_prack** (struct eXosip\_t \*excontext, int tid, osip\_message\_t \*prack)\
 int **eXosip\_call\_get\_referto** (struct eXosip\_t \*excontext, int did, char \*refer\_to, size\_t refer\_to\_len)\
 int **eXosip\_call\_find\_by\_replaces** (struct eXosip\_t \*excontext, char \*replaces)\

## Detailed Description

## Function Documentation

### int eXosip\_call\_set\_reference (struct eXosip\_t \* excontext, int id, void \* reference)

Set a new application context for an existing call

**Parameters:**

*excontext* eXosip\_t instance. \
 *id* call-id or dialog-id of call \
 *reference* New application context.

### void\* eXosip\_call\_get\_reference (struct eXosip\_t \* excontext, int cid)

Get the application context pointer for an existing call.

**Parameters:**

*excontext* eXosip\_t instance. \
 *cid* id of the call.

**Returns:**

Application context reference

### 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.

**Parameters:**

*excontext* eXosip\_t instance. \
 *invite* Pointer for the SIP element to hold. \
 *to* SIP url for callee. \
 *from* SIP url for caller. \
 *route* Route header for INVITE. (optional) \
 *subject* Subject for the call.

### int eXosip\_call\_send\_initial\_invite (struct eXosip\_t \* excontext, osip\_message\_t \* invite)

Initiate a call.

**Parameters:**

*excontext* eXosip\_t instance. \
 *invite* SIP INVITE message to send.

### 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. (INVITE, OPTIONS, INFO, REFER)

**Parameters:**

*excontext* eXosip\_t instance. \
 *did* dialog id of call. \
 *method* request type to build. \
 *request* The sip request to build.

### int eXosip\_call\_build\_ack (struct eXosip\_t \* excontext, int did, osip\_message\_t \*\* ack)

Build a default ACK for a 200ok received.

**Parameters:**

*excontext* eXosip\_t instance. \
 *did* dialog id of call. \
 *ack* The sip request to build.

### int eXosip\_call\_send\_ack (struct eXosip\_t \* excontext, int did, osip\_message\_t \* ack)

Send the ACK for the 200ok received..

**Parameters:**

*excontext* eXosip\_t instance. \
 *did* dialog id of call. \
 *ack* SIP ACK message to send.

### 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.

**Parameters:**

*excontext* eXosip\_t instance. \
 *did* dialog id of call. \
 *refer\_to* url for call transfer (Refer-To header). \
 *request* The sip request to build.

### int eXosip\_call\_build\_info (struct eXosip\_t \* excontext, int did, osip\_message\_t \*\* request)

Build a default INFO within a call.

**Parameters:**

*excontext* eXosip\_t instance. \
 *did* dialog id of call. \
 *request* The sip request to build.

### int eXosip\_call\_build\_options (struct eXosip\_t \* excontext, int did, osip\_message\_t \*\* request)

Build a default OPTIONS within a call.

**Parameters:**

*excontext* eXosip\_t instance. \
 *did* dialog id of call. \
 *request* The sip request to build.

### int eXosip\_call\_build\_update (struct eXosip\_t \* excontext, int did, osip\_message\_t \*\* request)

Build a default UPDATE within a call.

**Parameters:**

*excontext* eXosip\_t instance. \
 *did* dialog id of call. \
 *request* The sip request to build.

### 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.

**Parameters:**

*excontext* eXosip\_t instance. \
 *did* dialog id of call. \
 *subscription\_status* Subscription status of the request. \
 *request* The sip request to build.

### int eXosip\_call\_send\_request (struct eXosip\_t \* excontext, int did, osip\_message\_t \* request)

send the request within call. (INVITE, OPTIONS, INFO, REFER, UPDATE)

**Parameters:**

*excontext* eXosip\_t instance. \
 *did* dialog id of call. \
 *request* The sip request to send.

### int eXosip\_call\_build\_answer (struct eXosip\_t \* excontext, int tid, int status, osip\_message\_t \*\* answer)

Build default Answer for request.

**Parameters:**

*excontext* eXosip\_t instance. \
 *tid* id of transaction to answer. \
 *status* Status code to use. \
 *answer* The sip answer to build.

### int eXosip\_call\_send\_answer (struct eXosip\_t \* excontext, int tid, int status, osip\_message\_t \* answer)

Send Answer for invite.

**Parameters:**

*excontext* eXosip\_t instance. \
 *tid* id of transaction to answer. \
 *status* response status if answer is NULL. (not allowed for 2XX) \
 *answer* The sip answer to send.

### int eXosip\_call\_terminate (struct eXosip\_t \* excontext, int cid, int did)

Terminate a call. send CANCEL, BYE or 603 Decline.

**Parameters:**

*excontext* eXosip\_t instance. \
 *cid* call id of call. \
 *did* dialog id of call.

### int eXosip\_call\_build\_prack (struct eXosip\_t \* excontext, int tid, osip\_message\_t \*\* prack)

Build a PRACK for invite.

**Parameters:**

*excontext* eXosip\_t instance. \
 *tid* id of the invite transaction. \
 *prack* The sip prack to build.

### int eXosip\_call\_send\_prack (struct eXosip\_t \* excontext, int tid, osip\_message\_t \* prack)

Send a PRACK for invite.

**Parameters:**

*excontext* eXosip\_t instance. \
 *tid* id of the invite transaction. \
 *prack* The sip prack to send.

### 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.

**Parameters:**

*excontext* eXosip\_t instance. \
 *did* id of the dialog. \
 *refer\_to* buffer to be filled with refer-to info. \
 *refer\_to\_len* size of refer\_to buffer.

### int eXosip\_call\_find\_by\_replaces (struct eXosip\_t \* excontext, char \* replaces)

Return did (or cid) for the replace header.

**Parameters:**

*excontext* eXosip\_t instance. \
 *replaces* buffer to be filled with refer-to info.

## Author

Generated automatically by Doxygen for libeXosip2 from the source code.
