error.c File Reference

Kamailio Error handling functions. More...

#include <stdio.h>
#include "error.h"
#include "str.h"
#include "parser/msg_parser.h"
#include "mem/mem.h"

Include dependency graph for error.c:

Go to the source code of this file.

Functions

int err2reason_phrase (int ser_error, int *sip_error, char *phrase, int etl, char *signature)
 ser error -> SIP error
char * error_text (int code)
 SIP error core -> SIP text.
void get_reply_status (str *status, struct sip_msg *reply, int code)
 return pkg_malloc-ed reply status in status->s

Variables

int prev_ser_error = -1
int ser_error = -1
 processing status of the last command


Detailed Description

Kamailio Error handling functions.

Note:
For a list of error codes in SIP, please check http://www.iana.org/assignments/sip-parameters

Definition in file error.c.


Function Documentation

int err2reason_phrase ( int  ser_error,
int *  sip_error,
char *  phrase,
int  etl,
char *  signature 
)

ser error -> SIP error

Parameters:
ser_error  current internal ser error
sip_error  the sip error code to which ser error will be turned
phrase  resulting error text
etl  error text buffer length
signature  extra text to be appended

Definition at line 49 of file error.c.

References E_BAD_ADDRESS, E_BAD_REQ, E_BAD_SERVER, E_BAD_TO, E_BAD_TUPEL, E_BAD_URI, E_EXEC, E_IP_BLOCKED, E_OUT_OF_MEM, E_Q_DEC_MISSING, E_Q_EMPTY, E_Q_INV_CHAR, E_Q_TOO_BIG, E_SEND, E_TOO_MANY_BRANCHES, and snprintf.

Referenced by ac_uac_req(), kill_transaction(), mi_tm_uac_dlg(), and sl_reply_error().

char* error_text ( int  code  ) 

SIP error core -> SIP text.

Definition at line 128 of file error.c.

Referenced by env_set_code_status(), get_reply_status(), and relay_reply().

void get_reply_status ( str status,
struct sip_msg reply,
int  code 
)

return pkg_malloc-ed reply status in status->s

Definition at line 213 of file error.c.

References error_text(), FAKED_REPLY, sip_msg::first_line, _str::len, LM_CRIT, LM_ERR, pkg_malloc, msg_start::reply, _str::s, and msg_start::u.

Referenced by mi_uac_dlg_hdl().


Variable Documentation

int prev_ser_error = -1

previous error

Definition at line 47 of file error.c.

Referenced by do_action(), and sl_reply_error().

int ser_error = -1


Generated on Wed May 23 06:01:02 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6