Inheritance diagram for sipwitch::scripting:
Collaboration diagram for sipwitch::scripting:
Public Member Functions
virtual void
period (long slice)
virtual bool
announce (
MappedRegistry *user, const char *type, const char *event, const char *expires, const char *body)
Announce a SIP publish event from a registered user to plugins.
More...
Notify plugins about reply messages from external registrations.
More...
Used to verify authentication of a registered session.
More...
Enables plugin to redirect locally dialed destination to new uri.
More...
Enables plugin to remap users dialing remote destinations.
More...
Static Public Member Functions
static void
bind (unsigned short port)
static void
bind (const char *addr)
Static Public Attributes
Protected Member Functions
virtual void
errlog (shell::loglevel_t level, const char *text)
virtual bool
check (void)
Static Protected Member Functions
Protected Attributes
Static Protected Attributes
static unsigned
count = 0
static const char *
sip_tlsca = "/etc/ssl/ca.pem"
static const char *
sip_tlsdh = "/etc/ssl/dh1024.pem"
static const char *
sip_tlscert = "/etc/ssl/sipwitch.pem"
Private Member Functions
Notify plugins a user registration is being activated.
More...
Notify plugins a user registration has been expired or released.
More...
Detailed Description
Constructor & Destructor Documentation
sipwitch::scripting::scripting
(
)
Member Function Documentation
static void* sipwitch::service::callback::alloc
(
service *
cfgp,
size_t
size
)
inlinestaticprotectedinherited
const char *
type,
const char *
event,
const char *
expires,
const char *
body
)
virtualinherited
Announce a SIP publish event from a registered user to plugins.
- Parameters
-
user registration who publushed.
type of message that is published.
event type description, such as "presense" message.
expires time for this message.
body of message published by user agent.
- Returns
- true if plugin wishes to swallow this message.
Reimplemented in sipwitch::forward.
Definition at line 57 of file modules.cpp.
bool sipwitch::modules::sipwitch::authenticate
(
voip::reg_t
id,
const char *
realm
)
virtualinherited
Used to verify authentication of a registered session.
This is for use by sessions registered by plugins.
- Parameters
-
id of registration (eXosip rid).
realm of this registration.
- Returns
- true if valid, false if invalid or to ignore in this plugin.
Reimplemented in sipwitch::forward.
Definition at line 66 of file modules.cpp.
static void sipwitch::service::callback::bind
(
unsigned short
port )
inlinestaticinherited
void callback::bind
(
const char *
addr )
staticinherited
void callback::cdrlog
(
cdr *
call )
protectedvirtualinherited
bool callback::check
(
void
)
protectedvirtualinherited
static char* sipwitch::service::callback::dup
(
service *
cfgp,
const char *
s
)
inlinestaticprotectedinherited
void callback::errlog
(
shell::loglevel_t
level,
const char *
text
)
protectedvirtualinherited
bool sipwitch::service::callback::is_active
(
void
)
const
inlineprotectedinherited
static bool sipwitch::service::callback::is_configured
(
void
)
inlinestaticprotectedinherited
void sipwitch::modules::sipwitch::period
(
long
slice )
virtualinherited
Period service request.
A period is an interval during which stats are flushed and refreshed. This notifies the plugin that a period has occured, and what the interval for the period was in seconds.
- Parameters
-
slice of period in seconds.
Definition at line 53 of file modules.cpp.
void callback::publish
(
service *
cfg )
protectedvirtualinherited
char * sipwitch::modules::sipwitch::referLocal
(
MappedRegistry *
user,
const char *
target,
char *
buffer,
size_t
size
)
virtualinherited
Enables plugin to redirect locally dialed destination to new uri.
Might be used by a plugin that does per-user speed-dialing database, for example.
- Parameters
-
user that is dialing.
target user dialed.
buffer to store replacement uri in.
size of replacement buffer.
- Returns
- pointer to buffer or NULL if ignored.
Reimplemented in sipwitch::forward.
Definition at line 71 of file modules.cpp.
char * sipwitch::modules::sipwitch::referRemote
(
MappedRegistry *
user,
const char *
target,
char *
buffer,
size_t
size
)
virtualinherited
Enables plugin to remap users dialing remote destinations.
This might be used as a hook for a plugin that maintains gfc peer tables, for example.
- Parameters
-
user that is dialing.
target of remote uri.
buffer to store replacement uri in.
size of replacement buffer.
- Returns
- pointer to buffer of new uri or NULL ignored.
Definition at line 76 of file modules.cpp.
void sipwitch::modules::sipwitch::registration
(
voip::reg_t
id,
)
virtualinherited
Notify plugins about reply messages from external registrations.
This is used to get result of eXosip SIP registration requests. This might be used to get the result of a plugin registering itself with a gateway or SIP service provider, for example.
- Parameters
-
id of registration (eXosip rid).
result of registration
Reimplemented in sipwitch::forward.
Definition at line 62 of file modules.cpp.
void sipwitch::scripting::reload
(
service *
cfg )
privatevirtual
static void sipwitch::service::callback::setPublic
(
void
)
inlinestaticinherited
void callback::snapshot
(
FILE *
fp )
protectedvirtualinherited
void sipwitch::scripting::start
(
service *
cfg )
privatevirtual
void callback::stop
(
service *
cfg )
protectedvirtualinherited
Field Documentation
bool sipwitch::service::callback::active_flag
protectedinherited
unsigned callback::count = 0
staticprotectedinherited
unsigned sipwitch::service::callback::runlevel
protectedinherited
LinkedObject * callback::runlevels = {NULL, NULL, NULL, NULL}
staticprotectedinherited
char callback::session_uuid
staticprotectedinherited
volatile char * callback::sip_contact = NULL
staticprotectedinherited
const char * callback::sip_domain = NULL
staticprotectedinherited
int callback::sip_family = AF_INET
staticprotectedinherited
const char * callback::sip_iface = NULL
staticprotectedinherited
unsigned short callback::sip_port = 5060
staticprotectedinherited
unsigned callback::sip_prefix = 0
staticprotectedinherited
int callback::sip_protocol = IPPROTO_UDP
staticprotectedinherited
bool callback::sip_public = false
staticprotectedinherited
volatile char * callback::sip_publish = NULL
staticprotectedinherited
unsigned callback::sip_range = 0
staticprotectedinherited
const char * callback::sip_realm = "unknown"
staticprotectedinherited
const char * callback::sip_tlsca = "/etc/ssl/ca.pem"
staticprotectedinherited
const char * callback::sip_tlscert = "/etc/ssl/sipwitch.pem"
staticprotectedinherited
const char * callback::sip_tlsdev = "/dev/random"
staticprotectedinherited
const char * callback::sip_tlsdh = "/etc/ssl/dh1024.pem"
staticprotectedinherited
const char * callback::sip_tlskey = "/etc/ssl/private/
sipwitch.key"
staticprotectedinherited
int callback::sip_tlsmode = 0
staticprotectedinherited
const char * callback::sip_tlspwd = ""
staticprotectedinherited
The documentation for this class was generated from the following file: