script_cb.h File Reference

Script callbacks functions. More...

#include "parser/msg_parser.h"

Include dependency graph for script_cb.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  script_cb

Defines

#define POST_SCRIPT_CB   (1<<1)
#define PRE_SCRIPT_CB   (1<<0)
#define REQ_TYPE_CB   (1<<2)
#define RPL_TYPE_CB   (1<<3)

Typedefs

typedef int( cb_function )(struct sip_msg *msg, void *param)

Functions

void destroy_script_cb (void)
 Destroy all callbacks.
int exec_post_req_cb (struct sip_msg *msg)
 Execute post-request callbacks.
int exec_post_rpl_cb (struct sip_msg *msg)
 Execute post-reply callbacks.
int exec_pre_req_cb (struct sip_msg *msg)
 Execute pre-request callbacks.
int exec_pre_rpl_cb (struct sip_msg *msg)
 Execute pre-reply callbacks.
int register_script_cb (cb_function f, int type, void *param)
 Register a script callback function.


Detailed Description

Script callbacks functions.

Definition in file script_cb.h.


Define Documentation

#define POST_SCRIPT_CB   (1<<1)

post-script callback

Definition at line 42 of file script_cb.h.

Referenced by mod_init(), and register_script_cb().

#define PRE_SCRIPT_CB   (1<<0)

pre-script callback

Definition at line 41 of file script_cb.h.

Referenced by mod_init(), and register_script_cb().

#define REQ_TYPE_CB   (1<<2)

request callback

Definition at line 43 of file script_cb.h.

Referenced by mod_init(), and register_script_cb().

#define RPL_TYPE_CB   (1<<3)

reply callback

Definition at line 44 of file script_cb.h.

Referenced by mod_init(), and register_script_cb().


Typedef Documentation

typedef int( cb_function)(struct sip_msg *msg, void *param)

Callback function

Definition at line 38 of file script_cb.h.


Function Documentation

void destroy_script_cb ( void   ) 

Destroy all callbacks.

Definition at line 149 of file script_cb.c.

References destroy_cb_list().

Referenced by cleanup().

int exec_post_req_cb ( struct sip_msg msg  ) 

Execute post-request callbacks.

Parameters:
msg SIP message
Returns:
1

Definition at line 217 of file script_cb.c.

References exec_post_cb().

Referenced by dlg_ontimeout(), and receive_msg().

int exec_post_rpl_cb ( struct sip_msg msg  ) 

Execute post-reply callbacks.

Parameters:
msg SIP message
Returns:
1

Definition at line 228 of file script_cb.c.

References exec_post_cb().

Referenced by receive_msg().

int exec_pre_req_cb ( struct sip_msg msg  ) 

Execute pre-request callbacks.

Parameters:
msg SIP message
Returns:
1 on success, 0 on error

Definition at line 195 of file script_cb.c.

References exec_pre_cb().

Referenced by dlg_ontimeout(), and receive_msg().

int exec_pre_rpl_cb ( struct sip_msg msg  ) 

Execute pre-reply callbacks.

Parameters:
msg SIP message
Returns:
1 on success, 0 on error

Definition at line 206 of file script_cb.c.

References exec_pre_cb().

Referenced by receive_msg().

int register_script_cb ( cb_function  f,
int  type,
void *  param 
)

Register a script callback function.

Parameters:
f callback function
type callback type
param callback parameter
Returns:
0 on success, -1 on error

Definition at line 89 of file script_cb.c.

References add_callback(), LM_CRIT, LM_ERR, POST_SCRIPT_CB, PRE_SCRIPT_CB, REQ_TYPE_CB, and RPL_TYPE_CB.

Referenced by mod_init().


Generated on Thu May 24 12:00:42 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6