Raise Error exception

PJSUA2_RAISE_ERROR2(status, op)

Raise Error exception

PJSUA2_RAISE_ERROR3(status, op, txt)

Raise Error exception


Raise Error exception if the expression fails


Raise Error exception if the status fails


Raise Error exception if the expression fails


Run the statement and catch and ignore Error exception


typedef std::vector<std::string> StringVector

Array of strings

typedef std::vector<int> IntVector

Array of integers

typedef std::vector<unsigned char> ByteVector

Array of bytes

typedef std::map<std::string, std::string> StringToStringMap

Map string to string

typedef void *Token

Type of token, i.e. arbitrary application user data

typedef string SocketAddress

Socket address, encoded as string. The socket address contains host and port number in “host[:port]” format. The host part may contain hostname, domain name, IPv4 or IPv6 address. For IPv6 address, the address will be enclosed with square brackets, e.g. “[::1]:5060”.

typedef int TransportId

Transport ID is an integer.

typedef void *TransportHandle

Transport handle, corresponds to pjsip_transport instance.

typedef void *TimerEntry

Timer entry, corresponds to pj_timer_entry

typedef void *GenericData

Generic data


enum [anonymous]



enumerator INVALID_ID

Invalid ID, equal to PJSUA_INVALID_ID

enumerator SUCCESS

Success, equal to PJ_SUCCESS

struct Error
#include <types.hpp>

This structure contains information about an error that is thrown as an exception.

Public Functions

string info(bool multi_line = false) const

Build error string.


Default constructor

Error(pj_status_t prm_status, const string &prm_title, const string &prm_reason, const string &prm_src_file, int prm_src_line)

Construct an Error instance from the specified parameters. If prm_reason is empty, it will be filled with the error description for the status code.

Public Members

pj_status_t status

The error code.

string title

The PJSUA API operation that throws the error.

string reason

The error message

string srcFile

The PJSUA source file that throws the error

int srcLine

The line number of PJSUA source file that throws the error

struct Version
#include <types.hpp>

Version information.

Public Members

int major

Major number

int minor

Minor number

int rev

Additional revision number

string suffix

Version suffix (e.g. “-svn”)

string full

The full version info (e.g. “2.1.0-svn”)

unsigned numeric

PJLIB version number as three bytes with the following format: 0xMMIIRR00, where MM: major number, II: minor number, RR: revision number, 00: always zero for now.

struct TimeVal
#include <types.hpp>

Representation of time value.

Public Functions

void fromPj(const pj_time_val &prm)

Convert from pjsip

Public Members

long sec

The seconds part of the time.

long msec

The miliseconds fraction of the time.