17 #ifndef _SIPWITCH_VOIP_H_
18 #define _SIPWITCH_VOIP_H_
20 #pragma GCC diagnostic ignored "-Wvariadic-macros"
31 #ifndef _UCOMMON_PLATFORM_H_
32 #include <ucommon/platform.h>
35 #ifndef _SIPWITCH_NAMESPACE_H_
41 #if defined(EXOSIP_OPT_BASE_OPTION) && !defined(EXOSIP_OPT_DONT_SEND_101)
78 static bool make_request_message(
context_t ctx,
const char *method,
const char *to,
const char *from,
msg_t *msg,
const char *route = NULL);
86 static bool make_invite_request(
context_t ctx,
const char *to,
const char *from,
const char *subject,
msg_t *msg,
const char *route = NULL);
108 static reg_t make_registry_request(
context_t ctx,
const char *
uri,
const char *s,
const char *c,
unsigned exp,
msg_t *msg);
112 static void add_authentication(
context_t ctx,
const char *user,
const char *secret,
const char *realm,
bool automatic =
false);
115 static void automatic_action(
context_t ctx);
117 static bool publish(
context_t ctx,
const char *
uri,
const char *contact,
const char *event,
const char *duration,
const char *type,
const char *body);
122 static void release_event(
event_t ev);
125 static bool listen(
context_t ctx,
int proto = IPPROTO_UDP,
const char *iface = NULL,
unsigned port = 5060,
bool tls =
false);
126 static void create(
context_t *ctx,
const char *agent,
int family = AF_INET);
128 static void show(
msg_t msg);
129 static void header(
msg_t msg,
const char *
key,
const char *
value);
130 static void attach(
msg_t msg,
const char *type,
const char *body);
131 static void attach(
msg_t msg,
const char *type,
const char *body,
size_t size);
135 static void server_supports(
voip::msg_t msg,
const char *txt);
136 static void server_requires(
voip::msg_t msg,
const char *txt);
139 #ifndef SESSION_EXPIRES
140 #define SESSION_EXPIRES "session-expires"
144 #define ALLOW_EVENTS "allow-events"
147 #ifndef SESSION_EVENT
148 #define SESSION_EVENT "event"
151 #define SDP_BODY "application/sdp"
155 #define P_SIPWITCH_NODE "P-sipwitch-node" // internodal calling
156 #define P_SIPWITCH_FEATURE "P-sipwitch-feat" // feature code reply
static void lock(context_t ctx)
Structure for SIP Message (REQUEST and RESPONSE).
Some convenience methods for manipulating SIP uri's.
osip_uri_param_t * uri_param_t
osip_content_type_t * ctype_t
osip_generic_param_t * param_t
static void unlock(context_t ctx)
int eXosip_lock(struct eXosip_t *excontext)
Lock the eXtented oSIP library.
Structure for event description.
osip_contact_t * contact_t
Structure for holding Body.
Definition of the Content-Type header.
osip_proxy_authenticate_t * proxyauth_t
GNU SIP Witch library namespace.
int eXosip_unlock(struct eXosip_t *excontext)
UnLock the eXtented oSIP library.
Definition of the From header.
osip_authorization_t * auth_t
Definition of the Via header.
Definition of the Authorization header.
Structure for referencing url parameters.
Structure for referencing SIP urls.
Definition of the WWW-Authenticate header.